[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-export-section-number-format does not work
From: |
Nick Dokos |
Subject: |
Re: [O] org-export-section-number-format does not work |
Date: |
Tue, 09 Jul 2013 00:22:09 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Jisang Yoo <address@hidden> writes:
> On Mon, Jul 8, 2013 at 5:21 PM, Bastien <address@hidden> wrote:
>> Hi Jisang,
>>
>> Jisang Yoo <address@hidden> 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
- [O] org-export-section-number-format does not work, Jisang Yoo, 2013/07/07
- Re: [O] org-export-section-number-format does not work, Bastien, 2013/07/08
- Re: [O] org-export-section-number-format does not work, Jisang Yoo, 2013/07/08
- Re: [O] org-export-section-number-format does not work, Bastien, 2013/07/08
- Re: [O] org-export-section-number-format does not work, Jisang Yoo, 2013/07/08
- Re: [O] org-export-section-number-format does not work, Bastien, 2013/07/08
- Re: [O] org-export-section-number-format does not work, Nicolas Goaziou, 2013/07/08
- Re: [O] org-export-section-number-format does not work,
Nick Dokos <=
- Re: [O] org-export-section-number-format does not work, Bastien, 2013/07/09