emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-show-following-heading shows even when nil
@ 2010-05-07  5:32 Samuel Wales
  2010-05-14 22:45 ` Samuel Wales
  2010-05-15  6:41 ` Carsten Dominik
  0 siblings, 2 replies; 8+ messages in thread
From: Samuel Wales @ 2010-05-07  5:32 UTC (permalink / raw)
  To: emacs-orgmode

When I go to a location from the agenda, the next headline
is revealed if it was hidden, even if it is a child.

Setting org-show-following-heading to nil or leaving it at
its default value does not prevent this.  Should it?  The
documentation seems to suggest that it should.  What I want
is for hidden children to remain hidden.

Rationale: I like the buffer to be in a form that can be
obtained by navigation and cycling.  For lack of a better
term, I call that "canonical visibility".

Thanks.

Samuel

-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-07  5:32 org-show-following-heading shows even when nil Samuel Wales
@ 2010-05-14 22:45 ` Samuel Wales
  2010-05-15  6:41 ` Carsten Dominik
  1 sibling, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2010-05-14 22:45 UTC (permalink / raw)
  To: emacs-orgmode

Did I properly understand what the variable is supposed to do?

Thanks.

On 2010-05-06, Samuel Wales <samologist@gmail.com> wrote:
> When I go to a location from the agenda, the next headline
> is revealed if it was hidden, even if it is a child.
>
> Setting org-show-following-heading to nil or leaving it at
> its default value does not prevent this.  Should it?  The
> documentation seems to suggest that it should.  What I want
> is for hidden children to remain hidden.
>
> Rationale: I like the buffer to be in a form that can be
> obtained by navigation and cycling.  For lack of a better
> term, I call that "canonical visibility".
>
> Thanks.
>
> Samuel
>
> --
> Q: How many CDC "scientists" does it take to change a lightbulb?
> A: "You only think it's dark." [CDC has denied a deadly disease for 25
> years]
> ==========
> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-07  5:32 org-show-following-heading shows even when nil Samuel Wales
  2010-05-14 22:45 ` Samuel Wales
@ 2010-05-15  6:41 ` Carsten Dominik
  2010-05-18  4:17   ` Samuel Wales
  2010-07-09 20:27   ` Samuel Wales
  1 sibling, 2 replies; 8+ messages in thread
From: Carsten Dominik @ 2010-05-15  6:41 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode


On May 7, 2010, at 7:32 AM, Samuel Wales wrote:

> When I go to a location from the agenda, the next headline
> is revealed if it was hidden, even if it is a child.
>
> Setting org-show-following-heading to nil or leaving it at
> its default value does not prevent this.  Should it?  The
> documentation seems to suggest that it should.  What I want
> is for hidden children to remain hidden.
>
> Rationale: I like the buffer to be in a form that can be
> obtained by navigation and cycling.  For lack of a better
> term, I call that "canonical visibility".

Hi Samuel,

for some reason I do not remember, I enforce showing the next headline
in this special case.  Please try the following patch and run with if
for a while, to see if it causes any problems.

- Carsten


	Modified lisp/org-agenda.el
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 19ea87c..d7bad10 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6124,10 +6124,7 @@ and by additional input from the age of a  
schedules or deadline entry."
      (push-mark)
      (goto-char pos)
      (when (org-mode-p)
-      (org-show-context 'agenda)
-      (save-excursion
-	(and (outline-next-heading)
-	     (org-flag-heading nil)))) ; show the next heading
+      (org-show-context 'agenda))
      (recenter (/ (window-height) 2))
      (run-hooks 'org-agenda-after-show-hook)
      (and highlight (org-highlight (point-at-bol) (point-at-eol)))))



>
> Thanks.
>
> Samuel
>
> -- 
> Q: How many CDC "scientists" does it take to change a lightbulb?
> A: "You only think it's dark." [CDC has denied a deadly disease for  
> 25 years]
> ==========
> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>
>
> _______________________________________________
> 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

- Carsten

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-15  6:41 ` Carsten Dominik
@ 2010-05-18  4:17   ` Samuel Wales
  2010-05-19  9:56     ` Carsten Dominik
  2010-07-09 20:27   ` Samuel Wales
  1 sibling, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2010-05-18  4:17 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

On 2010-05-14, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> for some reason I do not remember, I enforce showing the next headline
> in this special case.  Please try the following patch and run with if
> for a while, to see if it causes any problems.

The patch did not apply for some reason, but I manually applied it,
and it seemed in trivial testing to work perfectly.  Strangely,
however, today the behavior is as if I did not apply the patch.  I did
eval the function, so it must be some other piece of code that is
involved.  I don't get it.  (Not physically able to investigate now,
unfortunately.)

Samuel

-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-18  4:17   ` Samuel Wales
@ 2010-05-19  9:56     ` Carsten Dominik
  2010-05-22 18:13       ` Samuel Wales
  0 siblings, 1 reply; 8+ messages in thread
From: Carsten Dominik @ 2010-05-19  9:56 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hi Samuel,

thanks for your feedback - I do not know what else could be wrong  
here.....

- Carsten

On May 18, 2010, at 6:17 AM, Samuel Wales wrote:

> Hi Carsten,
>
> On 2010-05-14, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>> for some reason I do not remember, I enforce showing the next  
>> headline
>> in this special case.  Please try the following patch and run with if
>> for a while, to see if it causes any problems.
>
> The patch did not apply for some reason, but I manually applied it,
> and it seemed in trivial testing to work perfectly.  Strangely,
> however, today the behavior is as if I did not apply the patch.  I did
> eval the function, so it must be some other piece of code that is
> involved.  I don't get it.  (Not physically able to investigate now,
> unfortunately.)
>
> Samuel
>
> -- 
> Q: How many CDC "scientists" does it take to change a lightbulb?
> A: "You only think it's dark." [CDC has denied a deadly disease for  
> 25 years]
> ==========
> Retrovirus: http://www.wpinstitute.org/xmrv/index.html

- Carsten

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-19  9:56     ` Carsten Dominik
@ 2010-05-22 18:13       ` Samuel Wales
  2010-05-24  1:58         ` Samuel Wales
  0 siblings, 1 reply; 8+ messages in thread
From: Samuel Wales @ 2010-05-22 18:13 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

Could it be the following in org-agenda-switch-to?

	(save-excursion
	  (and (outline-next-heading)
	       (org-flag-heading nil)))))))  ; show the next heading

I wonder if it will cause any problems to remove that whole sexp.

Thanks.

Samuel

On 2010-05-19, Carsten Dominik <carsten.dominik@gmail.com> wrote:
> Hi Samuel,
>
> thanks for your feedback - I do not know what else could be wrong
> here.....
>
> - Carsten
>
> On May 18, 2010, at 6:17 AM, Samuel Wales wrote:
>
>> Hi Carsten,
>>
>> On 2010-05-14, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>> for some reason I do not remember, I enforce showing the next
>>> headline
>>> in this special case.  Please try the following patch and run with if
>>> for a while, to see if it causes any problems.
>>
>> The patch did not apply for some reason, but I manually applied it,
>> and it seemed in trivial testing to work perfectly.  Strangely,
>> however, today the behavior is as if I did not apply the patch.  I did
>> eval the function, so it must be some other piece of code that is
>> involved.  I don't get it.  (Not physically able to investigate now,
>> unfortunately.)
>>
>> Samuel
>>
>> --
>> Q: How many CDC "scientists" does it take to change a lightbulb?
>> A: "You only think it's dark." [CDC has denied a deadly disease for
>> 25 years]
>> ==========
>> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>
> - Carsten
>
>
>
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-22 18:13       ` Samuel Wales
@ 2010-05-24  1:58         ` Samuel Wales
  0 siblings, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2010-05-24  1:58 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

i.e. this:

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 93334b6..4bbaefc 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2764,6 +2764,7 @@ bind it in the options section.")
 	 (org-set-local 'org-agenda-name name)))
   (setq buffer-read-only nil))

+(eval-when-compile (defvar org-agenda-overriding-columns-format))
 (defun org-finalize-agenda ()
   "Finishing touch for the agenda buffer, called just before displaying it."
   (unless org-agenda-multi
@@ -6129,10 +6130,7 @@ and by additional input from the age of a
schedules or deadline entry."
     (push-mark)
     (goto-char pos)
     (when (org-mode-p)
-      (org-show-context 'agenda)
-      (save-excursion
-	(and (outline-next-heading)
-	     (org-flag-heading nil)))) ; show the next heading
+      (org-show-context 'agenda))
     (recenter (/ (window-height) 2))
     (run-hooks 'org-agenda-after-show-hook)
     (and highlight (org-highlight (point-at-bol) (point-at-eol)))))
@@ -6315,10 +6313,7 @@ at the text of the entry itself."
       (widen)
       (goto-char pos)
       (when (org-mode-p)
-	(org-show-context 'agenda)
-	(save-excursion
-	  (and (outline-next-heading)
-	       (org-flag-heading nil)))))))  ; show the next heading
+	(org-show-context 'agenda)))))

 (defun org-agenda-goto-mouse (ev)
   "Go to the Org-mode file which contains the item at the mouse click."



On 2010-05-22, Samuel Wales <samologist@gmail.com> wrote:
> Hi Carsten,
>
> Could it be the following in org-agenda-switch-to?
>
> 	(save-excursion
> 	  (and (outline-next-heading)
> 	       (org-flag-heading nil)))))))  ; show the next heading
>
> I wonder if it will cause any problems to remove that whole sexp.
>
> Thanks.
>
> Samuel
>
> On 2010-05-19, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>> Hi Samuel,
>>
>> thanks for your feedback - I do not know what else could be wrong
>> here.....
>>
>> - Carsten
>>
>> On May 18, 2010, at 6:17 AM, Samuel Wales wrote:
>>
>>> Hi Carsten,
>>>
>>> On 2010-05-14, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>>>> for some reason I do not remember, I enforce showing the next
>>>> headline
>>>> in this special case.  Please try the following patch and run with if
>>>> for a while, to see if it causes any problems.
>>>
>>> The patch did not apply for some reason, but I manually applied it,
>>> and it seemed in trivial testing to work perfectly.  Strangely,
>>> however, today the behavior is as if I did not apply the patch.  I did
>>> eval the function, so it must be some other piece of code that is
>>> involved.  I don't get it.  (Not physically able to investigate now,
>>> unfortunately.)
>>>
>>> Samuel
>>>
>>> --
>>> Q: How many CDC "scientists" does it take to change a lightbulb?
>>> A: "You only think it's dark." [CDC has denied a deadly disease for
>>> 25 years]
>>> ==========
>>> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>>
>> - Carsten
>>
>>
>>
>>
>
>
> --
> Q: How many CDC "scientists" does it take to change a lightbulb?
> A: "You only think it's dark." [CDC has denied a deadly disease for 25
> years]
> ==========
> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: org-show-following-heading shows even when nil
  2010-05-15  6:41 ` Carsten Dominik
  2010-05-18  4:17   ` Samuel Wales
@ 2010-07-09 20:27   ` Samuel Wales
  1 sibling, 0 replies; 8+ messages in thread
From: Samuel Wales @ 2010-07-09 20:27 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode

Hi Carsten,

Thank you for the patch.  This patch works for what it does,
but does not handle the situations that I normally encounter
the bug in.

To expand its scope, I made the the same change to the other
of org-agenda-goto and org-agenda-switch-to and have used
the combined patch (yours and mine) for quite a while now.
I just have git rebase it every pull.

It works for headlines but does not work for body text.

Body text does not stay canonical.  That is, you cannot
achieve the state using motion and TAB in the buffer.

Here is a test case.  Search for applebanana and RET on it.

Thanks.

Samuel


***** example: my major headline test
SCHEDULED: <2010-07-06 Tue>

some body text.

go up to the headline and fold the whole thing with tab,
then search for apple.banana without the dot.  you should
notice that this entire body text is folded.

does another variable control this?
******* my minor headline test applebanana
SCHEDULED: <2010-07-06 Tue>
********* something underneath
********* again
******* another
********* under
********* under
******* more


On 2010-05-14, Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
> On May 7, 2010, at 7:32 AM, Samuel Wales wrote:
>
>> When I go to a location from the agenda, the next headline
>> is revealed if it was hidden, even if it is a child.
>>
>> Setting org-show-following-heading to nil or leaving it at
>> its default value does not prevent this.  Should it?  The
>> documentation seems to suggest that it should.  What I want
>> is for hidden children to remain hidden.
>>
>> Rationale: I like the buffer to be in a form that can be
>> obtained by navigation and cycling.  For lack of a better
>> term, I call that "canonical visibility".
>
> Hi Samuel,
>
> for some reason I do not remember, I enforce showing the next headline
> in this special case.  Please try the following patch and run with if
> for a while, to see if it causes any problems.
>
> - Carsten
>
>
> 	Modified lisp/org-agenda.el
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 19ea87c..d7bad10 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -6124,10 +6124,7 @@ and by additional input from the age of a
> schedules or deadline entry."
>       (push-mark)
>       (goto-char pos)
>       (when (org-mode-p)
> -      (org-show-context 'agenda)
> -      (save-excursion
> -	(and (outline-next-heading)
> -	     (org-flag-heading nil)))) ; show the next heading
> +      (org-show-context 'agenda))
>       (recenter (/ (window-height) 2))
>       (run-hooks 'org-agenda-after-show-hook)
>       (and highlight (org-highlight (point-at-bol) (point-at-eol)))))
>
>
>
>>
>> Thanks.
>>
>> Samuel
>>
>> --
>> Q: How many CDC "scientists" does it take to change a lightbulb?
>> A: "You only think it's dark." [CDC has denied a deadly disease for
>> 25 years]
>> ==========
>> Retrovirus: http://www.wpinstitute.org/xmrv/index.html
>>
>>
>> _______________________________________________
>> 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
>
> - Carsten
>
>
>
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-09 20:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-07  5:32 org-show-following-heading shows even when nil Samuel Wales
2010-05-14 22:45 ` Samuel Wales
2010-05-15  6:41 ` Carsten Dominik
2010-05-18  4:17   ` Samuel Wales
2010-05-19  9:56     ` Carsten Dominik
2010-05-22 18:13       ` Samuel Wales
2010-05-24  1:58         ` Samuel Wales
2010-07-09 20:27   ` Samuel Wales

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).