From 42480fde9ea4f8e54db085dd7d34d9101deeabfe Mon Sep 17 00:00:00 2001 From: Sebastien Vauban Date: Thu, 29 Sep 2011 11:12:07 +0200 Subject: [PATCH] Add heading string to refile message. --- lisp/org.el | 24 +++++++++++++++++------- 1 files changed, 17 insertions(+), 7 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 5961fde..b6a3a9b 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10470,14 +10470,23 @@ 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))))) + (let ((heading-string nil) + (eoh nil)) + (save-excursion + (unless goto + (org-back-to-heading t) + (setq eoh (save-excursion + (outline-end-of-heading) (point))) + (setq heading-string + (buffer-substring-no-properties + (point) eoh))) + (org-refile-get-location + (cond (goto "Goto") + (regionp "Refile region to") + (t (concat "Refile subtree \"" + heading-string "\" 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