emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Cycling visibility of blocks


From: Eric Schulte
Subject: Re: [Orgmode] Cycling visibility of blocks
Date: Tue, 02 Jun 2009 09:47:17 -0700
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.92 (darwin)

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


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



Carsten Dominik <address@hidden> 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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]