summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2013-03-08 10:33:19 +0100
committerBastien Guerry <bzg@altern.org>2013-03-08 10:33:19 +0100
commita2e39d98b81fb03e1a675ded1a5f1d2b71eef9b2 (patch)
tree5d9e2c72c26513c6e7f0d2166cbb4754fea3ad00
parent72879342d8ba67fe3b1f3f8cb67f37bfffa1a529 (diff)
downloadorg-mode-a2e39d98b81fb03e1a675ded1a5f1d2b71eef9b2.tar.gz
org-agenda.el (org-agenda-refile): Enhance docstring. Allow to clear the refile cache with C-0 or C-u C-u C-u
* org-agenda.el (org-agenda-refile): Enhance docstring. Allow to clear the refile cache with C-0 or C-u C-u C-u.
-rw-r--r--lisp/org-agenda.el17
1 files changed, 13 insertions, 4 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 3020213..be9742d 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8133,10 +8133,19 @@ If this information is not given, the function uses the tree at point."
(beginning-of-line 0))))))
(defun org-agenda-refile (&optional goto rfloc no-update)
- "Refile the item at point."
+ "Refile the item at point.
+
+When GOTO is 0 or '(64), clear the refile cache.
+When GOTO is '(16), go to the location of the last refiled item.
+RFLOC can be a refile location obtained in a different way.
+When NO-UPDATE is non-nil, don't redo the agenda buffer."
(interactive "P")
- (if (equal goto '(16))
- (org-refile-goto-last-stored)
+ (cond
+ ((member goto '(0 (64)))
+ (org-refile-cache-clear))
+ ((equal goto '(16))
+ (org-refile-goto-last-stored))
+ (t
(let* ((buffer-orig (buffer-name))
(marker (or (org-get-at-bol 'org-hd-marker)
(org-agenda-error)))
@@ -8154,7 +8163,7 @@ If this information is not given, the function uses the tree at point."
(let ((org-agenda-buffer-name buffer-orig))
(org-remove-subtree-entries-from-agenda))
(org-refile goto buffer rfloc)))))
- (unless no-update (org-agenda-redo))))
+ (unless no-update (org-agenda-redo)))))
(defun org-agenda-open-link (&optional arg)
"Open the link(s) in the current entry, if any.