From 02c57d0f8d60d18be664eff0657e813ac297250f Mon Sep 17 00:00:00 2001 From: Sebastien Vauban Date: Wed, 12 Oct 2011 07:08:22 +0200 Subject: [PATCH] Use the text of the heading when asking where to refile an entry. --- lisp/org.el | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b26e1a3..c033b9e 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10481,14 +10481,19 @@ prefix argument (`C-u C-u C-u C-c C-w')." (marker-position org-clock-hd-marker))) (setq goto nil))) (setq it (or rfloc - (save-excursion - (unless goto (org-back-to-heading t)) - (org-refile-get-location - (cond (goto "Goto") - (regionp "Refile region to") - (t "Refile subtree to")) default-buffer - org-refile-allow-creating-parent-nodes - goto))))) + (let (heading-text) + (save-excursion + (unless goto + (org-back-to-heading t) + (setq heading-text + (nth 4 (org-heading-components)))) + (org-refile-get-location + (cond (goto "Goto") + (regionp "refill-mode region to") + (t (concat "Refile subtree \"" + heading-text "\" to"))) + default-buffer + org-refile-allow-creating-parent-nodes)))))) (setq file (nth 1 it) re (nth 2 it) pos (nth 3 it)) -- 1.7.5.1