1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-28 10:56:57 +00:00

Allow to only display logging information in the agenda.

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.
This commit is contained in:
Carsten Dominik 2008-11-09 08:17:33 +01:00
parent 7e483b6a1c
commit fb92308d22
5 changed files with 35 additions and 11 deletions

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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.

View File

@ -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"