emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Using org-map-entries with org-export-before-processing-hook
Date: Wed, 06 Mar 2013 14:29:19 +0100	[thread overview]
Message-ID: <87ip54zmfk.fsf@gmail.com> (raw)
In-Reply-To: <876214g6tp.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 06 Mar 2013 18:29:06 +0800")

Eric Abrahamsen <eric@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.

OTHO, a nil scope (or tree, region for that matter) should be fine with
a very recent Org.


Regards,

-- 
Nicolas Goaziou

  reply	other threads:[~2013-03-06 13:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06  3:28 Using org-map-entries with org-export-before-processing-hook Eric Abrahamsen
2013-03-06 10:13 ` Nicolas Goaziou
2013-03-06 10:29   ` Eric Abrahamsen
2013-03-06 13:29     ` Nicolas Goaziou [this message]
2013-03-07  0:44       ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ip54zmfk.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).