summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2014-05-26 07:35:24 +0200
committerBastien Guerry <bzg@altern.org>2014-05-26 07:35:24 +0200
commit061904b58ee8af2360102121edb44e079c2ef2ac (patch)
treee49dcc018f4d536d7b8154a7757a39a649ec5acd
parente3d2c1b0c96cf07562fafb49237210bcab26bd96 (diff)
downloadorg-mode-061904b58ee8af2360102121edb44e079c2ef2ac.tar.gz
org-agenda.el (org-get-time-of-day): Don't return time string from within links
* org-agenda.el (org-get-time-of-day): Don't return time string from within links. Thanks to Thomas Morgan for reporting this.
-rw-r--r--lisp/org-agenda.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 270b95e..7d996e1 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6753,8 +6753,10 @@ The optional STRING argument forces conversion into a 5 character wide string
HH:MM."
(save-match-data
(when
- (or (string-match "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\> *" s)
- (string-match "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)?\\([AaPp][Mm]\\)\\> *" s))
+ (and
+ (or (string-match "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)\\([AaPp][Mm]\\)?\\> *" s)
+ (string-match "\\<\\([012]?[0-9]\\)\\(:\\([0-5][0-9]\\)\\)?\\([AaPp][Mm]\\)\\> *" s))
+ (not (eq (get-text-property 1 'face s) 'org-link)))
(let* ((h (string-to-number (match-string 1 s)))
(m (if (match-end 3) (string-to-number (match-string 3 s)) 0))
(ampm (if (match-end 4) (downcase (match-string 4 s))))