emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Eric Schulte" <schulte.eric@gmail.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Cycling visibility of blocks
Date: Tue, 02 Jun 2009 09:47:17 -0700	[thread overview]
Message-ID: <m2tz2yvazu.fsf@gmail.com> (raw)
In-Reply-To: <878wkabnkc.fsf@selenimh.orion.org> (Carsten Dominik's message of "Tue, 02 Jun 2009 18:36:03 +0200")

[-- Attachment #1: Type: text/plain, Size: 141 bytes --]

Good catch,

I'm not sure what is causing this problem, but the attached patch which
changes the regexp seems to solve it.

Thanks -- Eric



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: block-hide-regexp.patch --]
[-- Type: text/x-patch, Size: 515 bytes --]

diff --git a/lisp/org.el b/lisp/org.el
index 1c3dfe5..6792bed 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5146,8 +5146,7 @@ Optional argument N means, put the headline into the Nth line of the window."
 ;;; Folding of blocks
 
 (defconst org-block-regexp
-
-  "^[ \t]*#\\+begin_\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_\\1"
+  "^[ \t]*#\\+begin_\\([^ \n]+\\)\\(\\([^\n]+\\)\\)?\n\\([^\000]+?\\)#\\+end_\\1[ \t]?"
   "Regular expression for hiding blocks.")
 
 (defvar org-hide-block-overlays nil

[-- Attachment #3: Type: text/plain, Size: 828 bytes --]





Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hello,
>
> Isn't there something wrong with the regexp as the snippet is not
> working well when #+END_SOMETHING is followed right away by a new line ?
>
> I mean
>
>
> #+BEGIN_QUOTE
>     Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
>     ehtse hntse hents
> #+END_QUOTE  <--- notice the space
>
> Blah blah
>
>
> is showing the expected behavior when
>
>
> #+BEGIN_QUOTE
>     Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes
>     ehtse hntse hents
> #+END_QUOTE  <---nothing
>
>
> actually results in
>
>
> #+BEGIN_QUOTE
>     Test etn ntes thens hsne htsne nste thnes sne thsne htse nthes...
> Blah blah
>
>
> There's no problem when the text within is not split across two line,
> though.

[-- Attachment #4: Type: text/plain, Size: 204 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2009-06-02 16:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-24 21:12 Cycling visibility of blocks emacs-orgmode
2009-05-24 22:58 ` Eric Schulte
2009-05-25  1:18   ` Sebastian Rose
2009-05-25  7:25     ` Carsten Dominik
2009-05-25  9:19       ` Sebastian Rose
2009-05-25 17:24         ` Eric Schulte
2009-05-25 20:40           ` Sebastian Rose
2009-05-26 17:26             ` Carsten Dominik
2009-05-26 21:22               ` Eric Schulte
2009-06-02 16:36                 ` Carsten Dominik
2009-06-02 16:47                   ` Eric Schulte [this message]
2009-06-02 17:12                     ` Carsten Dominik
2009-06-02 16:52                   ` Nicolas Goaziou
2009-05-26 21:27             ` Eric Schulte
2009-05-25 20:43           ` Sebastian Rose
2009-05-26 17:25             ` Carsten Dominik
2009-05-25  6:48   ` emacs-orgmode

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=m2tz2yvazu.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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).