* bug in the :VISIBILITY: handling of nested "folded" properties?
@ 2010-07-30 11:08 Rainer Stengele
2010-08-07 6:04 ` [PATCH] " Noorul Islam
2010-08-07 7:28 ` Carsten Dominik
0 siblings, 2 replies; 3+ messages in thread
From: Rainer Stengele @ 2010-07-30 11:08 UTC (permalink / raw)
To: emacs-orgmode
Having
* headline 1
:PROPERTIES:
:VISIBILITY: folded
:END:
** headline 2.1
- stuff
** headline 2.1
:PROPERTIES:
:VISIBILITY: folded
:END:
- stuff
C-u C-u <TAB>
Switch back to the startup visibility of the buffer, i.e. whatever is requested by startup options and ‘VISIBILITY’ properties in individual entries.
does not result in
* headline 1...>
as expected. Instead I get:
* headline 1...>
** headline 2.1...>
** headline 2.1...>
removing the second folded propertiy results correctly in:
* headline 1...>
This looks like a bug in the :VISIBILITY: handling!?
Rainer
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Re: bug in the :VISIBILITY: handling of nested "folded" properties?
2010-07-30 11:08 bug in the :VISIBILITY: handling of nested "folded" properties? Rainer Stengele
@ 2010-08-07 6:04 ` Noorul Islam
2010-08-07 7:28 ` Carsten Dominik
1 sibling, 0 replies; 3+ messages in thread
From: Noorul Islam @ 2010-08-07 6:04 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 1129 bytes --]
On Fri, Jul 30, 2010 at 4:38 PM, Rainer Stengele
<rainer.stengele@online.de>wrote:
> Having
>
> * headline 1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> ** headline 2.1
> - stuff
> ** headline 2.1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> - stuff
>
> C-u C-u <TAB>
> Switch back to the startup visibility of the buffer, i.e. whatever is
> requested by startup options and ‘VISIBILITY’ properties in individual
> entries.
>
>
> does not result in
>
>
> * headline 1...>
>
>
> as expected. Instead I get:
>
>
> * headline 1...>
> ** headline 2.1...>
> ** headline 2.1...>
>
>
> removing the second folded propertiy results correctly in:
>
> * headline 1...>
>
>
> This looks like a bug in the :VISIBILITY: handling!?
>
>
>
I am not sure whether this is a bug. But it looks like the above scenario
was not considered initially. I might be wrong.
The attached patch seems to solve this problem.
* lisp/org.el: org-set-visibility-according-to-property ()
Use backward search instead of forward, so that top hierarchy gets
priority.
Thanks and Regards
Noorul
[-- Attachment #1.2: Type: text/html, Size: 1620 bytes --]
[-- Attachment #2: org-visibility.txt --]
[-- Type: text/plain, Size: 487 bytes --]
diff --git a/lisp/org.el b/lisp/org.el
index 19b28a3..c8409b5 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5962,8 +5962,8 @@ With a numeric prefix, show all headlines up to that level."
(interactive)
(let (org-show-entry-below state)
(save-excursion
- (goto-char (point-min))
- (while (re-search-forward
+ (goto-char (point-max))
+ (while (re-search-backward
"^[ \t]*:VISIBILITY:[ \t]+\\([a-z]+\\)"
nil t)
(setq state (match-string 1))
[-- Attachment #3: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: bug in the :VISIBILITY: handling of nested "folded" properties?
2010-07-30 11:08 bug in the :VISIBILITY: handling of nested "folded" properties? Rainer Stengele
2010-08-07 6:04 ` [PATCH] " Noorul Islam
@ 2010-08-07 7:28 ` Carsten Dominik
1 sibling, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2010-08-07 7:28 UTC (permalink / raw)
To: Rainer Stengele; +Cc: emacs-orgmode
On Jul 30, 2010, at 1:08 PM, Rainer Stengele wrote:
> Having
>
> * headline 1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> ** headline 2.1
> - stuff
> ** headline 2.1
> :PROPERTIES:
> :VISIBILITY: folded
> :END:
> - stuff
>
> C-u C-u <TAB>
> Switch back to the startup visibility of the buffer, i.e.
> whatever is requested by startup options and ‘VISIBILITY’ properties
> in individual entries.
>
>
> does not result in
>
>
> * headline 1...>
>
>
> as expected. Instead I get:
>
>
> * headline 1...>
> ** headline 2.1...>
> ** headline 2.1...>
>
>
> removing the second folded propertiy results correctly in:
>
> * headline 1...>
>
>
> This looks like a bug in the :VISIBILITY: handling!?
No, I don't think so. You are asking for trouble by using this
property in a nested way. Nooruls patch seems to fix it though,
I have applied it.
- Carsten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-08 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-30 11:08 bug in the :VISIBILITY: handling of nested "folded" properties? Rainer Stengele
2010-08-07 6:04 ` [PATCH] " Noorul Islam
2010-08-07 7:28 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.