emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: Andreas Leha <andreas.leha@med.uni-goettingen.de>, emacs-orgmode@gnu.org
Subject: Re: new LaTeX exporter hook
Date: Fri, 06 Jul 2012 13:41:18 +0200	[thread overview]
Message-ID: <87fw95qfq9.fsf@gmail.com> (raw)
In-Reply-To: <878vex1fob.fsf@altern.org> (Bastien's message of "Fri, 06 Jul 2012 10:01:40 +0200")

Hello,

Bastien <bzg@gnu.org> writes:

> Andreas Leha <andreas.leha@med.uni-goettingen.de> writes:
>
>> Hi Jambunathan and Nicolas,
>>
>>
>>>>> the new LaTeX exporter does not seem to "run" the
>>>>> org-export-latex-final-hook.  Is there an equivalent?
>>>>
>>>> You are looking for `:filter-final-output' within
>>>> `org-export-filters-alist'.
>
> Would that be useful to let the filters fall back on existing 
> value for ̀org-export-BACKEND-final-hook' and other hooks?

I'm not sure to understand. There is no such hook. Also, there are
differences between filters and current export hooks:

  - filters are applied on a string, current export hooks on a buffer;

  - filters provide the back-end called, current export hooks rely on
    a global variable that has been removed;

  - While run with arguments, filters are not equivalent to
    `run-hook-with-args' since they heavily rely on value returned;

  - filters from users and from developers are clearly separated, which
    allows the latter to always be executed before the former.

Now, as an exception, final output filters could be executed on a buffer
in a hook (by writing the string output to a temp buffer), but since
filters are so common in the new export engine, that extra step is
needed.

> Thus people won't have to change their configuration, plus hooks 
> are more familiar to Emacsers.

  (add-to-list 'org-export-filter-final-output-functions 'my-function)

vs

  (org-add-hook 'org-export-final-output-hook 'my-function)

I'm not sure the difference is worth the hassle.


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2012-07-06 11:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23  8:33 new LaTeX exporter hook Andreas Leha
2012-05-23 11:30 ` Jambunathan K
2012-05-23 12:32   ` Nicolas Goaziou
2012-05-23 21:36     ` Andreas Leha
2012-07-06  8:01       ` Bastien
2012-07-06 11:41         ` Nicolas Goaziou [this message]

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=87fw95qfq9.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=andreas.leha@med.uni-goettingen.de \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    /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).