From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [BUG] Did COMMENT break? Date: Fri, 8 Apr 2011 12:11:20 +0200 Message-ID: References: <87k4g24mvh.fsf@gmail.com> <18298.1300063695@alphaville.dokosmarshall.org> Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=33636 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q88f2-0007tl-4l for emacs-orgmode@gnu.org; Fri, 08 Apr 2011 06:11:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q88f0-0001U5-Iv for emacs-orgmode@gnu.org; Fri, 08 Apr 2011 06:11:27 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:55212) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q88f0-0001U0-E3 for emacs-orgmode@gnu.org; Fri, 08 Apr 2011 06:11:26 -0400 Received: by ewy9 with SMTP id 9so1073082ewy.0 for ; Fri, 08 Apr 2011 03:11:25 -0700 (PDT) In-Reply-To: <18298.1300063695@alphaville.dokosmarshall.org> 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: nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org, Rasmus I have applied the patch. - Carsten On Mar 14, 2011, at 1:48 AM, Nick Dokos wrote: > Rasmus wrote: >=20 >> Hi, >> It seems that=20 >>=20 >> ,---- >> | #+BEGIN_COMMENT=20 >> | ... >> | #+END_COMMENT >> `---- >>=20 >> Might be broken in Org-mode 7.5. According to the manual,=20 >>=20 >> ,---- >> | Finally, regions surrounded by >> | =91#+BEGIN_COMMENT=92 ... =91#+END_COMMENT=92 will not be exported. >> `---- >>=20 >> Consider the following example generated with Org-mode 7.5 in Emacs = 24.0.50 >> (started without config files). >>=20 >> ,---- >> | #+TITLE: this is a test >> |=20 >> | #+BEGIN_COMMENT >> | Don't export me >> | #+END_COMMENT >> |=20 >> | I'd like to be exposed >> `---- >>=20 >> The HTML export is: >>=20 >> ,---- >> | >> |

this is a test

>> |=20 >> |
>> |
>> |

>> |

>> | Don't export me >> |

>> |
>> |=20 >> | I'd like to be exposed >> | >> `---- >>=20 >> The LaTeX export is: >>=20 >> ,---- >> | \begin{verbatim} >> | Don't export me >> | \end{verbatim} >> | I'd like to be exposed >> `---- >>=20 >=20 > Indeed. >=20 > It seems that one of the hair-raising regexps that Carsten manages > to come up with is not quite right. Try this patch for now: >=20 > --8<---------------cut here---------------start------------->8--- > diff --git a/lisp/org-exp.el b/lisp/org-exp.el > index 34f101d..e1dcea0 100644 > --- a/lisp/org-exp.el > +++ b/lisp/org-exp.el > @@ -1834,7 +1834,7 @@ table line. If it is a link, add it to the line = containing the link." > (goto-char (point-min)) > (setq case-fold-search t) > (while (re-search-forward > - "^#\\+begin_comment[ \t]*\n[^\000]*?^#\\+end_comment\\>.*" = nil t) > + "^#\\+begin_comment[ \t]*\n[^\000]*?\n#\\+end_comment\\>.*" = nil t) > (replace-match "" t t)) > ;; Remove subtrees that are commented > (goto-char (point-min)) > --8<---------------cut here---------------end--------------->8--- >=20 > Nick >=20 >=20 - Carsten