emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] new LaTeX exporter hook


From: Nicolas Goaziou
Subject: Re: [O] new LaTeX exporter hook
Date: Fri, 06 Jul 2012 13:41:18 +0200

Hello,

Bastien <address@hidden> writes:

> Andreas Leha <address@hidden> 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 via email to

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