From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: modify postamble in html export Date: Fri, 20 Sep 2013 17:25:43 +0200 Message-ID: <87pps35xc8.fsf@gmail.com> References: <523C4AFC.801@riseup.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN2ad-0001Z2-U5 for emacs-orgmode@gnu.org; Fri, 20 Sep 2013 11:25:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VN2aX-0005CG-Oi for emacs-orgmode@gnu.org; Fri, 20 Sep 2013 11:25:51 -0400 Received: from mail-bk0-f51.google.com ([209.85.214.51]:44472) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VN2aX-0005C5-GU for emacs-orgmode@gnu.org; Fri, 20 Sep 2013 11:25:45 -0400 Received: by mail-bk0-f51.google.com with SMTP id mx10so245005bkb.38 for ; Fri, 20 Sep 2013 08:25:29 -0700 (PDT) In-Reply-To: <523C4AFC.801@riseup.net> (pw@riseup.net's message of "Fri, 20 Sep 2013 15:17:48 +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: pw Cc: eric@ericabrahamsen.net, emacs-orgmode@gnu.org Hello, pw writes: >> You can override the whole thing by re-defining the `org-html-postable' >> variable. Set it to a function which returns the string you want: >> >> (defun my-org-html-postamble () >> (format "Last update : %s" (format-time-string "%d %b %Y"))) >> >> (setq org-html-postamble 'my-org-html-postamble) >> >> I didn't test that, but something like that ought to work. > > Thanks! > > I tried to paste your code into my .emacs and I received the following > error when publishing : > > "org-html--build-pre/postamble: Wrong number of arguments: (lambda nil > (format "Last update : %s" (format-time-string "%d %b %Y"))), 1" > > I don't know where is the problem. According to `org-html-postamble' docstring, the function has to accept one argument. > I tried then to do the same by modifying the variable "Org Export HTML > Postamble Format". The default format is : > > '(("en" "

Author: %a (%e)

\n

class=\"date\">Date: %d

\n

%c

\n

class=\"xhtml-validation\">%v

")) > > So I changed it to (with the idea to change the string format (%s) > later if working) : > > '(("en"

Last update: %s

")) > > (which add to my .emacs : '(org-html-postamble-format (quote (("en" > "

Last update: %s

")))) > > But it does not change at all the postamble ""Created: 2013-09-19 jeu. > 14:09"". > > So I'm stuck! Again, according to `org-html-postamble' docstring, you need to set that variable to t in order to use `org-html-postamble-format'. Then, by looking at `org-html-postamble-format' docstring, you can see that only %t, %a, %e, %d, %c, %v, %T and %C are allowed as format characters. HTH, Regards, -- Nicolas Goaziou