From 7416ed17aa5e000cf9312557df426d19d3db67b8 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Mon, 16 Jun 2008 17:49:53 +0200 Subject: [PATCH] Make agenda log mode also show the end time of a CLOCK entry. --- ORGWEBPAGE/Changes.org | 13 +++++++++---- lisp/ChangeLog | 3 +++ lisp/org-agenda.el | 14 ++++++++++---- lisp/org.el | 1 + 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/ORGWEBPAGE/Changes.org b/ORGWEBPAGE/Changes.org index 814ae5e66..27b2fe94c 100644 --- a/ORGWEBPAGE/Changes.org +++ b/ORGWEBPAGE/Changes.org @@ -1,6 +1,6 @@ # -*- mode: org; org-export-publishing-directory: "tmp"; fill-column: 65 -*- -#+STARTUP: +#+STARTUP: hidestars #+TITLE: Org-mode list of user-visible changes #+AUTHOR: Carsten Dominik @@ -30,6 +30,7 @@ thanks for all the great ideas. - The format of section numbers in exported files is configurable - Direct, single key access to allowed values in column view - New hook to hack exported iCalendar files + - Log mode in agenda now shows end time for CLOCK line ** Incompatible changes @@ -128,9 +129,9 @@ keyword =WAITING=, in all agenda files. *** Changes in Remember templates **** Remember templates can now use the cursor date in the agenda - - Thanks to Thomas Baumann for starting up a thread - that let to this idea. + Use =k r= to start remember from the agenda, with enforcing + the cursor date as default for any time stamps created by + the template. **** Filing remember templates to the beginning or end of a file You may now set the heading part of a remember template @@ -176,6 +177,10 @@ keyword =WAITING=, in all agenda files. This is what I settled for after a long discussion with Adam Spiers about doing some special filtering automatically. +*** Log mode in agenda now shows start end time for CLOCK lines + When turning on log mode in the agenda with =l=, clock lines + will now also list the end time, not only the starting time. + Thanks to Tian Qiu for bringing this up again. * Version 6.04 ** Overview diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66a4d5f0d..94187b908 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2008-06-16 Carsten Dominik + * org-agenda.el (org-agenda-get-closed): Get the end time into the + agenda prefix as well. + * org-publish.el (org-publish-org-index): Make a properly indented list. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 05d7c247b..c5a0044e7 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3302,7 +3302,7 @@ the documentation of `org-diary'." (list 0 0 0 (nth 1 date) (car date) (nth 2 date)))) 1 11)))) marker hdmarker priority category tags closedp - ee txt timestr) + ee txt timestr rest) (goto-char (point-min)) (while (re-search-forward regexp nil t) (catch :skip @@ -3313,9 +3313,15 @@ the documentation of `org-diary'." timestr (buffer-substring (match-beginning 0) (point-at-eol)) ;; donep (org-entry-is-done-p) ) - (if (string-match "\\]" timestr) - ;; substring should only run to end of time stamp - (setq timestr (substring timestr 0 (match-end 0)))) + (when (string-match "\\]" timestr) + ;; substring should only run to end of time stamp + (setq rest (substring timestr (match-end 0)) + timestr (substring timestr 0 (match-end 0))) + (if (and (not closedp) + (string-match "\\([0-9]\\{1,2\\}:[0-9]\\{2\\}\\)\\]" rest)) + (setq timestr (concat (substring timestr 0 -1) + "-" (match-string 1 rest) "]")))) + (save-excursion (if (re-search-backward "^\\*+ " nil t) (progn diff --git a/lisp/org.el b/lisp/org.el index 9de124db1..efbd89780 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8595,6 +8595,7 @@ Returns the new TODO keyword, or nil if no state change should occur." (match-string 1))))) (defvar org-last-changed-timestamp) +(defvar org-last-inserted-timestamp) (defvar org-log-post-message) (defvar org-log-note-purpose) (defvar org-log-note-how) -- 2.11.4.GIT