summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2008-11-09 08:17:33 +0100
committerCarsten Dominik <carsten.dominik@gmail.com>2008-11-09 08:17:33 +0100
commitfb92308d22eacf1333c9240aabf771b79efbf638 (patch)
tree6e6545b4f3fdedd84624960ffeca56b303786204
parent7e483b6a1c77298cc64cc188447b5ea6c0fda77f (diff)
downloadorg-mode-fb92308d22eacf1333c9240aabf771b79efbf638.tar.gz
Allow to only display logging information in the agenda.release_6.11b
Jurgen Defume asked for a way to display only logging information in the agenda. This patch implements such a possibility. It works by calling `org-agenda-log-mode' (bound to `l' in the agenda) with a double prefix arg. This sets the variable `org-agenda-show-log' to a special value `only' which is then interpreted by the agenda-creating functions.
-rw-r--r--ORGWEBPAGE/Changes.org5
-rw-r--r--doc/ChangeLog4
-rw-r--r--doc/org.texi3
-rwxr-xr-xlisp/ChangeLog6
-rw-r--r--lisp/org-agenda.el28
5 files changed, 35 insertions, 11 deletions
diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org
index e4cd7a8..c92a061 100644
--- a/ORGWEBPAGE/Changes.org
+++ b/ORGWEBPAGE/Changes.org
@@ -70,9 +70,12 @@
much for normal applications, you can also temporarily
request the inclusion of state changes by pressing =C-u l= in
the agenda.
-
+
This was a request by Hsiu-Khuern Tang.
+ You can also press `C-u C-u l' to get *only* log items in the
+ agenda, withour any timestamps/deadlines etc.
+
*** Footnote in HTML export are now collected at the end of the document
Previously, footnotes would be left in the document where
they are defined, now they are all collected and put into a
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 125df86..225db29 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,7 @@
+2008-11-09 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org.texi (Agenda commands): Document the double-prefix version
+ of the `l' command in the agenda.
2008-11-05 Carsten Dominik <dominik@science.uva.nl>
diff --git a/doc/org.texi b/doc/org.texi
index ae987d6..8eba93f 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -5937,7 +5937,8 @@ logging was on (variable @code{org-log-done}) are shown in the agenda, as are
entries that have been clocked on that day. You can configure the entry
types that should be included in log mode using the variable
@code{org-agenda-log-mode-items}. When called with a @kbd{C-u} prefix, show
-all possible logbook entries, including state changes.
+all possible logbook entries, including state changes. When called with two
+prefix args @kbd{C-u C-u}, show only logging information, nothing else.
@c
@kindex v
@item v
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f40f3bd..0d03d38 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-09 Carsten Dominik <carsten.dominik@gmail.com>
+
+ * org-agenda.el (org-agenda-list): Handle the value `only' of
+ org-agenda-show-log'.
+ (org-agenda-log-mode): Interpret a double prefix arg.
+
2008-11-08 Carsten Dominik <carsten.dominik@gmail.com>
* org-exp.el (org-export-html-footnotes-section): New variable.
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index dbebe6d..59d58ac 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -2426,13 +2426,18 @@ given in `org-agenda-start-on-weekday'."
(while (setq file (pop files))
(catch 'nextfile
(org-check-agenda-file file)
- (if org-agenda-show-log
- (setq rtn (org-agenda-get-day-entries
- file date
- :deadline :scheduled :timestamp :sexp :closed))
+ (cond
+ ((eq org-agenda-show-log 'only)
+ (setq rtn (org-agenda-get-day-entries
+ file date :closed)))
+ (org-agenda-show-log
(setq rtn (org-agenda-get-day-entries
file date
- :deadline :scheduled :sexp :timestamp)))
+ :deadline :scheduled :timestamp :sexp :closed)))
+ (t
+ (setq rtn (org-agenda-get-day-entries
+ file date
+ :deadline :scheduled :sexp :timestamp))))
(setq rtnall (append rtnall rtn))))
(if org-agenda-include-diary
(progn
@@ -4628,13 +4633,18 @@ so that the date SD will be in that range."
(message "Clocktable mode is %s"
(if org-agenda-clockreport-mode "on" "off")))
-(defun org-agenda-log-mode (&optional with-states)
- "Toggle log mode in an agenda buffer."
+(defun org-agenda-log-mode (&optional special)
+ "Toggle log mode in an agenda buffer.
+With argument SPECIAL, show all possible log items, not only the ones
+configured in `org-agenda-log-mode-items'.
+With a double `C-u' prefix arg, show *only* log items, nothing else."
(interactive "P")
(org-agenda-check-type t 'agenda 'timeline)
(setq org-agenda-show-log
- (if with-states '(closed clock state)
- (not org-agenda-show-log)))
+ (if (equal special '(16))
+ 'only
+ (if special '(closed clock state)
+ (not org-agenda-show-log))))
(org-agenda-set-mode-name)
(org-agenda-redo)
(message "Log mode is %s"