From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Clock time implied as 00:00 Date: Sat, 31 Dec 2011 09:42:46 +0100 Message-ID: <87r4zlcet5.fsf@gnu.org> References: <87pqf7b9jt.fsf@iro.umontreal.ca> <26531.1325284067@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RguVs-0004ny-VN for emacs-orgmode@gnu.org; Sat, 31 Dec 2011 03:42:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RguVZ-0002WX-1B for emacs-orgmode@gnu.org; Sat, 31 Dec 2011 03:42:00 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:35491) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RguVY-0002WR-RP for emacs-orgmode@gnu.org; Sat, 31 Dec 2011 03:41:40 -0500 Received: by wgbdt11 with SMTP id dt11so19506849wgb.30 for ; Sat, 31 Dec 2011 00:41:40 -0800 (PST) In-Reply-To: <26531.1325284067@alphaville.dokosmarshall.org> (Nick Dokos's message of "Fri, 30 Dec 2011 17:27:47 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: nicholas.dokos@hp.com Cc: =?us-ascii?Q?=22=3D=3Futf-8=3FQ=3FFran=3DC3?= =?us-ascii?Q?=3DA7ois=3F=3D=22?= Pinard , emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi François and Nick, I have tested this small patch, implementing Nick's solution. No breakage on my side -- but let's be careful here. Thanks for testing, --=-=-= Content-Type: text/x-patch; charset=iso-8859-1 Content-Disposition: attachment; filename=0001-Be-a-bit-more-flexible-when-matching-time-values-in-.patch Content-Transfer-Encoding: 8bit >From 6b2fbed71355f5b37b723e15e7aad20fb4ce3f07 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 31 Dec 2011 09:39:58 +0100 Subject: [PATCH] Be a bit more flexible when matching time values in timestamps. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * org.el (org-ts-regexp0, org-ts-regexp1): Also match a time value with only one digit for the hours. Thanks to François Pinard for mentioning this. --- lisp/org.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 61ca072..882e349 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5214,11 +5214,11 @@ This should be called after the variable `org-link-types' has changed." "Regular expression for fast time stamp matching.") (defconst org-ts-regexp-both "[[<]\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^]\r\n>]*?\\)[]>]" "Regular expression for fast time stamp matching.") -(defconst org-ts-regexp0 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" +(defconst org-ts-regexp0 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" "Regular expression matching time strings for analysis. This one does not require the space after the date, so it can be used on a string that terminates immediately after the date.") -(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" +(defconst org-ts-regexp1 "\\(\\([0-9]\\{4\\}\\)-\\([0-9]\\{2\\}\\)-\\([0-9]\\{2\\}\\) *\\([^]+0-9>\r\n -]*\\)\\( \\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)?\\)" "Regular expression matching time strings for analysis.") (defconst org-ts-regexp2 (concat "<" org-ts-regexp1 "[^>\n]\\{0,16\\}>") "Regular expression matching time stamps, with groups.") -- 1.7.8.1 --=-=-= Content-Type: text/plain -- Bastien --=-=-=--