emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] suggestion for a fix to org-clock-in


From: Nicolas Goaziou
Subject: [Orgmode] suggestion for a fix to org-clock-in
Date: Tue, 28 Jul 2009 21:48:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Hello,

For some time zone reason, my time-stamps look like this [2009-07-28
mar.]. Notice the dot after the name of the day.

This prevents the regexp inside org-clock-in to recognize it as a valid
clock format as thus to resume any started clock.

I suggest the following simple patch.

>From 0f149d1e515d017fed78fc5038127970843f9e81 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou <address@hidden(none)>
Date: Tue, 28 Jul 2009 20:55:06 +0200
Subject: [PATCH] Teach org-clock-in about other date formats

Depending on your time zone, the timestamps can have somewhat differents 
formats (ex.: [2009-07-28 mar. 21:00]).
This kind of format is now recognized as a valid clock time when it comes to 
resuming it.
---
 lisp/org-clock.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-clock.el b/lisp/org-clock.el
index 7fa15e0..48a0741 100644
--- a/lisp/org-clock.el
+++ b/lisp/org-clock.el
@@ -558,7 +558,7 @@ the clocking selection, associated with the letter `d'."
                   (looking-at
                    (concat "^[ \t]* " org-clock-string
                            " \\[\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}"
-                           " +\\sw+ +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
+                           " +\\sw+\.? +[012][0-9]:[0-5][0-9]\\)\\][ \t]*$")))
              (message "Matched %s" (match-string 1))
              (setq ts (concat "[" (match-string 1) "]"))
              (goto-char (match-end 1))
-- 
1.6.0.4

Comments are welcome.

-- 
Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]