emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matthew Lundin <mdl@imapmail.org>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Protecting comment lines from fill-paragraph
Date: Fri, 24 Apr 2009 11:19:27 -0500	[thread overview]
Message-ID: <87ocumm3cg.fsf@fastmail.fm> (raw)

Hi Carsten, 

Thanks to the addition your wonderful org-footnote, I increasingly use
org-mode for all my writing. And just as I do in LaTeX, I like to use
comment lines to insert notes in my text. I have a couple of questions,
however, about the behavior of comment lines in relation to
fill-paragraph.

I find that if I add a comment such as the following...

--8<---------------cut here---------------start------------->8---
Here is some text.
# Here is a comment
Here is some text.
--8<---------------cut here---------------end--------------->8---

When I invoke fill-paragraph on lines two or three, line three is folded
into the comment line, as follows:

--8<---------------cut here---------------start------------->8---
Here is some text.
# Here is a comment Here is some text.
--8<---------------cut here---------------end--------------->8---

But when I invoke fill paragraph on line one, the text stays as it is.
In other words, the comment symbol blocks filling into the preceding
line, but not the line that follows it.

The same behavior affects other comment blocks. E.g.,

--8<---------------cut here---------------start------------->8---
#+begin_quote
Here is a quote.
#+end_quote
--8<---------------cut here---------------end--------------->8---

becomes...

--8<---------------cut here---------------start------------->8---
#+begin_quote Here is a quote.
#+end_quote
--8<---------------cut here---------------end--------------->8---

In short, would it be possible to prevent lines that follow comment
lines from being folded into comment lines when fill-paragraph is
invoked. The reason I ask is because I like to place comments in
paragraphs while retaining the integrity of the paragraph for export.

Thanks in advance for considering this.
Matt

             reply	other threads:[~2009-04-24 16:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-24 16:19 Matthew Lundin [this message]
2009-04-24 19:01 ` Protecting comment lines from fill-paragraph Samuel Wales
2009-04-24 19:45   ` Matthew Lundin
2009-04-24 19:58   ` Matthew Lundin
2009-04-28  2:34     ` Samuel Wales
2009-05-08  7:26 ` Carsten Dominik
2009-05-08  8:52   ` Samuel Wales

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=87ocumm3cg.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --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).