From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-show-following-heading shows even when nil Date: Sat, 15 May 2010 08:41:09 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38696 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ODB3i-00011w-Iv for emacs-orgmode@gnu.org; Sat, 15 May 2010 02:41:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ODB3h-0007sd-0i for emacs-orgmode@gnu.org; Sat, 15 May 2010 02:41:14 -0400 Received: from mail-ew0-f216.google.com ([209.85.219.216]:52240) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ODB3g-0007sU-RJ for emacs-orgmode@gnu.org; Sat, 15 May 2010 02:41:12 -0400 Received: by ewy8 with SMTP id 8so1019943ewy.8 for ; Fri, 14 May 2010 23:41:12 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Samuel Wales Cc: emacs-orgmode@gnu.org 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