diff options
author | Markus Hauck <markus1189@gmail.com> | 2014-04-07 19:21:43 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2014-04-11 11:59:43 +0200 |
commit | faa1703b8f9c2bc2d1b9317c29fde75b764f41fc (patch) | |
tree | aa97b3b9104828790aef9af35abbac39642055e0 | |
parent | d6a38604e6154091f2357e0dd5e42c233bc6663c (diff) | |
download | org-mode-faa1703b8f9c2bc2d1b9317c29fde75b764f41fc.tar.gz |
org.el (org-refile): Allow org-refile goto from everywhere
* lisp/org-agenda.el (org-refile): Flip logic to allow instead of
prohibit the use of `org-refile' with the goto flat from non
org-mode buffers.
In commit 49da67d the condition was changed from only
`(unless goto ...)` to `(unless (and goto (listp arg)) ...)`
where the `and` condition is only true for non-empty lists, so that
calling `(org-refile t)` complains about not being inside an org-mode
buffer.
With this patch org-refile can be used (again) from anywhere when
passed the goto flag to jump to the chosen task.
TINYCHANGE
-rw-r--r-- | lisp/org.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org.el b/lisp/org.el index 775d5dd..560d423 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -11566,13 +11566,13 @@ prefix argument (`C-u C-u C-u C-c C-w')." (setq it (or rfloc (let (heading-text) (save-excursion - (unless (and goto (listp goto)) + (unless (or goto (listp goto)) (org-back-to-heading t) (setq heading-text (nth 4 (org-heading-components)))) (org-refile-get-location - (cond ((and goto (listp goto)) "Goto") + (cond ((or goto (listp goto)) "Goto") (regionp (concat actionmsg " region to")) (t (concat actionmsg " subtree \"" heading-text "\" to"))) |