From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Patch: HTML body onload/onunload attribute support for new exporter Date: Wed, 17 Oct 2012 15:50:19 +0200 Message-ID: <87vce9mcmc.fsf@gmail.com> References: <507EB0A8.4020903@mpip-mainz.mpg.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:45662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOU51-0001uE-0J for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 09:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TOU4w-0006pE-JA for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 09:54:38 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:54187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TOU4w-0006p1-D2 for emacs-orgmode@gnu.org; Wed, 17 Oct 2012 09:54:34 -0400 Received: by mail-wi0-f169.google.com with SMTP id hq4so575998wib.0 for ; Wed, 17 Oct 2012 06:54:33 -0700 (PDT) In-Reply-To: <507EB0A8.4020903@mpip-mainz.mpg.de> (Robert Klein's message of "Wed, 17 Oct 2012 15:20: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: Robert Klein Cc: emacs-orgmode@gnu.org Hello, Robert Klein writes: > I created a patch for the new exporter, so I can adding onload and > onunload attributes to the body tag in HTML export. > > > I'm rather new to emacs lisp, please check if this is to be included > in org-mode. Before reviewing the patch, I'd like to know if the onload and onunload attributes are common enough to justify the creation of a variable. Indeed, it's already quite easy to achieve the same using personal filters. I.e.: #+begin_src emacs-lisp (defun my-html-body-onload-filter (output backend info) "Add my onload attribute to tag, if any." (when (and (eq backend 'e-html) (string-match "\n" output)) (replace-match "\n" nil nil output))) (add-to-list 'org-export-filter-final-output-functions 'my-html-body-onload-filter) #+end_src If you think it's still worth adding variables in order to make it a tad bit easier, I'll review the patch. Thanks for your work. Regards, -- Nicolas Goaziou