emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Refiling All 'Terminal TODO State' Entries to a Particular Heading


From: Ihor Radchenko
Subject: Re: Refiling All 'Terminal TODO State' Entries to a Particular Heading
Date: Wed, 12 May 2021 22:54:58 +0800

Tim Visher <tim.visher@gmail.com> writes:
>
> I found that my timvisher-org-refile-done-entries had a bug where it could
> skip entries if the org buffer had consecutive DONE/CANCELLED entries. I
> believe this is because of this quote from the manual:
>
> After evaluation, Org moves point to the end of the line that was just
> processed. Search continues from that point forward. This may not always
> work as expected under some conditions, such as if the current sub-tree was
> removed by a previous archiving operation. In such rare circumstances, Org
> skips the next entry entirely when it should not. To stop Org from such
> skips, make FUNC set the variable ‘org-map-continue-from’ to a specific
> buffer position.

I think the easiest would be using markers. You can collect the list of
headline markers in org-map-entries without modifying buffer. Then, you
mapc over the list of markers and refile the corresponding headings. You
will not need to worry about point moving due to changes in buffer as
markers will not be affected by buffer changes.

Hope it helps.

Best,
Ihor



reply via email to

[Prev in Thread] Current Thread [Next in Thread]