Преглед на файлове

Allow to view full entry from agenda.

A prefix argument to the `org-agenda-show' command is now interpreted
to make sure the entire entry is made visible in the other window, not
only the headline.
Carsten Dominik преди 16 години
родител
ревизия
9cd1518bad
променени са 3 файла, в които са добавени 14 реда и са изтрити 4 реда
  1. 2 0
      doc/org.texi
  2. 3 0
      lisp/ChangeLog
  3. 9 4
      lisp/org-agenda.el

+ 2 - 0
doc/org.texi

@@ -5974,6 +5974,8 @@ Previous line (same as @key{down} and @kbd{C-n}).
 @item mouse-3
 @itemx @key{SPC}
 Display the original location of the item in another window.
+With prefix arg, make sure that the entire entry is made visible in the
+outline, not only the heading.
 @c
 @kindex L
 @item L

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-12-18  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-agenda.el (org-agenda-show): New prefix argument
+	FULL-ENTRY.
+
 	* org.el (org-sort-entries-or-items): Add a COMPARE-FUNC
 	argument.
 

+ 9 - 4
lisp/org-agenda.el

@@ -4945,11 +4945,16 @@ If this information is not given, the function uses the tree at point."
   (mouse-set-point ev)
   (org-agenda-goto))
 
-(defun org-agenda-show ()
-  "Display the Org-mode file which contains the item at point."
-  (interactive)
+(defun org-agenda-show (&optional full-entry)
+  "Display the Org-mode file which contains the item at point.
+With prefix argument FULL-ENTRY, make the entire entry visible
+if it was hidden in the outline."
+  (interactive "P")
   (let ((win (selected-window)))
-    (org-agenda-goto t)
+    (if full-entry
+	(let ((org-show-entry-below t))
+	  (org-agenda-goto t))
+      (org-agenda-goto t))
     (select-window win)))
 
 (defun org-agenda-recenter (arg)