summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-09-13 01:28:00 +0200
committerBastien Guerry <bzg@altern.org>2012-09-13 01:28:00 +0200
commitc6d0af8c5b50a1ce2b418de0ad8ad086172e0c90 (patch)
tree13b340db08c3f06f7a615cf83fc074def1ddfdb3
parent795b578ec1202b81fd27309e9a47fe8c3d2c761a (diff)
downloadorg-mode-c6d0af8c5b50a1ce2b418de0ad8ad086172e0c90.tar.gz
org.el (org-read-date-analyze): Allow relative input and time string.
* org.el (org-read-date-analyze): Fix bug introduced in commit cc5f9f: adding a time should not prevent relative answers to be parsed correctly. Thanks to Michael Brand for reporting this.
-rw-r--r--lisp/org.el17
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 90d40e2..3fbd340 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15618,15 +15618,14 @@ user."
(setq ans "+0"))
(when (setq delta (org-read-date-get-relative ans (current-time) org-def))
- (unless (save-match-data (string-match org-plain-time-of-day-regexp ans))
- (setq ans (replace-match "" t t ans)
- deltan (car delta)
- deltaw (nth 1 delta)
- deltadef (nth 2 delta))))
-
- ;; Check if there is an iso week date in there
- ;; If yes, store the info and postpone interpreting it until the rest
- ;; of the parsing is done
+ (setq ans (replace-match "" t t ans)
+ deltan (car delta)
+ deltaw (nth 1 delta)
+ deltadef (nth 2 delta)))
+
+ ;; Check if there is an iso week date in there. If yes, store the
+ ;; info and postpone interpreting it until the rest of the parsing
+ ;; is done.
(when (string-match "\\<\\(?:\\([0-9]+\\)-\\)?[wW]\\([0-9]\\{1,2\\}\\)\\(?:-\\([0-6]\\)\\)?\\([ \t]\\|$\\)" ans)
(setq iso-year (if (match-end 1)
(org-small-year-to-year