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

Make agenda log mode also show the end time of a CLOCK entry.

Carsten Dominik преди 17 години
родител
ревизия
7416ed17aa
променени са 4 файла, в които са добавени 23 реда и са изтрити 8 реда
  1. 9 4
      ORGWEBPAGE/Changes.org
  2. 3 0
      lisp/ChangeLog
  3. 10 4
      lisp/org-agenda.el
  4. 1 0
      lisp/org.el

+ 9 - 4
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

+ 3 - 0
lisp/ChangeLog

@@ -1,5 +1,8 @@
 2008-06-16  Carsten Dominik  <dominik@science.uva.nl>
 
+	* 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.
 

+ 10 - 4
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

+ 1 - 0
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)