From e7ceeb3a49df453cb17361d2b0c2b6083ca5eb89 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sun, 5 Jul 2009 16:30:02 +0200 Subject: [PATCH] Bug fix: Hide drawers after showing entry content Bernt Hansen writes: > I recently noticed that using SPACE or TAB in the agenda displays > the task in the other window but all of the drawers are exposed. > If you fold the org file with S-TAB to Overview or Contents > display and then switch to the agenda and SPACE or TAB on a > folded task it unfolds the entire thing including the drawers. > > Expanding the file to SHOW ALL and then using follow mode from > the agenda shows me the view I'm really looking for so that's > what I'm doing as a workaround right now. > > While doing my weekly review of tasks I use follow mode to view > task detail and the expanded :LOGBOOK: and :PROPERTIES: drawers > hide detail scrolled off the bottom of the window. My :LOGBOOK: > drawer for repeated tasks tends to be l-o-n-g and shoves detail > way down the file (such as my weekly review checklist :) ). > > Is it possible to control expansion of the drawers when > displaying a task from the agenda? The view I'm looking for is > the same as SHOW ALL from S-TAB. It seems that if the task is > expanded from the agenda it expands everything including the > drawers. --- lisp/ChangeLog | 4 ++++ lisp/org.el | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3fac80bfd..3df91ea16 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-07-05 Carsten Dominik + + * org.el (org-show-entry): Hide drawers. + 2009-07-03 Carsten Dominik * org-footnote.el (org-footnote-auto-adjust): New option. diff --git a/lisp/org.el b/lisp/org.el index 98fce434d..a8d9d4fc9 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -16395,7 +16395,8 @@ Show the heading too, if it is currently invisible." (concat "[\r\n]\\(" outline-regexp "\\)") nil t) (match-beginning 1) (point-max))) - nil)) + nil) + (org-cycle-hide-drawers 'children)) (error nil)))) (defun org-make-options-regexp (kwds &optional extra)