Nicolas Goaziou <n.goaz...@gmail.com> writes:

> Eric Abrahamsen <e...@ericabrahamsen.net> writes:
>
>>> The problem is not directly related to the export framework, but to its
>>> relationship with `org-map-entries'.
>>>
>>> If you use the following function:
>>>
>>>   (defun before-export-test (backend)
>>>     ;; (org-map-entries 'test-map "TODO=\"TODO\"" 'file)
>>>     (while (re-search-forward "^\\*+ TODO" nil t)
>>>       (test-map)))
>>>
>>> it should work.
>>>
>>> I don't know why `org-map-entries' behaves badly with export. Meanwhile,
>>> I suggest to not use this function for export hooks.
>>
>> That'll work! Thanks for looking at this.
>
> I think I fixed the problem wrt `org-map-entries' and export.
>
> You cannot use `file' scope, since it refers to the base buffer
> associated to the current buffer file name, which never is the buffer
> where the export process takes place.

Whoa, not only does it work, it leaves the original buffer unmodified,
as per my wishlist. Many thanks! I don't know when you find the time to
sleep.

E


Reply via email to