emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: nicholas.dokos@hp.com
Cc: Org Mode Mailing List <emacs-orgmode@gnu.org>,
	Jambunathan K <kjambunathan@gmail.com>,
	Eric Schulte <eric.schulte@gmx.com>
Subject: Re: org-e-html and table of contents
Date: Thu, 23 Aug 2012 21:39:22 +0200	[thread overview]
Message-ID: <87a9xlbdp1.fsf@gmail.com> (raw)
In-Reply-To: <6157.1345750180@alphaville> (Nick Dokos's message of "Thu, 23 Aug 2012 15:29:40 -0400")

Hello,

Nick Dokos <nicholas.dokos@hp.com> writes:

> Eric Schulte <eric.schulte@gmx.com> wrote:
>
>> I'd recommend the attached patch.
>> 
>> Thanks,
>> 
>> From 228c4bbdd2fc145b135de233632e8884d1d53cd7 Mon Sep 17 00:00:00 2001
>> From: Eric Schulte <eric.schulte@gmx.com>
>> Date: Thu, 23 Aug 2012 12:41:52 -0600
>> Subject: [PATCH] Better use of default org-export-with-toc value
>> 
>> * contrib/lisp/org-e-html.el (org-e-html-template): Default value of t
>>   for org-export-with-toc has no impact, so instead when t set TOC depth
>>   to 4.
>> ---
>>  contrib/lisp/org-e-html.el | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/contrib/lisp/org-e-html.el b/contrib/lisp/org-e-html.el
>> index 4e9d398..ee0f247 100644
>> --- a/contrib/lisp/org-e-html.el
>> +++ b/contrib/lisp/org-e-html.el
>> @@ -1473,6 +1473,7 @@ original parsed data.  INFO is a plist holding export options."
>>  <h1 class=\"title\">%s</h1>\n" (org-export-data (plist-get info :title) info))
>>     ;; table of contents
>>     (let ((depth (plist-get info :with-toc)))
>> +     (when (eq t depth) (setq depth 4))
>>       (when (wholenump depth) (org-e-html-toc depth info)))
>>     ;; document contents
>>     contents
>
>
> In the t case, the depth should probably be set to org-export-headline-levels,
> instead of 4.

This should be fixed in master. Note that the #+TOC: support is still
incomplete.

Thanks for the report. Cc'ing Jambunathan for the heads up.


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2012-08-23 19:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23  1:55 org-e-html and table of contents Eric Schulte
2012-08-23 15:56 ` Nick Dokos
2012-08-23 16:41   ` Eric Schulte
2012-08-23 17:52     ` Nick Dokos
2012-08-23 18:42       ` Eric Schulte
2012-08-23 19:29         ` Nick Dokos
2012-08-23 19:39           ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a9xlbdp1.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    --cc=kjambunathan@gmail.com \
    --cc=nicholas.dokos@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).