From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [BUG] nested blocks aren't protected on export Date: Mon, 28 Jun 2010 08:30:29 -0700 Message-ID: <87pqzb9nu2.fsf@gmail.com> References: <876316cz9g.fsf@gmail.com> <8739w7ane7.fsf@gmail.com> <87zkyfgpqb.wl%n.goaziou@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=60875 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTGIA-0007aX-Cs for emacs-orgmode@gnu.org; Mon, 28 Jun 2010 11:30:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTGI8-0002kA-MU for emacs-orgmode@gnu.org; Mon, 28 Jun 2010 11:30:37 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:59158) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTGI8-0002k3-I0 for emacs-orgmode@gnu.org; Mon, 28 Jun 2010 11:30:36 -0400 Received: by pwi6 with SMTP id 6so51004pwi.0 for ; Mon, 28 Jun 2010 08:30:35 -0700 (PDT) In-Reply-To: <87zkyfgpqb.wl%n.goaziou@gmail.com> (Nicolas Goaziou's message of "Mon, 28 Jun 2010 17:07:40 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Org Mode , Carsten Dominik Hi Nicolas, Nicolas Goaziou 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,