From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [BUG] Did COMMENT break? Date: Sun, 13 Mar 2011 20:48:15 -0400 Message-ID: <18298.1300063695@alphaville.dokosmarshall.org> References: <87k4g24mvh.fsf@gmail.com> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=60119 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pyvxa-0007XO-LW for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 20:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PyvxZ-0006l9-FQ for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 20:48:34 -0400 Received: from vms173005pub.verizon.net ([206.46.173.5]:45678) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PyvxZ-0006hq-7i for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 20:48:33 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LI0002C5VKFSSU0@vms173005.mailsrvcs.net> for emacs-orgmode@gnu.org; Sun, 13 Mar 2011 19:48:21 -0500 (CDT) In-reply-to: Message from Rasmus of "Mon\, 14 Mar 2011 00\:33\:06 BST." <87k4g24mvh.fsf@gmail.com> 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: Rasmus Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Rasmus wrote: > 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 > | =E2=80=98#+BEGIN_COMMENT=E2=80=99 ... =E2=80=98#+END_COMMENT=E2=80=99 w= ill 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 Indeed. 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: --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 cont= aining 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--- Nick