emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: Re: [BUG] nested blocks aren't protected on export
Date: Mon, 28 Jun 2010 08:30:29 -0700	[thread overview]
Message-ID: <87pqzb9nu2.fsf@gmail.com> (raw)
In-Reply-To: <87zkyfgpqb.wl%n.goaziou@gmail.com> (Nicolas Goaziou's message of "Mon, 28 Jun 2010 17:07:40 +0200")

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
>>>>>> Carsten Dominik writes:
>
>> The above patch looks definitely right to me.  In fact, I think the
>> org-if-unprotected should be around the entire content of the while
>> loop - with an additional fix to make sure search is resumed not
>> from the beginning of location of a match that has not been processed,
>> that would create in infinite loop.
>
> I had removed that protection check in a patch before: I think that
> comments should be removed (or transformed) during export, whatever
> their content is. After all, they are only comments. Any protection
> check is useless there.
>

I disagree, sometimes what looks like a comment is actually content
(see below)

>
> Now, if blocks get caught by the comment search loop, then some part
> of org-mode is not doing its job as #+begin_src isn't a comment
> according to the documentation. So, what part is seeing them as
> comments ?
>
> I think this first patch may be a quick fix, but it only obfuscates
> the true problem.
>

I would disagree here.  There *is* a case where a protected comment
should be retained in the export.  For example, if I'm writing a
document in which I want to discuss Org-mode markup.  It should be
possible for me to include verbatim Org-mode code in my document,
through the use of e.g.

  #+begin_src org
    ,* example org

    ,# this is a comment
    ,this is not a comment
  #+end_src

however without the protection check, the comment would be removed.  If
there is a problem with comments being marked as protected when they
shouldn't be, then that should be fixed where the protection is being
applied, but I believe that the protection check in this patch is
required.

Best -- Eric

>
> Regards,

  reply	other threads:[~2010-06-28 15:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-26  2:18 [BUG] nested blocks aren't protected on export Eric Schulte
2010-06-28  2:42 ` Eric Schulte
2010-06-28  6:37   ` Carsten Dominik
2010-06-28 15:04     ` Eric Schulte
2010-06-28 16:21       ` Carsten Dominik
2010-06-28 18:40         ` Eric Schulte
2010-06-28 19:59         ` Eric Schulte
2010-06-29  4:32           ` Carsten Dominik
2010-06-29  5:09             ` Eric Schulte
2010-06-28 15:07     ` Nicolas Goaziou
2010-06-28 15:30       ` Eric Schulte [this message]
2010-06-28 17:04         ` Nicolas Goaziou

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=87pqzb9nu2.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \
    /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).