From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-export-section-number-format does not work Date: Tue, 09 Jul 2013 00:22:09 -0400 Message-ID: <87y59g2wi6.fsf@gmail.com> References: <87pputfpdo.fsf@bzg.ath.cx> <87d2qtfomo.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39567) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwPRX-0005MA-Qz for emacs-orgmode@gnu.org; Tue, 09 Jul 2013 00:22:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwPRW-00081h-RX for emacs-orgmode@gnu.org; Tue, 09 Jul 2013 00:22:23 -0400 Received: from plane.gmane.org ([80.91.229.3]:50103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwPRW-00081Z-KU for emacs-orgmode@gnu.org; Tue, 09 Jul 2013 00:22:22 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UwPRU-0001oJ-VB for emacs-orgmode@gnu.org; Tue, 09 Jul 2013 06:22:20 +0200 Received: from pool-108-7-96-134.bstnma.fios.verizon.net ([108.7.96.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Jul 2013 06:22:20 +0200 Received: from ndokos by pool-108-7-96-134.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 09 Jul 2013 06:22:20 +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: emacs-orgmode@gnu.org Jisang Yoo writes: > On Mon, Jul 8, 2013 at 5:21 PM, Bastien wrote: >> Hi Jisang, >> >> Jisang Yoo writes: >> >>> There seems no new option that can be found from exploring >>> customization group org-export. >> >> You can check `org-html-format-headline-function' and its docstring >> as an example on how to customize the display of headlines in HTML. >> There are similar variables for other backends. >> >> HTH, >> >> -- >> Bastien > > (setq org-html-format-headline-function 'my-org-html-format-headline) > (defun my-org-html-format-headline (todo todo-type priority text tags) > "Returns foo." > "foo") > > results in wrong-number-of-arguments error when I export to html. > > (setq org-html-format-headline-function 'org-html-format-headline) > > also results in the same kind of error. > > I think all that's needed is to add an explicit nil at the end of the apply call in ox-html.el:org-html-format-headline--wrap, line 2246, like this: --8<---------------cut here---------------start------------->8--- ... (apply format-function todo todo-type priority text tags :headline-label headline-label :level level :section-number section-number extra-keys nil))) --8<---------------cut here---------------end--------------->8--- I'm not 100% sure about that but it seems to work for me both in the default case and also with Jisang's setting - can somebody verify? But getting there was not trivial: the CL-isms certainly do not help, primarily because I had to understand them to figure out what was going on, but also because they obscured the problem: when I tried to edebug org-html-format-headline--wrap I get ,---- | edebug-syntax-error: Invalid read syntax: "Failed matching", ([&rest | arg] [&optional ["&optional" cl-&optional-arg &rest cl-&optional-arg]] | [&optional ["&rest" arg]] [&optional ["&key" [cl-&key-arg &rest | cl-&key-arg] &optional "&allow-other-keys"]] [&optional ["&aux" &rest | &or (symbolp &optional def-form) symbolp]]) `---- and the cursor is left at the ampersand of &allow-other-keys. OTOH, when I try to edebug org-html-inlinetask which contains a similar CL-ism, there is no problem. So something is tripping edebug up but it's not clear what. -- Nick