summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernt Hansen <bernt@norang.ca>2009-08-20 15:36:00 -0400
committerBernt Hansen <bernt@norang.ca>2009-08-25 10:05:14 -0400
commit9ec5529af0e794b02b10645fa51cb53c7a53bc8e (patch)
tree3caff761ad642afa78fb10f32a52685ff5c4b7fd
parentbabb63a27fbd5c050670753c908d543b4f5d5978 (diff)
downloadorg-mode-9ec5529af0e794b02b10645fa51cb53c7a53bc8e.tar.gz
Fix jumping to last refile location in agenda
C-u C-u C-c C-w now goes to the last refile location in the agenda. This is the same behaviour as org-refile (when used in an org file)
-rw-r--r--lisp/org-agenda.el22
1 files changed, 11 insertions, 11 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 073e668..83e8dd6 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -5475,14 +5475,17 @@ If this information is not given, the function uses the tree at point."
(defun org-agenda-refile (&optional goto rfloc)
"Refile the item at point."
(interactive "P")
- (let* ((marker (or (get-text-property (point) 'org-hd-marker)
- (org-agenda-error)))
- (buffer (marker-buffer marker))
- (pos (marker-position marker))
- (rfloc (or rfloc
- (org-refile-get-location
- (if goto "Goto: " "Refile to: ") buffer
- org-refile-allow-creating-parent-nodes))))
+ (if (equal goto '(16))
+ (org-refile-goto-last-stored)
+ (let* ((marker (or (get-text-property (point) 'org-hd-marker)
+ (org-agenda-error)))
+ (buffer (marker-buffer marker))
+ (pos (marker-position marker))
+ (rfloc))
+ (setq rfloc (or rfloc
+ (org-refile-get-location
+ (if goto "Goto: " "Refile to: ") buffer
+ org-refile-allow-creating-parent-nodes))))
(with-current-buffer buffer
(save-excursion
(save-restriction
@@ -5491,9 +5494,6 @@ If this information is not given, the function uses the tree at point."
(org-remove-subtree-entries-from-agenda)
(org-refile goto buffer rfloc))))))
-
-
-
(defun org-agenda-open-link ()
"Follow the link in the current line, if any."
(interactive)