summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2011-10-05 16:18:18 +0200
committerCarsten Dominik <carsten.dominik@gmail.com>2011-10-05 16:23:03 +0200
commit1790d6c07378f4e2c900dd1cfe70c09d51ba2b6c (patch)
treebbfdcaad4f78ae77dbd16c0c175dba25c1c5192c
parentee3a68216b2b82807a2d3eeacf936893ed404c0c (diff)
downloadorg-mode-1790d6c07378f4e2c900dd1cfe70c09d51ba2b6c.tar.gz
Make org-refile interface for jumping to a target work before first heading
* lisp/org.el (org-refile-get-location): Ignore errors when collection heading to be excluded.
-rw-r--r--lisp/org.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/org.el b/lisp/org.el
index d1497b3..7487347 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -10477,7 +10477,8 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(cond (goto "Goto")
(regionp "Refile region to")
(t "Refile subtree to")) default-buffer
- org-refile-allow-creating-parent-nodes)))))
+ org-refile-allow-creating-parent-nodes
+ goto)))))
(setq file (nth 1 it)
re (nth 2 it)
pos (nth 3 it))
@@ -10556,16 +10557,20 @@ prefix argument (`C-u C-u C-u C-c C-w')."
(bookmark-jump "org-refile-last-stored")
(message "This is the location of the last refile"))
-(defun org-refile-get-location (&optional prompt default-buffer new-nodes)
+(defun org-refile-get-location (&optional prompt default-buffer new-nodes
+ no-exclude)
"Prompt the user for a refile location, using PROMPT.
PROMPT should not be suffixed with a colon and a space, because
this function appends the default value from
-`org-refile-history' automatically, if that is not empty."
+`org-refile-history' automatically, if that is not empty.
+When NO-EXCLUDE is set, do not exclude headlines in the current subtree,
+this is used for the GOTO interface."
(let ((org-refile-targets org-refile-targets)
(org-refile-use-outline-path org-refile-use-outline-path)
excluded-entries)
(when (and (eq major-mode 'org-mode)
- (not org-refile-use-cache))
+ (not org-refile-use-cache)
+ (not no-exclude))
(org-map-tree
(lambda()
(setq excluded-entries