From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Change underscores to hyphens for HTML export Date: Tue, 14 Jun 2011 10:46:52 +0200 Message-ID: <84A3F6D8-B03D-49DD-BB39-06AEB0D5959D@gmail.com> References: <4199.1307982485@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41860) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWPH4-0005eM-G2 for emacs-orgmode@gnu.org; Tue, 14 Jun 2011 04:47:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWPGy-000836-3y for emacs-orgmode@gnu.org; Tue, 14 Jun 2011 04:47:02 -0400 Received: from mail-ey0-f169.google.com ([209.85.215.169]:57140) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWPGx-0007zq-Uh for emacs-orgmode@gnu.org; Tue, 14 Jun 2011 04:46:56 -0400 Received: by eyd9 with SMTP id 9so2159928eyd.0 for ; Tue, 14 Jun 2011 01:46:54 -0700 (PDT) In-Reply-To: <4199.1307982485@alphaville.americas.hpqcorp.net> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Jun 13, 2011, at 6:28 PM, Nick Dokos wrote: > =46rom 28c0b3afce11a8e2bd452ccab44b96c00a4401ca Mon Sep 17 00:00:00 = 2001 > From: Nick Dokos > Date: Sat, 11 Jun 2011 23:38:09 -0400 > Subject: [PATCH] Change underscores to hyphens for HTML export >=20 > * lisp/org-html.el (org-export-as-html): changed underscores to = hyphens in section number. > (org-html-level-start): ditto. >=20 > Daniel Clemente reported that after commit > 438536f6157794101ce0957e39cad6bf70580751 which changed underscores to > hyphens in org-exp.el, he had problems exporting HTML files that used > to work. In particular, org files that used CUSTOM_ID properties were > broken. >=20 > This patch is a minimal fix for this problem: it changes underscores > to hyphens in section numbers only. Daniel has tested the fix on an > extensive collection of org files and reports that no additional > problems have surfaced. There are other places in org-html where > underscores are used, so there may be additional problems: if any are > found, they should be fairly straightforward to fix (as this problem > was). >=20 > Many thanks to Daniel for findind and reporting the problem and = testing > the fix on a large collection of his org files. >=20 > TINYCHANGE >=20 > Signed-off-by: Nick Dokos > --- > lisp/org-html.el | 4 ++-- > 1 files changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/lisp/org-html.el b/lisp/org-html.el > index afc6a77..b5d371f 100644 > --- a/lisp/org-html.el > +++ b/lisp/org-html.el > @@ -1395,7 +1395,7 @@ lang=3D\"%s\" xml:lang=3D\"%s\"> > (setq txt (replace-match "" t = t txt))) > (setq href > (replace-regexp-in-string > - "\\." "_" (format = "sec-%s" snumber))) > + "\\." "-" (format = "sec-%s" snumber))) > (setq href = (org-solidify-link-text (or (cdr (assoc href = org-export-preferred-target-alist)) href))) > (push > (format > @@ -2412,7 +2412,7 @@ When TITLE is nil, just close all open levels." > (insert "
    \n
  • " title "
    \n")))) > (aset org-levels-open (1- level) t) > (setq snumber (org-section-number level) > - snu (replace-regexp-in-string "\\." "_" snumber)) > + snu (replace-regexp-in-string "\\." "-" snumber)) > (setq level (+ level org-export-html-toplevel-hlevel -1)) > (if (and num (not body-only)) > (setq title (concat > --=20 > 1.7.5.1.169.g505a1 >=20 >=20 - Carsten