summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-01-24 17:03:03 +0100
committerBastien Guerry <bzg@altern.org>2012-01-24 17:03:03 +0100
commitc74fe88c01836f4e8b510f57d68a7f720f685f82 (patch)
tree7a410d52d9e29d9dc0b1e32e3cb69a815ac52c68
parent314bd75c13bb51767e4bb909ebf76bd7d57213a8 (diff)
downloadorg-mode-c74fe88c01836f4e8b510f57d68a7f720f685f82.tar.gz
org-agenda.el: Allow `C-u' to display the item without unfolding drawers and logbooks.
* org-agenda.el (org-agenda-show-and-scroll-up): Allow `C-u' to display the item without unfolding drawers and logbooks.
-rw-r--r--lisp/org-agenda.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index bdf6881..38fd589 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -7142,10 +7142,13 @@ if it was hidden in the outline."
(select-window win)))
(defvar org-agenda-show-window nil)
-(defun org-agenda-show-and-scroll-up ()
+(defun org-agenda-show-and-scroll-up (&optional arg)
"Display the Org-mode file which contains the item at point.
-When called repeatedly, scroll the window that is displaying the buffer."
- (interactive)
+When called repeatedly, scroll the window that is displaying the buffer.
+With a \\[universal-argument] prefix, use `org-show-entry' instead of
+`show-subtree' to display the item, so that drawers and logbooks stay
+folded."
+ (interactive "P")
(let ((win (selected-window)))
(if (and (window-live-p org-agenda-show-window)
(eq this-command last-command))
@@ -7153,7 +7156,7 @@ When called repeatedly, scroll the window that is displaying the buffer."
(select-window org-agenda-show-window)
(ignore-errors (scroll-up)))
(org-agenda-goto t)
- (show-subtree)
+ (if arg (org-show-entry) (show-subtree))
(setq org-agenda-show-window (selected-window)))
(select-window win)))