branch: externals/org
commit 76f9a3c2cb76bcd1e550d68a749de9ef2772644d
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    org-timestamp-change: Add FIXME
    
    * lisp/org.el (org-timestamp-change): Add FIXME comment to
    re-implement the logic in future to avoid `save-excursion' markers
    being moved to the end of timestamp.
---
 lisp/org.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index a35f3260c2..59fe3d2d34 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14845,6 +14845,12 @@ When SUPPRESS-TMP-DELAY is non-nil, suppress delays 
like
       (setq timestamp? (or what timestamp?)
            inactive (= (char-after (match-beginning 0)) ?\[)
            ts (match-string 0))
+      ;; FIXME: Instead of deleting everything and then inserting
+      ;; later, we should make use of `replace-match', which preserves
+      ;; markers.  The current implementation suffers from
+      ;; `save-excursion' not preserving point inside the timestamp
+      ;; once we delete the timestamp here.  The point moves to the
+      ;; updated timestamp end.
       (replace-match "")
       (when (string-match
             "\\(\\(-[012][0-9]:[0-5][0-9]\\)?\\( 
+[.+]?-?[-+][0-9]+[hdwmy]\\(/[0-9]+[hdwmy]\\)?\\)*\\)[]>]"

Reply via email to