From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Clemente Subject: Bug with section numbers due to EXAMPLE block Date: Mon, 01 Mar 2010 02:29:36 +0100 Message-ID: <87zl2s3k3j.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NluRt-0007Bc-7A for emacs-orgmode@gnu.org; Sun, 28 Feb 2010 20:29:29 -0500 Received: from [140.186.70.92] (port=54643 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NluRs-0007B4-Ew for emacs-orgmode@gnu.org; Sun, 28 Feb 2010 20:29:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NluRs-0004m3-09 for emacs-orgmode@gnu.org; Sun, 28 Feb 2010 20:29:28 -0500 Received: from mail-vw0-f41.google.com ([209.85.212.41]:38343) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NluRr-0004lw-SZ for emacs-orgmode@gnu.org; Sun, 28 Feb 2010 20:29:27 -0500 Received: by vws8 with SMTP id 8so370540vws.0 for ; Sun, 28 Feb 2010 17:29:26 -0800 (PST) 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: org-mode Mailinglist Hi, I found an HTML export bug with org-mode 6.34c-140-g44c8 and older. I= used: -------------------------------------------------------- * only one section #+BEGIN_EXAMPLE: =20=20 We need: ,* pears ,* lettuce ,* watermelons =20=20 Very important! #+END_EXAMPLE: -------------------------------------------------------- And the outputed table of contents had this code: -------------------------------------------------------- -------------------------------------------------------- This is wrong because the asterisks inside the example don't represent he= aders. There should be only one header. It does not happen with QUOTE or VERSE or SRC or CENTER! Only with EXAMPL= E! I found this related code in org-export-replace-src-segments-and-examples: #+BEGIN_SRC lisp ;; Free up the protected lines (goto-char (point-min)) (while (re-search-forward "^," nil t) (if (or (equal lang "org") (save-match-data (looking-at "\\([*#]\\|[ \t]*#\\+\\)"))) (replace-match "")) (end-of-line 1)) #+END_SRC (looking-at "\\([*#]\\|[ \t]*#\\+\\)") is true and therefore the , is remov= ed and the asterisks are free. Maybe that block should be marked as =E2=80=9Ethis is not org syntax=E2= =80=9C, or the section numbers should be computed before evaluating example= blocks. Greetings Daniel