From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Fix section id on HTML export when no custom id is present Date: Sun, 19 Apr 2009 22:33:44 +0200 Message-ID: References: <1240158544-8214-1-git-send-email-bernt@norang.ca> <1240158544-8214-2-git-send-email-bernt@norang.ca> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lvdi4-0001qM-DD for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 16:33:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lvdhz-0001on-Qh for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 16:33:51 -0400 Received: from [199.232.76.173] (port=43088 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lvdhz-0001of-D6 for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 16:33:47 -0400 Received: from mail-ew0-f160.google.com ([209.85.219.160]:39750) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lvdhy-0000l8-Rt for emacs-orgmode@gnu.org; Sun, 19 Apr 2009 16:33:47 -0400 Received: by ewy4 with SMTP id 4so1568675ewy.42 for ; Sun, 19 Apr 2009 13:33:45 -0700 (PDT) In-Reply-To: <1240158544-8214-2-git-send-email-bernt@norang.ca> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bernt Hansen Cc: emacs-orgmode@gnu.org Yes, a bug, but your fix is not the right one, see the discussions with Sebastian about the naming of containers and IDs. Fixed, in a different way. Thanks. - Carsten On Apr 19, 2009, at 6:29 PM, Bernt Hansen wrote: > This fixes a bug where section ids were all set to 'nil'. > suffix and href were identical so suffix is no more. > > Before this change the table of contents had the correct id but the > heading levels all had id="nil" > --- > > This patch is available at git://git.norang.ca/org-mode for-carsten > > lisp/org-html.el | 9 ++++----- > 1 files changed, 4 insertions(+), 5 deletions(-) > > diff --git a/lisp/org-html.el b/lisp/org-html.el > index 0f3d113..0c416af 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -1817,7 +1817,7 @@ When TITLE is nil, just close all open levels." > (preferred (cdr (assoc target org-export-preferred-target-alist))) > (remove (or preferred target)) > (l org-level-max) > - snumber href suffix) > + snumber href) > (setq extra-targets (remove remove extra-targets)) > (setq extra-targets > (mapconcat (lambda (x) > @@ -1874,12 +1874,11 @@ When TITLE is nil, just close all open > levels." > level snumber) > " " title))) > (unless (= head-count 1) (insert "\n\n")) > - (setq href (cdr (assoc (concat "sec-" snumber) org-export- > preferred-target-alist))) > - (setq suffix (or href (concat "sec-" snumber))) > + (setq href (or (cdr (assoc (concat "sec-" snumber) org-export- > preferred-target-alist)) (concat "sec-" snumber))) > (insert (format "\n
%d\">\n%s%s\n
\"text-%s\">\n" > - suffix level level href > + href level level href > extra-targets > - title level level suffix)) > + title level level href)) > (org-open-par))))) > > (defun org-export-html-get-tag-class-name (tag) > -- > 1.6.3.rc1 > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode