Browse Source

Visibility cycling: Fix bug when org-cycle-include-plain-lists is t

Peter Westlake writes:

>  On Fri, 8 May 2009 06:24:54 +0200, "Carsten Dominik"
>  <carsten.dominik@gmail.com> said:
>
>  I anyone could make an example that allos me to reproduce this
>  problem, then I might be able to fix it.
>
>  It's trivial:
>
>   * top
>   ** sub 1
>   Set org-cycle-include-plain-lists.
>   Type TAB on this line, and the whole of top gets folded.
>
>   ** sub 2
>   This entry is not needed to reproduce the bug. It just
>   makes it more visible.

There was indeed a bug, I think it is fixed now.
Carsten Dominik 16 years ago
parent
commit
e516a3be22
2 changed files with 3 additions and 1 deletions
  1. 2 0
      lisp/ChangeLog
  2. 1 1
      lisp/org.el

+ 2 - 0
lisp/ChangeLog

@@ -1,5 +1,7 @@
 2009-05-08  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org.el (org-cycle): Remove erraneous space character.
+
 	* org-icalendar.el (org-icalendar-timezone): Initialize from
 	environment.
 

+ 1 - 1
lisp/org.el

@@ -4637,7 +4637,7 @@ in special contexts.
 	     ((not (org-mode-p)) outline-regexp)
 	     (org-cycle-include-plain-lists
 	      (concat "\\(?:\\*"
-		      (if nstars (format "\\{1,%d\\} " nstars) "+")
+		      (if nstars (format "\\{1,%d\\}" nstars) "+")
 		      " \\|\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) \\)"))
 	     (t (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))))
 	   (bob-special (and org-cycle-global-at-bob (bobp)