emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Chris Gray <chrismgray@gmail.com>
To: Bastien <bzg@gnu.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: [patch] Re:  meaning of body-only in org-export-as-html
Date: Tue, 03 Apr 2012 10:40:50 -0600	[thread overview]
Message-ID: <87vclgwyy5.fsf@gmail.com> (raw)
In-Reply-To: <87aa2u4kvm.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 360 bytes --]

Bastien <bzg@gnu.org> writes:
> I'm ready to apply this patch, but can you add a proper Emacs 
> ChangeLog?

Updated patch attached.

By the way, I am in the "Processing" section in the list of people who
have signed papers on Worg.  However, I received confirmation that my
papers went through a long time ago.  Should I correct Worg on this?

Cheers,
Chris


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Export-Allow-for-TOC-generation-if-body-only-is-set.patch --]
[-- Type: text/x-diff, Size: 1130 bytes --]

From 3ae7de6bd5b91ce18ed38dfce46466d6dd3a64b7 Mon Sep 17 00:00:00 2001
From: Chris Gray <chrismgray@gmail.com>
Date: Tue, 3 Apr 2012 10:32:56 -0600
Subject: [PATCH] Export: Allow for TOC generation if body-only is set

* lisp/org-html.el (org-export-as-html): Remove the check for
body-only in the code for generating tables of contents.

The docstring for org-export-as-html states that the body-only flag
removes everything outside the <body></body> tags (inclusive).  Since
the table of contents is inside these tags, it should be exported when
requested even if the body-only flag is set.
---
 lisp/org-html.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-html.el b/lisp/org-html.el
index be2124b..385d8ec 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -1414,7 +1414,7 @@ PUB-DIR is set, use this as the publishing directory."
 		"\n<h1 class=\"title\">" title "</h1>\n"))
 
       ;; insert body
-      (if (and org-export-with-toc (not body-only))
+      (if org-export-with-toc
 	  (progn
 	    (push (format "<h%d>%s</h%d>\n"
 			  org-export-html-toplevel-hlevel
-- 
1.7.9


  reply	other threads:[~2012-04-03 16:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 22:33 Chris Gray
2012-03-22 14:51 ` Myles English
2012-03-31 22:47   ` [patch] " Chris Gray
2012-04-02  8:07     ` Bastien
2012-04-03 16:40       ` Chris Gray [this message]
2012-04-03 18:12         ` Bastien
2012-04-04  7:06         ` Bastien
2012-04-04 18:24           ` Chris Gray

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=87vclgwyy5.fsf@gmail.com \
    --to=chrismgray@gmail.com \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: [patch] Re:  meaning of body-only in org-export-as-html' \
    /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

Code repositories for project(s) associated with this 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).