From: Bastien <bzg@altern.org>
To: nicholas.dokos@hp.com
Cc: "=?utf-8?Q?Fran=C3=A7ois?=" Pinard <pinard@iro.umontreal.ca>,
emacs-orgmode@gnu.org
Subject: Re: Clock time implied as 00:00
Date: Sat, 31 Dec 2011 09:42:46 +0100 [thread overview]
Message-ID: <87r4zlcet5.fsf@gnu.org> (raw)
In-Reply-To: <26531.1325284067@alphaville.dokosmarshall.org> (Nick Dokos's message of "Fri, 30 Dec 2011 17:27:47 -0500")
[-- Attachment #1: Type: text/plain, Size: 160 bytes --]
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,
[-- Attachment #2: 0001-Be-a-bit-more-flexible-when-matching-time-values-in-.patch --]
[-- Type: text/x-patch, Size: 2000 bytes --]
From 6b2fbed71355f5b37b723e15e7aad20fb4ce3f07 Mon Sep 17 00:00:00 2001
From: Bastien Guerry <bzg@altern.org>
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
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
next prev parent reply other threads:[~2011-12-31 8:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 16:57 Clock time implied as 00:00 François Pinard
2011-12-29 19:47 ` Nick Dokos
2011-12-30 22:27 ` Nick Dokos
2011-12-31 8:42 ` Bastien [this message]
2011-12-31 17:01 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4zlcet5.fsf@gnu.org \
--to=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=nicholas.dokos@hp.com \
--cc=pinard@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).