[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] org-time-stamp adds "repeater" where there is none.
From: |
Nicolas Richard |
Subject: |
[O] org-time-stamp adds "repeater" where there is none. |
Date: |
Fri, 13 Feb 2015 17:01:52 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Consider the following line:
<2015-02-13 ven.> (10h-13h)
Hiting C-c . RET with point on the timestamp gives
<2015-02-13 ven. -13h> (10h-13h)
which is not expected.
Please consider the patch below
>From 688851438f363eaa86dcfe2acfb779d6c22adc16 Mon Sep 17 00:00:00 2001
From: Nicolas Richard <address@hidden>
Date: Fri, 13 Feb 2015 16:57:59 +0100
Subject: [PATCH] * lisp/org.el (org-time-stamp): Restrict to timestamp when
determining repeater.
---
lisp/org.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 7c2419d..6a0e4c6 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16149,12 +16149,13 @@ (defun org-time-stamp (arg &optional inactive)
(apply 'encode-time (org-parse-time-string (match-string 1)))
(current-time)))
(default-input (and ts (org-get-compact-tod ts)))
- (repeater (save-excursion
- (save-match-data
- (beginning-of-line)
- (when (re-search-forward
+ (repeater (save-match-data
+ (with-temp-buffer
+ (insert ts)
+ (goto-char (point-min))
+ (when (re-search-forward
"\\([.+-]+[0-9]+[hdwmy] ?\\)+" ;;\\(?:[/
][-+]?[0-9]+[hdwmy]\\)?\\) ?"
- (save-excursion (progn (end-of-line) (point))) t)
+ nil t)
(match-string 0)))))
org-time-was-given org-end-time-was-given time)
(cond
--
2.1.4
- [O] org-time-stamp adds "repeater" where there is none.,
Nicolas Richard <=