Re: [O] org-time-stamp adds repeater where there is none.

2015-02-16 Thread Nicolas Richard
Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 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.

 It should now be fixed.

Thanks, works great so far (unlike my own patch, which would fail in
some situations).

-- 
Nicolas



[O] org-time-stamp adds repeater where there is none.

2015-02-13 Thread Nicolas Richard
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 theonewiththeevill...@yahoo.fr
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



Re: [O] org-time-stamp adds repeater where there is none.

2015-02-13 Thread Nicolas Goaziou
Hello,

Nicolas Richard theonewiththeevill...@yahoo.fr writes:

 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.

It should now be fixed.

 Please consider the patch below

Thank you for the patch. However, I applied something different.


Regards,

-- 
Nicolas Goaziou