From 60755599a0c62951a3c8f29099c521e87e440b38 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 29 Mar 2010 14:22:46 +0200 Subject: [PATCH] Revert "Refactor refiling code" This reverts commit 84e8434337ea86cd242bac6227232fa6e1f5fb6f. --- lisp/org-agenda.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 61ddfd0de..f16291ae3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6215,15 +6215,18 @@ If this information is not given, the function uses the tree at point." (let* ((marker (or (org-get-at-bol 'org-hd-marker) (org-agenda-error))) (buffer (marker-buffer marker)) - (pos (marker-position marker))) + (pos (marker-position marker)) + (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 (widen) (goto-char marker) - (org-refile goto buffer rfloc) - (with-current-buffer "*Org Agenda*" - (org-agenda-redo)))))))) + (org-remove-subtree-entries-from-agenda) + (org-refile goto buffer rfloc))))))) (defun org-agenda-open-link (&optional arg) "Follow the link in the current line, if any. -- 2.11.4.GIT