From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Re: [BUG] nested blocks aren't protected on export Date: Mon, 28 Jun 2010 17:07:40 +0200 Message-ID: <87zkyfgpqb.wl%n.goaziou@gmail.com> References: <876316cz9g.fsf@gmail.com> <8739w7ane7.fsf@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: Received: from [140.186.70.92] (port=56978 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTFxG-0000e6-D2 for emacs-orgmode@gnu.org; Mon, 28 Jun 2010 11:09:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTFw4-0007Pu-L6 for emacs-orgmode@gnu.org; Mon, 28 Jun 2010 11:07:49 -0400 Received: from mail-ww0-f41.google.com ([74.125.82.41]:40228) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTFw4-0007Pf-Gv for emacs-orgmode@gnu.org; Mon, 28 Jun 2010 11:07:48 -0400 Received: by wwf26 with SMTP id 26so3051977wwf.0 for ; Mon, 28 Jun 2010 08:07:46 -0700 (PDT) In-Reply-To: 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: Carsten Dominik Cc: Org Mode 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. 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. Regards, -- Nicolas Goaziou