[-- Attachment #1: Type: text/plain, Size: 320 bytes --] Hello, I found it difficult, sometimes, to remember which subtree we're gonna refile. When TAB'ing for multiple targets, you loose your source buffer, and can easily forget which exact subtree you had selected. Here a patch to add the name of the subtree we're operating on. Best regards, Seb -- Sebastien Vauban [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Add-heading-string-to-refile-message.patch --] [-- Type: text/x-patch, Size: 1515 bytes --] From 42480fde9ea4f8e54db085dd7d34d9101deeabfe Mon Sep 17 00:00:00 2001 From: Sebastien Vauban <sva-D0wtAvR13HarG/iDocfnWg@public.gmane.org> 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
Hi Sebastien,
can you please resubmit a modified patch using either (org-get-heading t t)
or (nth 4 (org-heading-components))
?
Thanks!
- Carsten
On 29.9.2011, at 11:19, Sebastien Vauban wrote:
> Hello,
>
> I found it difficult, sometimes, to remember which subtree we're gonna refile.
> When TAB'ing for multiple targets, you loose your source buffer, and can
> easily forget which exact subtree you had selected.
>
> Here a patch to add the name of the subtree we're operating on.
>
> Best regards,
> Seb
>
> --
> Sebastien Vauban
> <0001-Add-heading-string-to-refile-message.patch>
Hi Carsten,
Carsten Dominik wrote:
>> I found it difficult, sometimes, to remember which subtree we're gonna refile.
>> When TAB'ing for multiple targets, you loose your source buffer, and can
>> easily forget which exact subtree you had selected.
>>
>> Here a patch to add the name of the subtree we're operating on.
>
> can you please resubmit a modified patch using either (org-get-heading t t)
> or (nth 4 (org-heading-components))
Thanks for looking at it.
I'll do!
Best regards,
Seb
--
Sebastien Vauban
[-- Attachment #1: Type: text/plain, Size: 672 bytes --] Hi Carsten, "Sebastien Vauban" wrote: > Carsten Dominik wrote: >>> I found it difficult, sometimes, to remember which subtree we're gonna >>> refile. When TAB'ing for multiple targets, you loose your source buffer, >>> and can easily forget which exact subtree you had selected. >>> >>> Here a patch to add the name of the subtree we're operating on. >> >> can you please resubmit a modified patch using either (org-get-heading t t) >> or (nth 4 (org-heading-components)) > > Thanks for looking at it. > > I'll do! Here it is: a modified version which only uses the text of the entry when asking where to refile some headline. Best regards, Seb -- Sebastien Vauban [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Use-the-text-of-the-heading-when-asking-where-to-ref.patch --] [-- Type: text/x-patch, Size: 1434 bytes --] From 02c57d0f8d60d18be664eff0657e813ac297250f Mon Sep 17 00:00:00 2001 From: Sebastien Vauban <sva-D0wtAvR13HarG/iDocfnWg@public.gmane.org> 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
[-- Attachment #1: Type: text/plain, Size: 834 bytes --] Hi Carsten, > "Sebastien Vauban" wrote: >> Carsten Dominik wrote: >>>> I found it difficult, sometimes, to remember which subtree we're gonna >>>> refile. When TAB'ing for multiple targets, you loose your source buffer, >>>> and can easily forget which exact subtree you had selected. >>>> >>>> Here a patch to add the name of the subtree we're operating on. >>> >>> can you please resubmit a modified patch using either (org-get-heading t t) >>> or (nth 4 (org-heading-components)) >> >> Thanks for looking at it. >> >> I'll do! > > Here it is: a modified version which only uses the text of the entry when > asking where to refile some headline. Please disregard http://patchwork.newartisans.com/patch/987/ as it contained 2 typos. This one is correct and can be applied straight away. Best regards, Seb -- Sebastien Vauban [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: 0001-Use-the-text-of-the-heading-when-refiling.patch --] [-- Type: text/x-patch, Size: 1417 bytes --] From e86292614425dd385af7857384853e8e6245462f Mon Sep 17 00:00:00 2001 From: Sebastien Vauban <sva-D0wtAvR13HarG/iDocfnWg@public.gmane.org> Date: Fri, 14 Oct 2011 09:18:55 +0200 Subject: [PATCH] Use the text of the heading when refiling. --- lisp/org.el | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b26e1a3..66c2507 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -10481,14 +10481,20 @@ 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 "Refile region to") + (t (concat "Refile subtree \"" + heading-text "\" to"))) + default-buffer + org-refile-allow-creating-parent-nodes + goto)))))) (setq file (nth 1 it) re (nth 2 it) pos (nth 3 it)) -- 1.7.5.1
Patch 989 (http://patchwork.newartisans.com/patch/989/) is now "Accepted". Maintainer comment: none This relates to the following submission: http://mid.gmane.org/%3C80lisogetx.fsf%40somewhere.org%3E Here is the original message containing the patch: > Content-Type: text/plain; charset="utf-8" > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > Subject: [O] Add source subtree which will be refiled > Date: Fri, 14 Oct 2011 13:25:14 -0000 > From: =?utf-8?q?S=C3=83=C2=A9bastien_Vauban_=3Cwxhgmqzgwmuf=40spammotel=2Ec?= > =?utf-8?b?b20+?= > X-Patchwork-Id: 989 > Message-Id: <80lisogetx.fsf@somewhere.org> > To: emacs-orgmode@gnu.org > > Hi Carsten, > > > "Sebastien Vauban" wrote: > >> Carsten Dominik wrote: > >>>> I found it difficult, sometimes, to remember which subtree we're gonna > >>>> refile. When TAB'ing for multiple targets, you loose your source buffer, > >>>> and can easily forget which exact subtree you had selected. > >>>> > >>>> Here a patch to add the name of the subtree we're operating on. > >>> > >>> can you please resubmit a modified patch using either (org-get-heading t t) > >>> or (nth 4 (org-heading-components)) > >> > >> Thanks for looking at it. > >> > >> I'll do! > > > > Here it is: a modified version which only uses the text of the entry when > > asking where to refile some headline. > > Please disregard http://patchwork.newartisans.com/patch/987/ as it contained 2 > typos. > > This one is correct and can be applied straight away. > > Best regards, > Seb > > > >From e86292614425dd385af7857384853e8e6245462f Mon Sep 17 00:00:00 2001 > From: Sebastien Vauban <sva@mygooglest.com> > Date: Fri, 14 Oct 2011 09:18:55 +0200 > Subject: [PATCH] Use the text of the heading when refiling. > > --- > lisp/org.el | 22 ++++++++++++++-------- > 1 files changed, 14 insertions(+), 8 deletions(-) > > diff --git a/lisp/org.el b/lisp/org.el > index b26e1a3..66c2507 100644 > --- a/lisp/org.el > +++ b/lisp/org.el > @@ -10481,14 +10481,20 @@ 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 "Refile region to") > + (t (concat "Refile subtree \"" > + heading-text "\" to"))) > + default-buffer > + org-refile-allow-creating-parent-nodes > + goto)))))) > (setq file (nth 1 it) > re (nth 2 it) > pos (nth 3 it)) > -- > 1.7.5.1 > >
Applied, thanks.
Please, provide a ChangeLog-like entry next time.
- Carsten
On 14.10.2011, at 10:25, Sebastien Vauban wrote:
> Hi Carsten,
>
>> "Sebastien Vauban" wrote:
>>> Carsten Dominik wrote:
>>>>> I found it difficult, sometimes, to remember which subtree we're gonna
>>>>> refile. When TAB'ing for multiple targets, you loose your source buffer,
>>>>> and can easily forget which exact subtree you had selected.
>>>>>
>>>>> Here a patch to add the name of the subtree we're operating on.
>>>>
>>>> can you please resubmit a modified patch using either (org-get-heading t t)
>>>> or (nth 4 (org-heading-components))
>>>
>>> Thanks for looking at it.
>>>
>>> I'll do!
>>
>> Here it is: a modified version which only uses the text of the entry when
>> asking where to refile some headline.
>
> Please disregard http://patchwork.newartisans.com/patch/987/ as it contained 2
> typos.
>
> This one is correct and can be applied straight away.
>
> Best regards,
> Seb
>
> --
> Sebastien Vauban
> <0001-Use-the-text-of-the-heading-when-refiling.patch>