[Orgmode] Re: `org-refile' doc string
Nick Dokos nicholas.do...@hp.com writes: Štěpán Němec step...@gmail.com wrote: In the documentation of `org-refile' we read: If there is an active region, all entries in that region will be moved. However, the region must fulfil the requirement that the first heading is the first one sets the top-level of the moved text - at most siblings below it are allowed. I completely fail at parsing the second sentence. Could please someone who knows what it's trying to say fix it? What's the problem? It's crystal clear! :-) But seriously, I think what's it's trying to say is that you can't just select an arbitrary region of the org file and refile it: it has to satisfy some constraints. For example, if you start at a level 2 headline, the region cannot then include a level 1 headline further down; it can only include level 2 and lower headlines. The error message from the function when you try something illegal is much clearer than the long explanation above: The region is not a (sequence of) subtree(s) Maybe the doc string should say: ... However, the region must satisfy some constraints: it has to be a subtree (or a sequence of subtrees). Would that be clear enough? Clear enough for me to understand at least, thanks! An alternative and more verbose wording could be something like: However, the region must fulfil the requirement that all the included headings are on the same level as the first one or below (i.e. a subtree or sequence of subtrees). Best, Štěpán ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: `org-refile' doc string
Štěpán Němec step...@gmail.com wrote: Nick Dokos nicholas.do...@hp.com writes: ... Maybe the doc string should say: ... However, the region must satisfy some constraints: it has to be a subtree (or a sequence of subtrees). Would that be clear enough? Clear enough for me to understand at least, thanks! An alternative and more verbose wording could be something like: However, the region must fulfil the requirement that all the included headings are on the same level as the first one or below (i.e. a subtree or sequence of subtrees). Best, Štěpán OK - here's a patch - mostly Štěpán's wording. Thanks, Nick diff --git a/lisp/org.el b/lisp/org.el index 9920504..748c140 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9556,9 +9556,9 @@ Depending on `org-reverse-note-order', the new subitem will either be the first or the last subitem. If there is an active region, all entries in that region will be moved. -However, the region must fulfil the requirement that the first heading -is the first one sets the top-level of the moved text - at most siblings -below it are allowed. +However, the region must fulfill the requirement that all the included +headings are on the same level as the first one or below (i.e. it must +be a subtree or a sequence of subtrees.) With prefix arg GOTO, the command will only visit the target location, not actually move anything. ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-refile bug
I applied your patch, thanks. I am not sure if I understand you correctly, but there *is* completion support at that prompt. - Carsten On Mar 19, 2010, at 3:19 AM, Jason Dunsmore wrote: Carsten Dominik carsten.domi...@gmail.com writes: I think your analysis is correct. The bookmark-set function is always called *after* the note has been inserted at the target location. So even if it fails, the note should not disappear. Without a reproducible test case, it is difficult to do more here. I was mistaken. It doesn't have to do with the bookmark function. It looks like org-refile-get-location was failing to handle the case where the refile entry was invalid. I was used to typing just the header name at the refile prompt and I didn't realize the file name was in parenthesis. Here is a quick fix to prevent the entry from being lost: --8---cut here---start-8--- diff --git a/lisp/org.el b/lisp/org.el index 4876173..feb13db 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9481,15 +9481,17 @@ See also `org-refile-use-outline-path' and `org-completion (if (equal (car org-refile-history) (nth 1 org-refile- history)) (pop org-refile-history))) pa) - (when (string-match \\`\\(.*\\)/\\([^/]+\\)\\' answ) - (setq parent (match-string 1 answ) - child (match-string 2 answ)) - (setq parent-target (or (assoc parent tbl) (assoc (concat parent /) tbl) - (when (and parent-target - (or (eq new-nodes t) - (and (eq new-nodes 'confirm) - (y-or-n-p (format Create new node \%s \? child - (org-refile-new-child parent-target child)) + (if (string-match \\`\\(.*\\)/\\([^/]+\\)\\' answ) + (progn + (setq parent (match-string 1 answ) + child (match-string 2 answ)) + (setq parent-target (or (assoc parent tbl) (assoc (concat parent /) + (when (and parent-target + (or (eq new-nodes t) + (and (eq new-nodes 'confirm) + (y-or-n-p (format Create new node \%s\? child + (org-refile-new-child parent-target child))) + (error Invalid location.) (defun org-refile-new-child (parent-target child) Use refile target PARENT-TARGET to add new CHILD below it. --8---cut here---end---8--- A better solution would be to do a tab completion when trying to enter an invalid entry, but this is beyond my current knowledge of elisp. Regards, Jason - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-refile bug
Carsten Dominik carsten.domi...@gmail.com writes: A better solution would be to do a tab completion when trying to enter an invalid entry I am not sure if I understand you correctly, but there *is* completion support at that prompt. What I meant was: show the possible completions whenever an incomplete entry is entered. Here is an example of this in Emacs: - Type M-x Info RET. - The prompt shows M-x Info-. - Type RET again. - A *Completions* buffer shows a list of all choices starting with Info-. - Type M-x Info-asdf RET. - The prompt shows M-x Info-asdf [No match] and continues to prompt the user. This prevents invalid input. Can something like this be used in the org refile prompts? Regards, Jason ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-refile bug
On Mar 17, 2010, at 5:33 PM, Mikael Fornius wrote: This goes beyond my knowledge of org-remember. Maybe it has something to do with corrupt org-*-last-stored data if the last org-entry data is removed or changed? Just guessing here... I tried to corrupt the data myself, then did bookmark-load and org-remember C-1 C-c C-c but then it worked. When looking briefly in org-remember.el I could not find any bookmark-* function call that looked like it was depending on its success. Just so you have not forgotten: did you search all your org-agenda- files if the entry was misplaced somewhere? Someone with better knowledge of org-remember then me can sort this out? I think your analysis is correct. The bookmark-set function is always called *after* the note has been inserted at the target location. So even if it fails, the note should not disappear. Without a reproducible test case, it is difficult to do more here. - Carsten ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-refile bug
Carsten Dominik carsten.domi...@gmail.com writes: I think your analysis is correct. The bookmark-set function is always called *after* the note has been inserted at the target location. So even if it fails, the note should not disappear. Without a reproducible test case, it is difficult to do more here. I was mistaken. It doesn't have to do with the bookmark function. It looks like org-refile-get-location was failing to handle the case where the refile entry was invalid. I was used to typing just the header name at the refile prompt and I didn't realize the file name was in parenthesis. Here is a quick fix to prevent the entry from being lost: --8---cut here---start-8--- diff --git a/lisp/org.el b/lisp/org.el index 4876173..feb13db 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9481,15 +9481,17 @@ See also `org-refile-use-outline-path' and `org-completion (if (equal (car org-refile-history) (nth 1 org-refile-history)) (pop org-refile-history))) pa) - (when (string-match \\`\\(.*\\)/\\([^/]+\\)\\' answ) - (setq parent (match-string 1 answ) - child (match-string 2 answ)) - (setq parent-target (or (assoc parent tbl) (assoc (concat parent /) tbl) - (when (and parent-target - (or (eq new-nodes t) - (and (eq new-nodes 'confirm) - (y-or-n-p (format Create new node \%s\? child - (org-refile-new-child parent-target child)) + (if (string-match \\`\\(.*\\)/\\([^/]+\\)\\' answ) + (progn + (setq parent (match-string 1 answ) + child (match-string 2 answ)) + (setq parent-target (or (assoc parent tbl) (assoc (concat parent /) + (when (and parent-target + (or (eq new-nodes t) + (and (eq new-nodes 'confirm) + (y-or-n-p (format Create new node \%s\? child + (org-refile-new-child parent-target child))) + (error Invalid location.) (defun org-refile-new-child (parent-target child) Use refile target PARENT-TARGET to add new CHILD below it. --8---cut here---end---8--- A better solution would be to do a tab completion when trying to enter an invalid entry, but this is beyond my current knowledge of elisp. Regards, Jason ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile bug
I can non reproduce this problem. I Also use current release_6.34c.210.g6976 and tried with basic completion, ido-completion and iswitchb. Can you give some more information? Warnings in *Messages* and maybe M-x toggle-debug-on-error gives backtrace? -- Mikael Fornius ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile bug
Mikael Fornius m...@abc.se writes: I can non reproduce this problem. I Also use current release_6.34c.210.g6976 and tried with basic completion, ido-completion and iswitchb. Can you give some more information? Warnings in *Messages* and maybe M-x toggle-debug-on-error gives backtrace? Thanks for looking into this. There were no warnings or errors. It just silently failed to file the entry in my org file. Only status messages were shown in *Messages*. It has to do with the contents of my ~/.emacs.d/bookmarks file. When it wasn't working, my bookmarks file contained the following: $ cat .emacs.d/bookmarks Emacs Bookmark Format Version 1 ;;; This format is meant to be slightly human-readable; ;;; nevertheless, you probably don't want to edit it. ;;; -*- End Of Bookmark File Format Version Stamp -*- ((org-refile-last-stored (filename . ~/repo/org/todo.org) (front-context-string . *** Buy some tom) (rear-context-string . se\n** Gardening\n) (position . 1030)) (org-remember-last-stored (filename . ~/repo/org/todo.org) (front-context-string . *** TODO Buy som) (rear-context-string . se\n** Gardening\n) (position . 874)) ) I removed the file and then refiling from org-remember using C-1 C-c C-c began working. After a successful test, the contents were: $ cat .emacs.d/bookmarks Emacs Bookmark Format Version 1 ;;; This format is meant to be slightly human-readable; ;;; nevertheless, you probably don't want to edit it. ;;; -*- End Of Bookmark File Format Version Stamp -*- ((org-refile-last-stored (filename . ~/repo/org/todo.org) (front-context-string . ** test\n* Misc\n*) (rear-context-string . SEARCH\n\n* Inbox\n) (position . 318)) (org-remember-last-stored (filename . ~/repo/org/todo.org) (front-context-string . ** test\n* Misc\n*) (rear-context-string . SEARCH\n\n* Inbox\n) (position . 318)) ) Any idea what the problem is? ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile bug
This goes beyond my knowledge of org-remember. Maybe it has something to do with corrupt org-*-last-stored data if the last org-entry data is removed or changed? Just guessing here... I tried to corrupt the data myself, then did bookmark-load and org-remember C-1 C-c C-c but then it worked. When looking briefly in org-remember.el I could not find any bookmark-* function call that looked like it was depending on its success. Just so you have not forgotten: did you search all your org-agenda-files if the entry was misplaced somewhere? Someone with better knowledge of org-remember then me can sort this out? -- Mikael Fornius ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: Org refile within current buffer?
Ryan Thompson r...@thompsonclan.org writes: Is there an org-mode command to refile only within the current buffer? Not natively unless you want to make that a global change. You could easily create a function that does that though I think. Just bind that to your favourite key sequence or use M-x my-refile (defun my-refile () (interactive) (let ((org-refile-targets '((nil :maxlevel . 5 (org-refile))) HTH, Bernt ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile to top-level heading
Nathaniel Flath flat0...@gmail.com writes: Is there a way to use org-refile to refile an item as a top-level heading in some file? Looking into this, there only seems to be a way to file as a subheading. Yes that is indeed possible with the following settings: (setq org-outline-path-complete-in-steps t) (setq org-refile-use-outline-path 'file) I believe you'll also need to make sure that you have a (:maxlevel . N) cons cell in your org-refile-targets setting. Best, Matt ___ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile refiles items to active clock
Matt Lundin m...@imapmail.org writes: I updated to the most current git version of org this morning and am finding that org-refile simply moves items to currently clocked-in item (at least when that item is in the current file) without offering a prompt for targets. I have not changed anything in my org setup since yesterday, when org-refile worked correctly. Here are my org-refile settings: Yes that's a bug. Carsten made this change for me a few days ago but it's only supposed to be active for C-2 C-c C-w. I have the same broken behaviour this morning. -Bernt ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile-targets multiple conditions
Apologies for the triple post. Gmail told me, twice, that the message was not sent. -- Myalgic encephalomyelitis denialism is causing death and severe suffering worse than MS. Greed is corrupting science into foul nonsense. Anybody can get the disease at any time permanently. Do science and justice matter to you? http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-refile gets the level wrong
Tahnks for suggesting this improvement to the documentation - it is now implemented. - Carsten On Aug 18, 2008, at 10:29 PM, Trey Jackson wrote: Bernt wrote: I think this is expected behaviour. Your startup options are conflicting. You normally have only one of showstarts or hidestars since their settings are mutually exclusive. You also only have one of odd or oddeven. I think the last encountered setting wins so your startup options are equivalent to #+STARTUP: hidestars oddeven Duh. FWIW, I was blindly cut/pasting from the *info* pages, which says: (section: 14.5 A cleaner outline view) , | 2. _Hiding leading stars_ | You can modify the display in such a way that all leading stars | become invisible. To do this in a global way, configure the | variable `org-hide-leading-stars' or change this on a per-file | basis with | | #+STARTUP: showstars | #+STARTUP: hidestars ` When I actually read it, it's obvious, but given the context, I think it'd be better to have the docs read something like: 2. _Hiding leading stars_ You can modify the display in such a way that all leading stars become invisible. To do this in a global way, configure the variable `org-hide-leading-stars' or add this line to top of the file: #+STARTUP: hidestars Note that the opposite behavior is selected with 'showstars'. TJ -- Trey Jackson [EMAIL PROTECTED] Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end. -- #2 of the Ten Commandments for C programmers ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile gets the level wrong
Bernt wrote: I think this is expected behaviour. Your startup options are conflicting. You normally have only one of showstarts or hidestars since their settings are mutually exclusive. You also only have one of odd or oddeven. I think the last encountered setting wins so your startup options are equivalent to #+STARTUP: hidestars oddeven Duh. FWIW, I was blindly cut/pasting from the *info* pages, which says: (section: 14.5 A cleaner outline view) , | 2. _Hiding leading stars_ | You can modify the display in such a way that all leading stars | become invisible. To do this in a global way, configure the | variable `org-hide-leading-stars' or change this on a per-file | basis with | | #+STARTUP: showstars | #+STARTUP: hidestars ` When I actually read it, it's obvious, but given the context, I think it'd be better to have the docs read something like: 2. _Hiding leading stars_ You can modify the display in such a way that all leading stars become invisible. To do this in a global way, configure the variable `org-hide-leading-stars' or add this line to top of the file: #+STARTUP: hidestars Note that the opposite behavior is selected with 'showstars'. TJ -- Trey Jackson [EMAIL PROTECTED] Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end. -- #2 of the Ten Commandments for C programmers ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile gets the level wrong
Trey Jackson [EMAIL PROTECTED] writes: Just started using org (6.06b). I've got .emacs customization: (setq org-log-done t) (setq org-directory ~/org/) (setq org-agenda-files (list ~/org/orgTutorial.org)) (setq org-default-notes-file ~/org/orgTutorial.org) (setq org-return-follows-link t) (setq org-blank-before-new-entry '((heading . t) (plain-list-item . nil))) And I've got a file that looks like this: , | #+STARTUP: showstars | #+STARTUP: hidestars | #+STARTUP: odd | #+STARTUP: oddeven | | * first header | | * second header | *** TODO thing to refile ` On the 'TODO' item I run M-x org-refile and when prompted enter 'first header' After refiling it looks like: , | * first header | ** TODO thing to refile | | * second header ` Note there are only two asterisks. Is this expected behavior? Or a bug? I think this is expected behaviour. Your startup options are conflicting. You normally have only one of showstarts or hidestars since their settings are mutually exclusive. You also only have one of odd or oddeven. I think the last encountered setting wins so your startup options are equivalent to #+STARTUP: hidestars oddeven -Bernt ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile question - jump to refiled note
Hi Bernt, Bernt Hansen [EMAIL PROTECTED] writes: After using org-refile (C-c C-w) on a task is there a way to jump straight to wherever it was filed away? Not yet, but Carsten just told recently, he will implement this feature. Should be in the next release (5.20). -- Jost ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: org-refile
On Dec 28, 2007, at 12:29 PM, Thomas Veulemans wrote: Carsten Dominik carsten.dominik at gmail.com writes: Hi Jose, (snip) In 5.17, you will be able to do this: (setq org-refile-use-outline-path t) The refile targets will then be represented by /-separated paths just like you suggested. Thanks. - Carsten Hi Carsten, First of all, congratulations for this amazing piece of software. Regarding the new variable, would it be possible to add an option to include the name of the file as the first level of the hierarchy? Rationale: my current setup involves several org files, and it would be great to be able to first select the file and then apply the logic described above. Good idea. This will be (setq org-refile-use-outline-path 'file) in the next release (5.18) Thanks. - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile
Carsten Dominik carsten.dominik at gmail.com writes: Hi Jose, (snip) In 5.17, you will be able to do this: (setq org-refile-use-outline-path t) The refile targets will then be represented by /-separated paths just like you suggested. Thanks. - Carsten Hi Carsten, First of all, congratulations for this amazing piece of software. Regarding the new variable, would it be possible to add an option to include the name of the file as the first level of the hierarchy? Rationale: my current setup involves several org files, and it would be great to be able to first select the file and then apply the logic described above. Cheers, Thomas ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile
Carsten Dominik [EMAIL PROTECTED] writes: Hi Jose, In 5.17, you will be able to do this: (setq org-refile-use-outline-path t) The refile targets will then be represented by /-separated paths just like you suggested. Thanks. What can I say? Excellent Cannot wait for the new release :) Thanks a lot, Carsten Jose -- In this world, there are only two tragedies. One is not getting what one wants, and the other is getting it. - Oscar Wilde pgpwKpDQkmW1x.pgp Description: PGP signature ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: org-refile
Carsten Dominik [EMAIL PROTECTED] writes: Hi Jose, The idea of using the org-goto interface (which is what org-remember-handler uses for interactive filing), but IIRC Max has pointed out correctly that this interface is way too slow for this task. It is OK for occasional use, and if you are comfortable with it, you can use it during remember to file your note. However, if remember has collected some 10 tasks during a day and you need to go through this interface 10 times in succession, you will immediately get tired of it. Opening another window and doing cut-and-paste from one window to the other would probably be better. I see... yes, I agree with your point here. It might be worth looking into disambiguating (is that a word???) duplicate headlines, or indeed make the hierarchy look like a path or even complete like find-file. Not a bad idea at all. C-c r o Implement way to distinguish identical headlines for org-refile C-c C-c Excellent! If you find the time, my vote goes for the find-file-like interface (one could even choose among different org files that way, with the current one as default). Thanks, and please keep up the awesome job. Jose -- They say when you play a Microsoft CD backwards you can hear satanic messages...but that's nothing, if you play it forward it will install windows! ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode