emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daniel Clemente <n142857@gmail.com>
To: org-mode Mailinglist <emacs-orgmode@gnu.org>
Subject: Bug with section numbers due to EXAMPLE block
Date: Mon, 01 Mar 2010 02:29:36 +0100	[thread overview]
Message-ID: <87zl2s3k3j.fsf@gmail.com> (raw)


  Hi, I found an HTML export bug with org-mode 6.34c-140-g44c8 and older. I used:

--------------------------------------------------------
* only one section
#+BEGIN_EXAMPLE:
  
  We need:
  ,* pears
  ,* lettuce
  ,* watermelons
  
  Very important!
#+END_EXAMPLE:
--------------------------------------------------------

  And the outputed table of contents had this code:

--------------------------------------------------------
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1 only one section </a></li>
<li><a href="#sec-2">2 pears</a></li>
<li><a href="#sec-3">3 lettuce</a></li>
<li><a href="#sec-4">4 watermelons</a></li>
</ul>
</div>
--------------------------------------------------------

  This is wrong because the asterisks inside the example don't represent headers. There should be only one header.

  It does not happen with QUOTE or VERSE or SRC or CENTER! Only with EXAMPLE!


  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 removed and the asterisks are free.

  Maybe that block should be marked as „this is not org syntax“, or the section numbers should be computed before evaluating example blocks.


  Greetings
Daniel

             reply	other threads:[~2010-03-01  1:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01  1:29 Daniel Clemente [this message]
2010-03-03 13:36 ` Bug with section numbers due to EXAMPLE block Carsten Dominik

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=87zl2s3k3j.fsf@gmail.com \
    --to=n142857@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).