From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: suggestion for a fix to org-clock-in Date: Tue, 28 Jul 2009 21:48:37 +0200 Message-ID: <864oswa8ru.fsf@neuf.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVsfF-0003PN-D0 for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 15:48:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVsfD-0003Oz-Do for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 15:48:43 -0400 Received: from [199.232.76.173] (port=39665 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVsfD-0003Ow-76 for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 15:48:43 -0400 Received: from smtp23.services.sfr.fr ([93.17.128.19]:12543) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MVsfC-0007u7-MM for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 15:48:42 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2303.sfr.fr (SMTP Server) with ESMTP id 42DE0700008A for ; Tue, 28 Jul 2009 21:48:40 +0200 (CEST) Received: from lowzel.ath.cx (236.95.74-86.rev.gaoland.net [86.74.95.236]) by msfrf2303.sfr.fr (SMTP Server) with ESMTP id 292287000088 for ; Tue, 28 Jul 2009 21:48:40 +0200 (CEST) Received: from Misty. (46.183.98-84.rev.gaoland.net [84.98.183.46]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lowzel.ath.cx (Postfix) with ESMTPSA id BB9D226004D for ; Tue, 28 Jul 2009 21:48:39 +0200 (CEST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= 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. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Teach-org-clock-in-about-other-date-formats.patch Content-Description: patch to org-clock.el >From 0f149d1e515d017fed78fc5038127970843f9e81 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou 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 --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--