From 63eca1958738c265acefc74bbc9c5113ceec8fc3 Mon Sep 17 00:00:00 2001 From: Adrian Aichner Date: Sun, 28 Oct 2007 21:29:33 -0400 Subject: [PATCH] Tiny usability changes (generalizations) for my environment --- ChangeLog | 11 +++++++++++ contrib/timeclock.el | 2 +- planner-gnus.el | 13 +++++++++---- planner-timeclock.el | 3 ++- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1b5fefc..732b2e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-10-29 Adrian Aichner + + * timeclock.el: Typo fix. + + * planner-gnus.el (planner-gnus-get-message-id): Make gnuslog (see + http://www.emacswiki.org/cgi-bin/wiki/GnusLog) URLs useful in + context of current gnuslog-file. + + * planner-timeclock.el (defadvice planner-replan-task): Make + project match optional (for tasks added manually). + 2007-09-26 John Sullivan * planner.el (planner-search-notes-internal): Don't include the diff --git a/contrib/timeclock.el b/contrib/timeclock.el index b39dc92..4c24d90 100644 --- a/contrib/timeclock.el +++ b/contrib/timeclock.el @@ -79,7 +79,7 @@ ;; Version 2.7: ;; -;; Include changes made on 2006-08-01 by Aidrian Aichner +;; Include changes made on 2006-08-01 by Adrian Aichner ;; which make it easier to work with a ;; pgp-encrypted timeclock file. diff --git a/planner-gnus.el b/planner-gnus.el index 640d6d4..718edee 100644 --- a/planner-gnus.el +++ b/planner-gnus.el @@ -83,10 +83,15 @@ can type C-c C-t to call planner-create-task-from-buffer." "Return the message-id of the current message." (save-excursion (if (equal major-mode 'gnus-summary-mode) - (mail-header-message-id (gnus-data-header - (assq (or article-number - (gnus-summary-article-number)) - gnus-newsgroup-data))) + (let + ((mhmi + (mail-header-message-id (gnus-data-header + (assq (or article-number + (gnus-summary-article-number)) + gnus-newsgroup-data))))) + (if (nnheader-fake-message-id-p mhmi) + (number-to-string article-number) + mhmi)) ;; Refer to the article buffer (save-excursion (goto-char (point-min)) diff --git a/planner-timeclock.el b/planner-timeclock.el index 8c06af8..d33d048 100644 --- a/planner-timeclock.el +++ b/planner-timeclock.el @@ -110,7 +110,8 @@ (while (re-search-forward (concat "^. [^ \n]+ [^ \n]+ " - "\\(" (regexp-quote (planner-timeclock-plan-string info)) "\\)" + ;; make project match optional (for tasks added manually). + "\\(" (regexp-quote (planner-timeclock-plan-string info)) "\\)?" (regexp-quote (planner-task-description info)) "$") nil t) (replace-match (save-match-data (planner-timeclock-plan-string nil (ad-get-arg 0))) -- 2.11.4.GIT