Re: [O] Yank "normal" text as item in list
Hi, Igor. Below is mine. It's rudimentary, but it may help you. (defun teika-org-yank (&optional arg) "Wrapper of `org-yank', taking care of indenting." (interactive) (let (p0 p1) (when (and kill-ring (bolp) (not (equal (substring-no-properties (car kill-ring) 0 1) "*")) (not (equal (buffer-substring-no-properties (point) (1+ (point))) "*" ))) (setq p0 (point)) (org-cycle)) (call-interactively 'org-yank) (when p0 (indent-region p0 (point)) (unless (eolp) (org-cycle) (define-key org-mode-map "\C-y" 'teika-org-yank) ;; Obviously `p1' inside of `let' is not used. Sorry for bad lisp. =P ;; By the way, I have this: (global-set-key [(shift ?\s )] 'just-one-space) (global-set-key [(meta ?\s )] 'delete-horizontal-space) ;; You can easily press S-space and M-space with thumbs with my hack in Linux: ;; https://forums.gentoo.org/viewtopic-t-865313.html ;; (if you have a Japanese keyboard.) ;; I also bind to a key the following, a code fragment of a bigger function. (progn (exchange-point-and-mark) (when (or (eq last-command 'yank) (eq last-command 'yank-pop)) (just-one-space) )) ;; I.e., right after yanking, it calls `just-one-space'. Adjust to your use. In fact, it was a surprise for me that none has answered with a nice implementation. Indent problem irritated me a lot. Cheers, Teika (Teika kazura)
Re: [O] How to check whether the headline the point is on has some tag?
John Kitchin writes: > Marcin Borkowski writes: > > > Check the last element of org-heading-components. > > * Headline:tag1: > > #+BEGIN_SRC emacs-lisp > (org-heading-components) > #+END_SRC > > #+RESULTS: > | 1 | 1 | nil | nil | Headline | :tag1: | > > > > >> Hi list, >> >> I'd like to implement splitting an org file at tagged entries in my >> org-one-to-many library (as requested on the list by Daniel Clemente). >> How do I check whether a specific headline (say, one a point is at) has >> some tag (but not inherited)? >> >> TIA, alternatively you could use: * Headline :tag1: #+BEGIN_SRC emacs-lisp (let ((org-use-tag-inheritance nil)) (save-excursion (outline-previous-heading) (org-element-property :tags (org-element-at-point #+END_SRC #+results: | tag1 | -- cheers, Thorsten
Re: [O] How to check whether the headline the point is on has some tag?
Marcin Borkowski writes: Check the last element of org-heading-components. * Headline :tag1: #+BEGIN_SRC emacs-lisp (org-heading-components) #+END_SRC #+RESULTS: | 1 | 1 | nil | nil | Headline | :tag1: | > Hi list, > > I'd like to implement splitting an org file at tagged entries in my > org-one-to-many library (as requested on the list by Daniel Clemente). > How do I check whether a specific headline (say, one a point is at) has > some tag (but not inherited)? > > TIA, -- --- John Kitchin Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu
[O] How to check whether the headline the point is on has some tag?
Hi list, I'd like to implement splitting an org file at tagged entries in my org-one-to-many library (as requested on the list by Daniel Clemente). How do I check whether a specific headline (say, one a point is at) has some tag (but not inherited)? TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] [ox-latex] How to force ALL captions below their referents?
Eric S Fraga writes: > Not sure whether any reference will be definitive as there will always > be those that argue when it comes to style. However, a web search for > "typesetting captions for tables and figures" gives quite a few results, > the first of which is interesting: > > https://www.e-education.psu.edu/styleforstudents/c4_p12.html > > which is headed "Captions for figures and tables". I quote: > > The caption for a figure appears below the graphic; for a table, > above. > > The fact that LaTeX encourages the above is also a good sign. > > However, I should add that I could be somewhat anglo-centric in this: I > really have no idea what technical writing in other languages might look > like. Thanks for the feedback. Default value is now '(table). Regards,
Re: [O] Latest clocktable mis-formats headings
Dave Marquardt writes: > Nicolas Goaziou writes: > >> torys.ander...@gmail.com (Tory S. Anderson) writes: >> >>> Ah. So does the current code, which uses \emsp (which, if displayed >>> properly, would be what I meant by "giving me a space") assume >>> a non-nil org-pretty-entities? I would have hoped that would be >>> mentioned, or defaulted, somewhere... >> >> It doesn't require a non-nil `org-pretty-entities'. This is only >> eye-candy. >> >> OTOH, it assumes `org-export-with-entities' is non-nil, which is the >> default. > > Sorry to revive an old thread, but I'm also having problems with \emsp > in clocktables. I like to run M-x org-plot/gnuplot on clocktables, and > having \emsp rather than \_ in the first column causes the items in the > X axis to bleed into each other in the plot. I don't think > org-plot/gnuplot did anything with \_, but a "_" before each item in the > X axis was much less noticeable than "emsp" before each item. > > I looked at the code a while back that adds \emsp, and it isn't > configurable, as far as I can tell. Is it configurable and I missed it? > I.e. is there a way to either turn off this prefixing or change the > string? Oops, never mind. I looked again, and I can set the clocktable "indent" option to nil, and my plot looks much better. -Dave
Re: [O] Latest clocktable mis-formats headings
Nicolas Goaziou writes: > torys.ander...@gmail.com (Tory S. Anderson) writes: > >> Ah. So does the current code, which uses \emsp (which, if displayed >> properly, would be what I meant by "giving me a space") assume >> a non-nil org-pretty-entities? I would have hoped that would be >> mentioned, or defaulted, somewhere... > > It doesn't require a non-nil `org-pretty-entities'. This is only > eye-candy. > > OTOH, it assumes `org-export-with-entities' is non-nil, which is the > default. Sorry to revive an old thread, but I'm also having problems with \emsp in clocktables. I like to run M-x org-plot/gnuplot on clocktables, and having \emsp rather than \_ in the first column causes the items in the X axis to bleed into each other in the plot. I don't think org-plot/gnuplot did anything with \_, but a "_" before each item in the X axis was much less noticeable than "emsp" before each item. I looked at the code a while back that adds \emsp, and it isn't configurable, as far as I can tell. Is it configurable and I missed it? I.e. is there a way to either turn off this prefixing or change the string? Thanks. -Dave
Re: [O] Yank "normal" text as item in list
Eric Abrahamsen writes: > I don't know what situation in particular you've got, but what often > works for me is going to the line of the yanked text that I want to be > the first line of a new list item, and using "C-c -" to explicitly > convert it to an item. That command includes some indentation heuristics > that, for me anyway, often creates the result I was looking for. thanks, but I'm to able to get the behaviour I'd like to have... -- :: Igor Sosa Mayor :: joseleopoldo1...@gmail.com :: :: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ :: :: jabberid: rogorido ::::
Re: [O] Indentation Problem Using LaTeX Export
On Friday, 24 Oct 2014 at 10:33, Kenneth Jacker wrote: > Good day! > > In LaTeX terms, I believe an "\end{itemize}" is closing a list later > that I want. Its kind of hard to explain, but I'll try via an example ... The answer is no unfortunately: http://orgmode.org/worg/org-faq.html#closing-outline-sections and, specifically in your example, what you have are not lists but subsections. Maybe use "- " instead of "** "? -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e
Re: [O] Stack overflow in regexp matcher
Hi Charles, org-mode developers * Charles Berry [24. Oct. 2014]: > I do. Try this. Start emacs 24.4.1. > > 1) Copy this line: > > CLOCK: [2013-07-22 Mon 12:29]--[2013-07-22 Mon 15:26] => 2:57 > > into a new *.org file. > > 2) Save and close the file and reopen. > > 3) If no such error, kill the text in the buffer, and yank it twice. > > 4) Repeat 2 and 3 till the message > >File mode specification error: (error "Stack overflow in regexp matcher") > > shows up. > > 5) prune lines from the file and try step 2 till the error disappears. > > > For me somewhere between 400 and 500 lines is the difference between opening > with no error message and opening with the message. > > Emacs 24.3.1 does not show this behavior - no error message. I cannot reproduce this. I even tried with a file with 8264216 such lines. It took less than 4 minutes to open the file, less than 24 minutes to recalculate the second to last line. Then there was a message in the echo area: "Buffer test.org has shrunk a lot; auto save disabled in that buffer until next real save", but the buffer was actually as large as before (520645608 bytes). Mine is GNU Emacs 24.4.51.1 (i686-pc-linux-gnu, GTK+ Version 3.14.3) of 2014-10-24 and Org-mode version 8.2.10 (release_8.2.10 @ /usr/local/stow/emacs-snapshot/share/emacs/24.4.51/lisp/org/) Ciao, Gregor -- -... --- .-. . -.. ..--.. ...-.-
Re: [O] [ox-latex] How to force ALL captions below their referents?
On Friday, 24 Oct 2014 at 11:28, Nicolas Goaziou wrote: > Eric S Fraga writes: > >> The old behaviour was not consistent in the sense of captions for >> different objects being placed differently but the behaviour was >> "consistent" with what is recognised as best practice in typesetting: >> captions below figures and captions above tables. However, I agree with >> the desire for complete control. > > If this is really considered as best practice (would you have > a reference about it?), we really should consider making it the default. > Reading the thread, it seemed to me that it wasn't as universal. Not sure whether any reference will be definitive as there will always be those that argue when it comes to style. However, a web search for "typesetting captions for tables and figures" gives quite a few results, the first of which is interesting: https://www.e-education.psu.edu/styleforstudents/c4_p12.html which is headed "Captions for figures and tables". I quote: The caption for a figure appears below the graphic; for a table, above. The fact that LaTeX encourages the above is also a good sign. However, I should add that I could be somewhat anglo-centric in this: I really have no idea what technical writing in other languages might look like. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e
[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
> Date: Fri, 24 Oct 2014 22:35:59 +0300 > From: Eli Zaretskii > Cc: 18...@debbugs.gnu.org > > > (gdb) xbacktrace > > [Thread 8300.0x2b00 exited with code 0] > > (gdb) No symbol "DATA_SEG_BITS" in current context. > > ? If so, please upgrade to a newer version of GDB. (There is a way > to get the same information without "xbacktrace", but it's painful, so > if you can easily upgrade your GDB, it will mean less work.) Actually, I was wrong, sorry. The problem is likely in the .gdbinit file you are using: please get the latest one from the repository.
[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
> From: Sebastien Vauban > Cc: 18...@debbugs.gnu.org > Date: Fri, 24 Oct 2014 21:10:49 +0200 > > > Thanks. What happens if you type "xbacktrace"? (You might need to > > type "source /path/to/.gdbinit" before that, to get the xbacktrace > > command defined.) > > It seems to fail? You mean, this: > (gdb) xbacktrace > [Thread 8300.0x2b00 exited with code 0] > (gdb) No symbol "DATA_SEG_BITS" in current context. ? If so, please upgrade to a newer version of GDB. (There is a way to get the same information without "xbacktrace", but it's painful, so if you can easily upgrade your GDB, it will mean less work.)
[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
Just to mention the obvious thing; has anyone tried M-x toggle-debug-on-quit followed by ctrl-g?
Re: [O] Stack overflow in regexp matcher
Alan Schmitt polytechnique.org> writes: > > Hello, > > I've just got the following backtrace when opening an org > file. Unfortunately I cannot reproduce it reliably, but I was wondering > if others had seen something similar. > I do. Try this. Start emacs 24.4.1. 1) Copy this line: CLOCK: [2013-07-22 Mon 12:29]--[2013-07-22 Mon 15:26] => 2:57 into a new *.org file. 2) Save and close the file and reopen. 3) If no such error, kill the text in the buffer, and yank it twice. 4) Repeat 2 and 3 till the message File mode specification error: (error "Stack overflow in regexp matcher") shows up. 5) prune lines from the file and try step 2 till the error disappears. For me somewhere between 400 and 500 lines is the difference between opening with no error message and opening with the message. Emacs 24.3.1 does not show this behavior - no error message. HTH, Chuck
Re: [O] how to put into a journal info about the email sent
On Fri, Oct 24 2014, Eric Abrahamsen wrote: > David Belohrad writes: > >> Dear All, >> >> i'm using org. And I'm using notmuch (that's why I address both mailing >> lists). Now, writing an email in everyday bussiness requires a >> non-significant time of your workhours. So I'd like to have this event >> in my org agenda. So any time I send some email with a given subject, >> I'd like to 'automatically' entry the information about it into >> e.g. sentmails.org in form of a diary entry, with appropriate tag. > > I do something like this in Gnorb, which I'd recommend you use except > it's mostly Gnus specific. > > I do it in two parts, but you could do it in one. Basically I add a > function to the `message-header-hook' (which ensures that all the > message headers have been generated properly). Does `message-generate-headers-first' not do what you want for this specific part? > Obviously the downside is that, without a "Gcc:" header, org can't > actually make a real link to the message. It doesn't know where it's > going to be. However if you know that all your sent messages can be > reached with a link that looks like "notmuch:id#Message-id", then you > can make that yourself in your org capture template with something like As you suggest, know the message-id should be good enough to generate a notmuch link, though you may have to wait for the notmuch index to be updated for the link to be valid.
Re: [O] how to put into a journal info about the email sent
David Belohrad writes: > Dear All, > > i'm using org. And I'm using notmuch (that's why I address both mailing > lists). Now, writing an email in everyday bussiness requires a > non-significant time of your workhours. So I'd like to have this event > in my org agenda. So any time I send some email with a given subject, > I'd like to 'automatically' entry the information about it into > e.g. sentmails.org in form of a diary entry, with appropriate tag. I do something like this in Gnorb, which I'd recommend you use except it's mostly Gnus specific. I do it in two parts, but you could do it in one. Basically I add a function to the `message-header-hook' (which ensures that all the message headers have been generated properly). The important bits look like: (save-restriction (message-narrow-to-headers) (let ((link (and (mail-fetch-field "Gcc") (org-store-link nil))) (org-capture-link-is-already-stored t) ;; Collect date, subject, to, and msg-id with ;; `mail-fetch-field'. Construct date-ts and date-ts-ia with ;; (format-time-string ;; (org-time-stamp-format t [t]) ;; (date-to-time date)) ) (if link (org-add-link-props :date date :date-timestamp date-ts :date-timestamp-inactive date-ts-ia :annotation link) (org-store-link-props :subject subject :to to :date date :date-timestamp date-ts :date-timestamp-inactive date-ts-ia :message-id msg-id :annotation link)) (org-capture nil gnorb-gnus-new-todo-capture-key))) So, if a "Gcc:" header is present, make the link using `org-store-link', then add more fields using `org-add-link-props'. If it's not, then fake it by storing all necessary fields using `org-store-link-props'. Because we let `org-capture-link-is-already-stored' to t, the capture process doesn't try to create a new link, but just uses the values we've stored. Obviously the downside is that, without a "Gcc:" header, org can't actually make a real link to the message. It doesn't know where it's going to be. However if you know that all your sent messages can be reached with a link that looks like "notmuch:id#Message-id", then you can make that yourself in your org capture template with something like "[[notmuch:id#%:message-id][%:subject]]" I hope that's not too confusing! See: https://github.com/girzel/gnorb/blob/master/gnorb-gnus.el#L259 https://github.com/girzel/gnorb/blob/master/gnorb-gnus.el#L437 Yours, Eric > In example: > > I'm sending a mail to Tom, with subject 'dealing vme register > mapping'. > > At the moment I send this email (using smtpmail), I'd like an entry in > the sentmails.org as follows: > > > ** 2014-10 October > *** 2014-10-02 Thursday > dealing vme register mapping > :mail: > [[notmuch:id:7a97bb93e66a41878edd4c04fa764...@cernfe03.cern.ch][dealing > vme register mapping]] > > > I thought that I can use following > > (add-hook 'message-send-hook ') > > to hook on sending and generate a capture entry. In fact this works > pretty well _EXCEPT_ the link to the mail sent. The org-store-link > cannot apparently store a link to an email, which so far was not sent > (and not received?) because it claims that > > 'org-gnus-store-link: Can not create link: No Gcc header found' > > Hence this is pretty fatal for my diary entry. My question is: is there > any way how to link not-yet-sent/received email as an org-link? Or is > there any way to generate Gcc header before the email is sent and use > this header during sending? Or is > there any other way how to put into my agenda sent emails? > > many thanks > > david
[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK
> From: Sebastien Vauban > Cc: 18...@debbugs.gnu.org > Date: Fri, 24 Oct 2014 16:44:03 +0200 > > > Some, yes. Now do that again, but instead of typing "finish", type > > "bt full" after "thread 1". > > Here it is: Thanks. What happens if you type "xbacktrace"? (You might need to type "source /path/to/.gdbinit" before that, to get the xbacktrace command defined.)
[O] how to put into a journal info about the email sent
Dear All, i'm using org. And I'm using notmuch (that's why I address both mailing lists). Now, writing an email in everyday bussiness requires a non-significant time of your workhours. So I'd like to have this event in my org agenda. So any time I send some email with a given subject, I'd like to 'automatically' entry the information about it into e.g. sentmails.org in form of a diary entry, with appropriate tag. In example: I'm sending a mail to Tom, with subject 'dealing vme register mapping'. At the moment I send this email (using smtpmail), I'd like an entry in the sentmails.org as follows: ** 2014-10 October *** 2014-10-02 Thursday dealing vme register mapping :mail: [[notmuch:id:7a97bb93e66a41878edd4c04fa764...@cernfe03.cern.ch][dealing vme register mapping]] I thought that I can use following (add-hook 'message-send-hook ') to hook on sending and generate a capture entry. In fact this works pretty well _EXCEPT_ the link to the mail sent. The org-store-link cannot apparently store a link to an email, which so far was not sent (and not received?) because it claims that 'org-gnus-store-link: Can not create link: No Gcc header found' Hence this is pretty fatal for my diary entry. My question is: is there any way how to link not-yet-sent/received email as an org-link? Or is there any way to generate Gcc header before the email is sent and use this header during sending? Or is there any other way how to put into my agenda sent emails? many thanks david
[O] Indentation Problem Using LaTeX Export
Good day! In LaTeX terms, I believe an "\end{itemize}" is closing a list later that I want. Its kind of hard to explain, but I'll try via an example ... I basically have a couple of nested outlines and body text. Something like this in Org format: * Alpha porttitor, elit at imperdiet consequat, nunc nisl dapibus dui, eu fermentum ipsum magna et mi. Sed egestas erat et dolor lobortis, sit amet cursus ** Alpha1 ** Alpha2 lorem tincidunt. Vivamus eget bibendum est. Integer justo mauris, sodales eget commodo quis, faucibus non est. Nulla facilisi this produces something like: 1 Alpha porttitor, elit at imperdiet consequat, nunc nisl dapibus dui, eu fermentum ipsum magna et mi. Sed egestas erat et dolor lobortis, sit amet cursus 1.1 Alpha1 1.2 Alpha2 ==> lorem tincidunt. Vivamus eget bibendum est. Integer justo mauris, ==> sodales eget commodo quis, faucibus non est. Nulla facilisi whereas I want it to be formated like this: 1 Alpha porttitor, elit at imperdiet consequat, nunc nisl dapibus dui, eu fermentum ipsum magna et mi. Sed egestas erat et dolor lobortis, sit amet cursus 1.1 Alpha1 1.2 Alpha2 ==> lorem tincidunt. Vivamus eget bibendum est. Integer justo mauris, ==> sodales eget commodo quis, faucibus non est. Nulla facilisi IOW, I want the "lorem tincidunt" body to be associated with the "Alpha" heading, not the "Alpha2" one. I can use a "work around" via editing the LaTeX file. But, is there a way to do this entirely within Org? Maybe a "bug"? Thanks, -- Prof Kenneth H Jacker (ret) k...@cs.appstate.edu Computer Science Dept www.cs.appstate.edu/~khj Appalachian State Univ Boone, NC 28608 USA
Re: [O] [ox-latex] How to force ALL captions below their referents?
Nicolas Goaziou writes: > Eric S Fraga writes: > >> The old behaviour was not consistent in the sense of captions for >> different objects being placed differently but the behaviour was >> "consistent" with what is recognised as best practice in typesetting: >> captions below figures and captions above tables. However, I agree with >> the desire for complete control. > > If this is really considered as best practice (would you have > a reference about it?), we really should consider making it the default. > Reading the thread, it seemed to me that it wasn't as universal. It's discussed here with some references: https://tex.stackexchange.com/questions/3243/why-should-a-table-caption-be-placed-above-the-table I took a quick looks as some different journals for which I have articles with both tables and figures on my computer. 7 had the configuration table captions above and figure caption below. One had both captions above. One had mixed figure captions (some years above some years below). So for sure table captions should be above. Probably figure captions should be below. It makes sense. —Rasmus -- I almost cut my hair, it happened just the other day
Re: [O] [ox-latex] How to force ALL captions below their referents?
Eric S Fraga writes: > The old behaviour was not consistent in the sense of captions for > different objects being placed differently but the behaviour was > "consistent" with what is recognised as best practice in typesetting: > captions below figures and captions above tables. However, I agree with > the desire for complete control. If this is really considered as best practice (would you have a reference about it?), we really should consider making it the default. Reading the thread, it seemed to me that it wasn't as universal. However, `org-latex-table-caption-above' would then be dropped altogether. I don't mind either. Regards,
Re: [O] [PATCH] org.el: Fix bindings of < and > for calendar scrolling
Achim Gratz writes: > Marco Wahl writes: >> Since the fix is small and clear (AFAICT) and the tests pass I try to >> push it directly to maint. > > Please keep maint merged into master. Ahh, okay, thanks. I thought the maintainers would do those merges automatically. I just saw that you already did the merge for the commit above. Thanks! Best regards, Marco -- http://www.wahlzone.de GPG: 0x0A3AE6F2
Re: [O] [ox-latex] How to force ALL captions below their referents?
On Thursday, 23 Oct 2014 at 23:08, Nicolas Goaziou wrote: > Hello, > > Eric S Fraga writes: > >> I don't actually understand you. > > `org-latex-table-caption-above' is now an alias for > `org-latex-caption-above', so the default values ought to be the same. Ah, I see. > IIUC, the old behaviour wasn't consistent (some captions above, some > below). This is the original motivation for this change. The old behaviour was not consistent in the sense of captions for different objects being placed differently but the behaviour was "consistent" with what is recognised as best practice in typesetting: captions below figures and captions above tables. However, I agree with the desire for complete control. > I would be happy to make the transition smoother. However, I don't know > how to achieve complete backward compatibility, considering the remark > above. Okay. No worries! thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-475-g25d50e