[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Using org-map-entries with org-export-before-processing-hook
From: |
Eric Abrahamsen |
Subject: |
Re: [O] Using org-map-entries with org-export-before-processing-hook |
Date: |
Thu, 07 Mar 2013 08:44:30 +0800 |
User-agent: |
Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2 (gnu/linux) |
Nicolas Goaziou <address@hidden> writes:
> Eric Abrahamsen <address@hidden> 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