Re: [O] C-c C-y in currently clocked header
On 2014-10-16, at 05:52, Daniel Clemente wrote: currently clocking :CLOCK: CLOCK: [2014-10-15 Wed 16:06] CLOCK: [2014-10-13 Mon 11:23]--[2014-10-13 Mon 11:54] = 0:31 :END: Now it's 16:26. If I put the cursor in 16:06 and press C-c C-y (org-evaluate-time-range), it would be useful to see in the minibuffer that the difference until now is 20 minutes. Saluton! Are you aware that you can set org-clock-mode-line-total to 'current? (Personally, I only discovered it before a few hours, and set it to 'today.) Yes, but you may want to see the current clocking duration independently of the settings of the current header. E.g. even if org-clock-mode-line-total==all, I want to see that my unclosed clocking amounts for 20 minutes. Fair enough, I just wanted to make sure you knew about that variable. (As I told, I wasn't aware of it until recently. And the only reason I learned about it, btw, was the thought something like this /should/ be possible, and it's Org-mode, after all, so obviously it was. Notice that your proposed solution (while reasonable from the point of view of how C-c C-y works) might be cumbersome – you'd need to go to the place where you have the :LOGBOOK: drawer, open it, move to the first line and hit C-c C-y. A faster way to get the same information might be C-c C-x C-o [the info you wanted gets displayed in the echo area] C-u C-c C-x C-i 1 if you don't mind splitting the clocking line in :LOGBOOK: into two. (AFAIU, you also run into the risk of dropping one minute of clocking time if you happen to do this at hh:mm:59 or something.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] beamer and changing font size for example environment
On Wednesday, 15 Oct 2014 at 21:52, Marcin Borkowski wrote: On 2014-10-13, at 09:50, Eric S Fraga wrote: You can also /shrink/ individual frames in beamer. Please note that can does *not* imply should. Indeed but it's nice to know that it is possible for those cases where it can be quite useful. In my case, it's often when I'm presenting the solution to a mathematical problem in a class and the whole solution is one line too long to fit on a single slide. I use very large text by default (bigger option in beamer) so a temporary shrink is not horrendous! For the record, and to have this post be somewhat on-topic, shrinking a single slide is achieved by adding a BEAMER option property to the frame's headline: --8---cut here---start-8--- * The frame title :PROPERTIES: :BEAMER_opt: shrink=10 :END: --8---cut here---end---8--- -- : Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.3beta-372-gdd70cf
Re: [O] Sharing: Agenda skip function to remove future-scheduled items
James Harkins wrote: Sebastien Vauban sva-news@... writes: I use the following (tricky) settings, which should do what you have in mind, if I'm not mistaken: #+begin_src emacs-lisp ;; Don't show scheduled entries in the global `todo' list. (setq org-agenda-todo-ignore-scheduled 'future) ;; Don't show entries scheduled in the future in the global ;; `todo' list (until they are within the warning period). (setq org-agenda-todo-ignore-deadlines 'near) ;; Honor `todo' list `org-agenda-todo-ignore...' options also ;; in the `tags-todo' list. (setq org-agenda-tags-todo-honor-ignore-options t) #+end_src Interesting. How would I apply those settings to only one custom agenda command, while leaving the others with the default behavior of showing future schedules? By setting them inside the `org-agenda-custom-commands' definition. Best regards, Seb -- Sebastien Vauban
Re: [O] electric-indent-mode in Emacs 25 not indenting in Org
Hello William, I got tired of waiting for prettify-symbols-mode so I compiled Emacs from source, which gives me version 25.0.50.1 (25 being next after 24.4). This looks like a nice mode. Thanks for the hint. I noticed something odd with electric-indent-mode, which I had enabled, and which is on by default in 24.4. If I run Emacs 24.3 (my Ubuntu system default) as emacs -Q, then run M-x electric-indent-mode to enable the mode, open foo.org, and type * Heading then when I hit return the cursor ends up under the H. That is one of the things electric-indent-mode does. But when I run Emacs 25 with emacs -Q, check to make sure electric-indent-mode is enabled and see that it is because that's the default, open foo.org, and type * Heading then when I hit return the cursor ends up under the *! I have the same behavior here. You may try C-j which yields a cursor under the H for me. Best regards, Marco -- http://www.wahlzone.de GPG: 0x0A3AE6F2
[O] Can't accomplish agenda sorting '(priority-down category-keep)
Dear org-mode community, I have a problem sorting my agenda in the following way: group by priority descending, and withing each priority (A, B or C), sort by category as configured in org-agenda-files. My org-agenda-sorting-strategy is set to '(priority-down category-keep). What I see in the agenda instead is that tasks within a single priority level are sorted not by category, but by some other criterion (looks like the time left to their deadline). In fact, tasks from the one category appear interleaved with other categories' tasks, within a single priority. This is all within the tasks that don't have a priority set explicitly, i.e. should be the default B priority. Interestingly, the order doesn't change at all if I swap the category-keep criterion with category-up or category-down. Any hints on what may be wrong? Thanks, Yury
Re: [O] [ob-R] table variable passing broken
Andreas Leha andreas.l...@med.uni-goettingen.de writes: Charles Berry ccbe...@ucsd.edu writes: Andreas Leha andreas.leha at med.uni-goettingen.de writes: Hi all, There seems to be a bug in table passing as variables now using the tangle-friendly version of passing variables. Here is an example (I get an error also with emacs -Q): --8---cut here---start-8--- * test #+name: testtab | variable | display | unit | |---+---+---| | num_cells | Number of Cells in Well | | | cell_area | Cell Area | μm² | | nucleus_area | Nucleus Area | μm² | | roundness | Cell Roundness| | | ratio_w2l | Cell Width to Length Ratio| | | inten_nuc_dapi_median | Intensity Nucleus DAPI Median | | | dapi_median | Intensity Nucleus DAPI Median | | | edu_median| Intensity edu Median | | | oct4_median | Intensity oct4 Median | | | clump_size| Clump Size| cells | | short_name| Cell Line | | | p_col | Column| | | batch | Batch | | | concentration | Fibronectin Concentration | ugml | | Residual | Residual | | | evaluation_guid | Plate | | | donor | Genotype | | #+BEGIN_SRC R :session *test* :var test=testtab test #+END_SRC #+RESULTS: --8---cut here---end---8--- I see this in my R session: --8---cut here---start-8--- Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, (from testorg.org!917613Wp#22) : line 17 did not have 3 elements --8---cut here---end---8--- I think this is the wrong diagnosis. I agree. Saving the table as tsv (via org-table-export) results in a file that cannot be read from R either. Did you actually revert to the earlier version of ob-R.el to confirm that this would have run correctly? I did not revert. But that org file used to work. I won't be able to bisect any time soon. The reason I ask is that I just tried this with org-babel-R-assign-elisp from org-mode-a5686d87786b1d6514ec85959a2188f703346a06/lisp/ob-R.el and got the same error. Note this: #+name: testtab2 | variable | display | unit | |--+--+--| | donor| Genotype | | #+BEGIN_SRC emacs-lisp :var test=testtab2 (orgtbl-to-tsv test '(:fmt org-babel-R-quote-tsv-field)) #+END_SRC #+RESULTS: : donorGenotype exactly. That also causes the org-table-export to fail. #+BEGIN_SRC emacs-lisp :var value=testtab2 ;; from org-babel-R-assign-elisp (mapcar 'length (org-remove-if-not 'sequencep value)) #+END_SRC #+RESULTS: | 3 | In particular, the empty table cells are omitted even though `value' or `test' has all lengths as 3. This results in calling read.table ( ..., fill=FALSE) implicitly. Not sure if the fix is to retool org-babel-R-assign-elisp or something in org-table.el. I am the wrong person to answer that. But it looks to me to be an issue for org-table.el. Thanks for your better analysis. Regards, Andreas To keep this issue going, here a quick thought: Since orgtbl-to-csv seems to work, a temporary fix on ob-R's side would be to use that for passing of tables. Andreas
[O] Getting org-mobile-sync to work.
I'm trying to get mobileorg set up and working, which has worked. But I also want to use org-mobile-sync.el from ELPA, the actual package being org-mobile-sync-20131118.1116. Looking at the source file it says - --8---cut here---start-8--- ;;; Commentary: ;; Adds delayed `org-mobile-push' upon saving files that are part of ;; `org-mobile-files-alist'. Watches the `org-mobile-capture-file' for ;; changes with `file-notify.el' and then invokes `org-mobile-pull'. ;;; Requirements: ;; Emacs 24.3.50 with `file-notify-support' is required for it to work. --8---cut here---end---8--- But I can't find file-notify.el on my system, nor by googling for it either. Can somebody help me to get the file please? How do I know if file-notify-support is part of my Emacs please? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk my git repo = https://bitbucket.org/boudiccas/dots TGmeds = http://www.tgmeds.org.uk Debian testing, fluxbox 1.3.5, emacs 24.3.94.1 signature.asc Description: PGP signature
[O] Turn subscript off by default?
Hello all, In more documents than not, it seems I see someone do something like foo_bar Common, of course, because most orgmode users are programmers. Of course this results in the super awkward rendering of foo(subscripted:bar). I can't remember *ever* making use of subscript in an orgmode document, though I and many others have run into problems with it... why not switch the default for subscript to off? - Chris
Re: [O] Turn subscript off by default?
Christopher Allan Webber wrote: In more documents than not, it seems I see someone do something like foo_bar Common, of course, because most orgmode users are programmers. Of course this results in the super awkward rendering of foo(subscripted:bar). I can't remember *ever* making use of subscript in an orgmode document, though I and many others have run into problems with it... why not switch the default for subscript to off? Put (setq org-use-sub-superscripts '{}) in your .emacs file. Best regards, Seb -- Sebastien Vauban
Re: [O] after-todo-statistics hook for checkboxes
James Harkins jamshar...@qq.com writes: I do think this issue qualifies as a bug (albeit minor). The real behavior deviates from the documentation (in a way that's difficult to justify logically). IMO it should be fixed, or the documentation should explain that the after todo statistics hook doesn't work for checkboxes without requireing org-checklist. Using org-checklist.el was just a suggestion. `org-todo-statistics-hook' is used for TODO (i.e. headlines) and `org-checkbox-statistics-hook' is used for checkboxes (i.e. lists). I see no bug here (although they aren't called with the same arguments, but that's another story). Regards, -- Nicolas Goaziou
Re: [O] [PATCH RFC] subtree archive hook?
Hello, Eric Abrahamsen e...@ericabrahamsen.net writes: Thanks for the review! Particularly the concision of this last. I'm afraid I may never get used to two spaces at the end of a sentence, though... Patch applied. Thank you. Regards, -- Nicolas Goaziou
Re: [O] org-export-format-source-code-or-example: End of Buffer
Hello, Mishal Awadah a.mam...@gmail.com writes: According to Andreas, this is an org-mode issue: https://answers.launchpad.net/python-mode/+question/248031 The function `org-export-format-source-code-or-example' doesn't exist anymore, so I think this bug should be closed. Regards, -- Nicolas Goaziou
Re: [O] How to change a link?
On 2014-10-15, at 23:52, Nicolas Goaziou wrote: Marcin Borkowski mb...@wmi.amu.edu.pl writes: I have one more question. What I'm about to do is (basically) put file:some-file-name:: in front of the link, without changing the description. I could use `org-element-put-property' and (AFAIU) org-element-link-interpreter to put it into the buffer (and probably delete the old one). It would be much easier (and maybe faster) just to go to the point in the buffer where the link starts, go `(forward-char 2)' (past the brackets) and `(insert (concat file name ::))'. But, is it safe? Wouldn't it break something? And is it considered a good practice? There are caveats. For example, as soon as you alter the buffer, your AST becomes invalid (buffer positions are all wrong after the insertion). If you want to process all the links from the same AST, you can, for example, maintain a counter for characters inserted so far that will fix buffer positions, or first get all internal links with `org-element-map', then process them in reverse order so buffer modifications do not invalidate them. OK, so what is the canonical way of doing this? I don't want to use org-dp, since it is another dependency. Regards, Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] electric-indent-mode in Emacs 25 not indenting in Org
Two people are interested so let me share with you that you may easily have lots of symbols in this current release of Emacs immediately with http://melpa.milkbox.net/#/pretty-mode On Thu, Oct 16, 2014 at 3:11 AM, Marco Wahl marcowahls...@gmail.com wrote: Hello William, I got tired of waiting for prettify-symbols-mode so I compiled Emacs from source, which gives me version 25.0.50.1 (25 being next after 24.4). This looks like a nice mode. Thanks for the hint. I noticed something odd with electric-indent-mode, which I had enabled, and which is on by default in 24.4. If I run Emacs 24.3 (my Ubuntu system default) as emacs -Q, then run M-x electric-indent-mode to enable the mode, open foo.org, and type * Heading then when I hit return the cursor ends up under the H. That is one of the things electric-indent-mode does. But when I run Emacs 25 with emacs -Q, check to make sure electric-indent-mode is enabled and see that it is because that's the default, open foo.org, and type * Heading then when I hit return the cursor ends up under the *! I have the same behavior here. You may try C-j which yields a cursor under the H for me. Best regards, Marco -- http://www.wahlzone.de GPG: 0x0A3AE6F2 -- Grant Rettke g...@wisdomandwonder.com | http://www.wisdomandwonder.com/ “Wisdom begins in wonder.” --Socrates ((λ (x) (x x)) (λ (x) (x x))) “Life has become immeasurably better since I have been forced to stop taking it seriously.” --Thompson
Re: [O] org-export-format-source-code-or-example: End of Buffer
So if I update org-mode this should work again? Thanks, Mish On Oct 16, 2014, at 10:04 AM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote: Hello, Mishal Awadah a.mam...@gmail.com writes: According to Andreas, this is an org-mode issue: https://answers.launchpad.net/python-mode/+question/248031 The function `org-export-format-source-code-or-example' doesn't exist anymore, so I think this bug should be closed. Regards, -- Nicolas Goaziou
[O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Hello, A question on Stack Overflow [1] reported an issue overriding `org-clock-into-drawer' with properties (specifically, overriding a global value of t with a property value nil). Looking into the function `org-clock-into-drawer', the actual behavior did not match the documented behavior. The attached patch should fix the issue. [1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t From c57cf41da1aab2e313d29dea64882d9808b8134a Mon Sep 17 00:00:00 2001 From: Kyle Meyer k...@kyleam.com Date: Thu, 16 Oct 2014 15:17:00 -0400 Subject: [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check * lisp/org-clock.el (org-clock-into-drawer): Fix processing of properties so that they can override global value. Previously, if the 'CLOCK_INTO_DRAWER' or 'LOG_INTO_DRAWER' property was nil, the local property setting would not override the global variable [1]. These changes make the behavior match the docstring description ('CLOCK_INTO_DRAWER' and 'LOG_INTO_DRAWER' properties override `org-clock-into-drawer', with 'CLOCK_INTO_DRAWER' given precedence). [1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t TINYCHANGE --- lisp/org-clock.el | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 2ffcbfa..8fd7b89 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -74,13 +74,14 @@ (defun org-clock-into-drawer () it will be used instead of the default value. The default is the value of the customizable variable `org-clock-into-drawer', which see. - (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit)) - (q (org-entry-get nil LOG_INTO_DRAWER 'inherit))) + (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit t)) +(q (org-entry-get nil LOG_INTO_DRAWER 'inherit t))) (cond - ((or (not (or p q)) (equal p nil) (equal q nil)) org-clock-into-drawer) - ((or (equal p t) (equal q t)) LOGBOOK) - ((not p) q) - (t p + ((not (or p q)) org-clock-into-drawer) + ((equal p nil) nil) + ((equal p t) LOGBOOK) + ((equal q nil) nil) + ((equal q t) LOGBOOK (defcustom org-clock-out-when-done t When non-nil, clock will be stopped when the clocked entry is marked DONE. -- 2.1.2 -- Kyle
Re: [O] org-export-format-source-code-or-example: End of Buffer
Mishal Awadah a.mam...@gmail.com writes: So if I update org-mode this should work again? I don't know, but I can guarantee no bug will come from `org-export-format-source-code-or-example'. Regards,
Re: [O] How to change a link?
Marcin Borkowski mb...@wmi.amu.edu.pl writes: OK, so what is the canonical way of doing this? I don't want to use org-dp, since it is another dependency. There is no canonical way. I would personally collect a reverse list of internal links and proceed from there. Regards,
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Hello, Kyle Meyer k...@kyleam.com writes: A question on Stack Overflow [1] reported an issue overriding `org-clock-into-drawer' with properties (specifically, overriding a global value of t with a property value nil). Looking into the function `org-clock-into-drawer', the actual behavior did not match the documented behavior. The attached patch should fix the issue. Thanks for the patch. - (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit)) - (q (org-entry-get nil LOG_INTO_DRAWER 'inherit))) + (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit t)) +(q (org-entry-get nil LOG_INTO_DRAWER 'inherit t))) (cond - ((or (not (or p q)) (equal p nil) (equal q nil)) org-clock-into-drawer) - ((or (equal p t) (equal q t)) LOGBOOK) - ((not p) q) - (t p + ((not (or p q)) org-clock-into-drawer) + ((equal p nil) nil) + ((equal p t) LOGBOOK) + ((equal q nil) nil) + ((equal q t) LOGBOOK This is wrong. If p is a string, e.g. FOO, return value should be FOO. Ditto if q contains a string. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Nicolas Goaziou m...@nicolasgoaziou.fr wrote: This is wrong. If p is a string, e.g. FOO, return value should be FOO. Ditto if q contains a string. Right. Thanks for pointing that out. I'll update the patch.
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Kyle Meyer k...@kyleam.com wrote: Nicolas Goaziou m...@nicolasgoaziou.fr wrote: This is wrong. If p is a string, e.g. FOO, return value should be FOO. Ditto if q contains a string. Right. Thanks for pointing that out. I'll update the patch. This new patch should handle that correctly. From 84799f9b9f4a2e89b3e717194352ef9a9d082de3 Mon Sep 17 00:00:00 2001 From: Kyle Meyer k...@kyleam.com Date: Thu, 16 Oct 2014 15:17:00 -0400 Subject: [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check * lisp/org-clock.el (org-clock-into-drawer): Fix processing of properties so that they can override global value. Previously, if the 'CLOCK_INTO_DRAWER' or 'LOG_INTO_DRAWER' property was nil, the local property setting would not override the global variable [1]. These changes make the behavior match the docstring description ('CLOCK_INTO_DRAWER' and 'LOG_INTO_DRAWER' properties override `org-clock-into-drawer', with 'CLOCK_INTO_DRAWER' given precedence). [1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t TINYCHANGE --- lisp/org-clock.el | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 2ffcbfa..fbcda49 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -74,13 +74,15 @@ (defun org-clock-into-drawer () it will be used instead of the default value. The default is the value of the customizable variable `org-clock-into-drawer', which see. - (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit)) - (q (org-entry-get nil LOG_INTO_DRAWER 'inherit))) + (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit t)) +(q (org-entry-get nil LOG_INTO_DRAWER 'inherit t))) (cond - ((or (not (or p q)) (equal p nil) (equal q nil)) org-clock-into-drawer) - ((or (equal p t) (equal q t)) LOGBOOK) - ((not p) q) - (t p + ((not (or p q)) org-clock-into-drawer) + ((equal p nil) nil) + ((equal p t) LOGBOOK) + ((equal q nil) nil) + ((equal q t) LOGBOOK) + (t (or p q) (defcustom org-clock-out-when-done t When non-nil, clock will be stopped when the clocked entry is marked DONE. -- 2.1.2
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Kyle Meyer k...@kyleam.com writes: This new patch should handle that correctly. Thanks. (cond - ((or (not (or p q)) (equal p nil) (equal q nil)) org-clock-into-drawer) - ((or (equal p t) (equal q t)) LOGBOOK) - ((not p) q) - (t p + ((not (or p q)) org-clock-into-drawer) + ((equal p nil) nil) + ((equal p t) LOGBOOK) + ((equal q nil) nil) + ((equal q t) LOGBOOK) + (t (or p q) Actually, it doesn't work either. Under some circumstances (e.g, when p is a drawer name and q is t), q will have precedence over p, which is not desirable. What about this? (cond ((equal p nil) nil) ((equal p t) t) (p) ((equal q nil) nil) ((equal q t) t) (q) (t org-clock-into-drawer)) Regards,
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Nicolas Goaziou m...@nicolasgoaziou.fr wrote: Kyle Meyer k...@kyleam.com writes: Actually, it doesn't work either. Under some circumstances (e.g, when p is a drawer name and q is t), q will have precedence over p, which is not desirable. Good point. What about this? (cond ((equal p nil) nil) ((equal p t) t) (p) ((equal q nil) nil) ((equal q t) t) (q) (t org-clock-into-drawer)) Nice. Thanks for fixing my fixes. From ac5c110cab56214d4bdf51b3ba52fc111794758f Mon Sep 17 00:00:00 2001 From: Kyle Meyer k...@kyleam.com Date: Thu, 16 Oct 2014 15:17:00 -0400 Subject: [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check * lisp/org-clock.el (org-clock-into-drawer): Fix processing of properties so that they can override global value. Previously, if the 'CLOCK_INTO_DRAWER' or 'LOG_INTO_DRAWER' property was nil, the local property setting would not override the global variable [1]. These changes make the behavior match the docstring description ('CLOCK_INTO_DRAWER' and 'LOG_INTO_DRAWER' properties override `org-clock-into-drawer', with 'CLOCK_INTO_DRAWER' given precedence). [1] http://stackoverflow.com/questions/26405415/how-to-locally-unset-org-clock-into-drawer-t TINYCHANGE --- lisp/org-clock.el | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 2ffcbfa..092a6aa 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -74,13 +74,15 @@ (defun org-clock-into-drawer () it will be used instead of the default value. The default is the value of the customizable variable `org-clock-into-drawer', which see. - (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit)) - (q (org-entry-get nil LOG_INTO_DRAWER 'inherit))) -(cond - ((or (not (or p q)) (equal p nil) (equal q nil)) org-clock-into-drawer) - ((or (equal p t) (equal q t)) LOGBOOK) - ((not p) q) - (t p + (let ((p (org-entry-get nil CLOCK_INTO_DRAWER 'inherit t)) +(q (org-entry-get nil LOG_INTO_DRAWER 'inherit t))) +(cond ((equal p nil) nil) + ((equal p t) t) + (p) + ((equal q nil) nil) + ((equal q t) t) + (q) + (t org-clock-into-drawer (defcustom org-clock-out-when-done t When non-nil, clock will be stopped when the clocked entry is marked DONE. -- 2.1.2
Re: [O] How to change a link?
On 2014-10-16, at 22:10, Nicolas Goaziou wrote: Marcin Borkowski mb...@wmi.amu.edu.pl writes: OK, so what is the canonical way of doing this? I don't want to use org-dp, since it is another dependency. There is no canonical way. I would personally collect a reverse list of internal links and proceed from there. Thanks! I didn't think about reversing the list. Obvious in hindsight. Regards, Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] How to change a link?
Marcin Borkowski mb...@wmi.amu.edu.pl writes: On 2014-10-15, at 23:52, Nicolas Goaziou wrote: Marcin Borkowski mb...@wmi.amu.edu.pl writes: I have one more question. What I'm about to do is (basically) put file:some-file-name:: in front of the link, without changing the description. I could use `org-element-put-property' and (AFAIU) org-element-link-interpreter to put it into the buffer (and probably delete the old one). It would be much easier (and maybe faster) just to go to the point in the buffer where the link starts, go `(forward-char 2)' (past the brackets) and `(insert (concat file name ::))'. But, is it safe? Wouldn't it break something? And is it considered a good practice? There are caveats. For example, as soon as you alter the buffer, your AST becomes invalid (buffer positions are all wrong after the insertion). If you want to process all the links from the same AST, you can, for example, maintain a counter for characters inserted so far that will fix buffer positions, or first get all internal links with `org-element-map', then process them in reverse order so buffer modifications do not invalidate them. OK, so what is the canonical way of doing this? I don't want to use org-dp, since it is another dependency. It is a problem to add dependencies to libraries the user must install himself, and at the same time its a pity that there is so much duplication instead of reuse ... However, here is a org-dp solution, use 't' instead of 'prepend to replace the links, and whatever you want instead of file+emacs as replacement. Of course one could easily re-search and replace [[file: in this simple case, but this uses the parser and allows doing more complex stuff in a clean way too: , | * ORG SCRATCH | | ** Level 2 | | [[file+emacs:~/junk/org/minimal.org][min.org]] | | [[file:~/junk/org/minimal.org][min.org]] | | *** Level 3 | | [[file+emacs:~/junk/org/trash-me.org][trash.org]] | | [[file:~/junk/org/trash-me.org][trash.org]] | | | #+BEGIN_SRC emacs-lisp :results none | (require 'org-dp) | (org-dp-map |'(org-dp-rewire | 'paragraph | (lambda (cont elem) |(let* ((link (car cont)) | (raw-val (org-element-property :raw-link link)) | (new-val (mapconcat 'identity | (cons file+emacs | (cdr | (split-string | raw-val : t))) | :))) | (org-element-put-property link :raw-link new-val))) | 'prepend) |org-link-re-with-space t) | #+END_SRC ` -- cheers, Thorsten
Re: [O] [PATCH] org-clock: Fix CLOCK_INTO_DRAWER property check
Kyle Meyer k...@kyleam.com writes: Nice. Thanks for fixing my fixes. Patch applied. Thank you. Regards,
Re: [O] after-todo-statistics hook for checkboxes
At Thu, 16 Oct 2014 18:39:46 +0200, Nicolas Goaziou wrote: `org-todo-statistics-hook' is used for TODO (i.e. headlines) and `org-checkbox-statistics-hook' is used for checkboxes (i.e. lists). I see no bug here (although they aren't called with the same arguments, but that's another story). I'm sorry to be a pest, but I did get sent on a wild goose chase by what is either a/ faulty behavior or b/ a faulty docstring. The docstring of org-after-todo-statistics-hook says: Hook that is called after a TODO statistics cookie has been updated. Well, that isn't true. Changing a checkbox updates a stats cookie, and the hook is *not* called. And it took more than an hour to figure that out. So, for the sake of users dealing with this in the future, let's at least fix the docstring then. It isn't clear to me how to use org-checkbox-statistics-hook or org-todo-statistics-hook for my use case. This isn't about alternative ways of collecting statistics (org-checkbox-statistics-hook's docstring). I'm willing to switch to that, but less willing to trawl through the org sources (again) to figure it out. At least, not today. hjh For reference, from http://orgmode.org/worg/doc.html#hooks: org-checkbox-statistics-hook nil Hook that is run whenever Org thinks checkbox statistics should be updated. This hook runs even if checkbox rule in `org-list-automatic-rules' does not apply, so it can be used to implement alternative ways of collecting statistics information. org-todo-statistics-hook nil Hook that is run whenever Org thinks TODO statistics should be updated. This hook runs even if there is no statistics cookie present, in which case `org-after-todo-statistics-hook' would not run. org-after-todo-statistics-hook nil Hook that is called after a TODO statistics cookie has been updated. Each function is called with two arguments: the number of not-done entries and the number of done entries. For example, the following function, when added to this hook, will switch an entry to DONE when all children are done, and back to TODO when new entries are set to a TODO status. Note that this hook is only called when there is a statistics cookie in the headline! (defun org-summary-todo (n-done n-not-done) Switch entry to DONE when all subentries are done, to TODO otherwise. (let (org-log-done org-log-states) ; turn off logging (org-todo (if (= n-not-done 0) DONE TODO
[O] Text above first headline is being exported, despite :export: tag being used.
At http://orgmode.org/manual/Export-settings.html I read , | ‘SELECT_TAGS’ | The tags that select a tree for export (org-export-select-tags). The | default value is :export:. Within a subtree tagged with :export:, | you can still exclude entries with :noexport: (see below). When | headlines are selectively exported with :export: anywhere in a file, | text before the first headline is ignored. ` But I have trees tagged for export, while text above first headline is being exported. Can anyone confirm? -- Brady
Re: [O] Text above first headline is being exported, despite :export: tag being used.
Brady Trainor algebrat at uw.edu writes: I read , | ‘SELECT_TAGS’ | The tags that select a tree for export (org-export-select-tags). The | default value is :export:. Within a subtree tagged with :export:, | you can still exclude entries with :noexport: (see below). When | headlines are selectively exported with :export: anywhere in a file, | text before the first headline is ignored. ` But I have trees tagged for export, while text above first headline is being exported. Can anyone confirm? It works for me. Can you provide an ECM[1]? HTH, Chuck [1] http://orgmode.org/worg/org-faq.html#ecm