From: Ihor Radchenko <yantar92@posteo.net>
To: Thibault Polge <thibault@thb.lt>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] A commented line breaks line numbering [9.6-pre (release_9.5.5-1058-g6ef33b @ /home/thblt/.emacs.d/lib/org/lisp/)]
Date: Tue, 15 Nov 2022 01:51:52 +0000 [thread overview]
Message-ID: <87k03xdlxj.fsf@localhost> (raw)
In-Reply-To: <877czx7nzp.fsf@thb.lt>
Thibault Polge <thibault@thb.lt> writes:
> With org 9.6-pre, a commented out line breaks list numbering (even with
> `org-list-repair`), and effectively breaks a list in two distinct lists
> in exporters. Eg:
>
> 1. Item 1
> 2. Item 2
> # 3. Commented out item 3
> 1. Reset counter?
>
> At "Reset counter?", HTML export opens a new <ol> there, LaTex a new
> \begin{enumerate}
>
> This may be expected behavior --- it's present in Pandoc as well
It is by design, and it was like this forever, not just in Org 9.6.
Comments are a valid structural element in Org AST. They are just not
exported.
It also means that comments can belong to a list item:
1. Item 1
2. Item 2
# 3. Commented out item 3
3. Reset counter?
The above does not break the list into two because the comment is
considered to be a part of the "Item 2".
> --- but
> it's surprising, since I'd expect a comment line to be fully ignored
> from the comment marker to the final \n, inclusive. I'd thus expect the
> above example to be perfectly equivalent to:
>
> 1. Item 1
> 2. Item 2
> 3. Reset counter?
>
> And to export as a single <ol>/enumerate.
This can be done on export, but it will then create inconsistency
between Org buffer behaviour and what you see on export.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
prev parent reply other threads:[~2022-11-15 1:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 11:51 [BUG] A commented line breaks line numbering [9.6-pre (release_9.5.5-1058-g6ef33b @ /home/thblt/.emacs.d/lib/org/lisp/)] Thibault Polge
2022-11-15 1:51 ` Ihor Radchenko [this message]
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=87k03xdlxj.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=thibault@thb.lt \
/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).