emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comments break up a paragraph when writing one-setence-per-line


From: Max Nikulin
Subject: Re: Comments break up a paragraph when writing one-setence-per-line
Date: Sun, 3 Oct 2021 18:34:10 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 03/10/2021 00:57, Tom Gillespie wrote:
A general comment (heh) here. This is not a bug and not easily fixed.
Line comments are their own top level element distinct from
paragraphs. If you need something that fits in a paragraph you can use
@@comment:@@ at the start of a line.

I agree that it is annoying, but Org line comment syntax also only
works if it starts the line, so the behavior diverges from traditional
code comments. It may make sense to update the docs to call them "line
comments" instead of just comments.

Agree, if parser is not changed, I suppose, the manual and the guide should state very prominent that comment line disrupts current paragraph unlike "%" in TeX.

However there 5 users in this thread who expect that "# " or "#+latex:" should not be "element" and should be a part of surrounding paragraph.

Thank you for the idea with @@comment:@@, let me stress that final @@ should be on the next line. It is similar to my idea with a macro expanding to nothing. It may be documented in the manual. However I would expect that `org-lint' issues a warning concerning unknown backends to catch typos in names. By the way, `org-lint' does not like the variant with comment as macro.

I think, it is a bug in LaTeX backend that the following becomes 3 separate paragraphs:

   #+macro: comment
   Beginning of a paragraph A.
   @@comment: FIXME@@
   Paragraph A continues.
   {{{comment(TODO)}}}
   End of paragraph A.

And the following is really confusing:

   How many paragraphs
   #+html: <!-- comment -->
   is here
   #+latex: %
   in LaTeX and HTML output?

LaTeX backend exports it as a continuous paragraph (an idea of a weird hack how to comment a line if only LaTeX export is needed). HTML backend believes that it is 3 paragraphs.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]