summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-08-26 11:20:02 +0200
committerBastien Guerry <bzg@altern.org>2012-08-26 11:20:02 +0200
commit74d1658c601edc8d25d909aac566c5c1dd0f2e38 (patch)
tree4132af043d8495b0f05cf70cfbf8afda8e2e7c3f
parentee9e27e66eb8abe0822ba1e10859f02a3c5675da (diff)
downloadorg-mode-74d1658c601edc8d25d909aac566c5c1dd0f2e38.tar.gz
org-agenda.el (org-agenda-refile): Fix bug when refiling an sticky agenda entry
* org-agenda.el (org-agenda-refile): Fix bug when refiling an entry from a sticky agenda. Thanks a lot to Moritz Ulrich for reporting this.
-rw-r--r--lisp/org-agenda.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 98fb9e2..f856a28 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7502,7 +7502,8 @@ If this information is not given, the function uses the tree at point."
(interactive "P")
(if (equal goto '(16))
(org-refile-goto-last-stored)
- (let* ((marker (or (org-get-at-bol 'org-hd-marker)
+ (let* ((buffer-orig (buffer-name))
+ (marker (or (org-get-at-bol 'org-hd-marker)
(org-agenda-error)))
(buffer (marker-buffer marker))
(pos (marker-position marker))
@@ -7515,7 +7516,8 @@ If this information is not given, the function uses the tree at point."
(save-restriction
(widen)
(goto-char marker)
- (org-remove-subtree-entries-from-agenda)
+ (let ((org-agenda-buffer-name buffer-orig))
+ (org-remove-subtree-entries-from-agenda))
(org-refile goto buffer rfloc)))))
(unless no-update (org-agenda-redo))))