From: Carsten Dominik <carsten.dominik@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org, Rasmus <rasmus.pank@gmail.com>
Subject: Re: [BUG] Did COMMENT break?
Date: Fri, 8 Apr 2011 12:11:20 +0200 [thread overview]
Message-ID: <E74B832F-806E-4EC0-B2FB-0C3F927DE9D0@gmail.com> (raw)
In-Reply-To: <18298.1300063695@alphaville.dokosmarshall.org>
I have applied the patch.
- Carsten
On Mar 14, 2011, at 1:48 AM, Nick Dokos wrote:
> Rasmus <rasmus.pank@gmail.com> wrote:
>
>> Hi,
>> It seems that
>>
>> ,----
>> | #+BEGIN_COMMENT
>> | ...
>> | #+END_COMMENT
>> `----
>>
>> Might be broken in Org-mode 7.5. According to the manual,
>>
>> ,----
>> | Finally, regions surrounded by
>> | ‘#+BEGIN_COMMENT’ ... ‘#+END_COMMENT’ will not be exported.
>> `----
>>
>> Consider the following example generated with Org-mode 7.5 in Emacs 24.0.50
>> (started without config files).
>>
>> ,----
>> | #+TITLE: this is a test
>> |
>> | #+BEGIN_COMMENT
>> | Don't export me
>> | #+END_COMMENT
>> |
>> | I'd like to be exposed
>> `----
>>
>> The HTML export is:
>>
>> ,----
>> | <snip>
>> | <h1 class="title">this is a test</h1>
>> |
>> | <div class="org-comment">
>> | </br>
>> | <p>
>> | <p>
>> | Don't export me
>> | </p>
>> | </div>
>> |
>> | I'd like to be exposed
>> | <snip>
>> `----
>>
>> The LaTeX export is:
>>
>> ,----
>> | \begin{verbatim}
>> | Don't export me
>> | \end{verbatim}
>> | I'd like to be exposed
>> `----
>>
>
> 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 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---
>
> Nick
>
>
- Carsten
prev parent reply other threads:[~2011-04-08 10:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-13 23:33 [BUG] Did COMMENT break? Rasmus
2011-03-14 0:48 ` Nick Dokos
2011-03-14 11:40 ` Rasmus
2011-03-14 15:40 ` Rasmus
2011-04-08 10:11 ` Carsten Dominik [this message]
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=E74B832F-806E-4EC0-B2FB-0C3F927DE9D0@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
--cc=rasmus.pank@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).