From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: new LaTeX exporter hook Date: Fri, 06 Jul 2012 13:41:18 +0200 Message-ID: <87fw95qfq9.fsf@gmail.com> References: <87aa0zxpmy.fsf@med.uni-goettingen.de> <81ipfnb0dt.fsf@gmail.com> <87wr43axj1.fsf@gmail.com> <87wr42wpf7.fsf@med.uni-goettingen.de> <878vex1fob.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:55945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sn6xo-00018F-I7 for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 07:44:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sn6xh-0007mB-Mp for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 07:44:44 -0400 In-Reply-To: <878vex1fob.fsf@altern.org> (Bastien's message of "Fri, 06 Jul 2012 10:01:40 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Andreas Leha , emacs-orgmode@gnu.org Hello, Bastien writes: > Andreas Leha 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=20 > value for =CC=80org-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=20 > 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, --=20 Nicolas Goaziou