Browse Source

Merge branch 'master' of orgmode.org:org-mode

Bastien Guerry 6 years ago
parent
commit
26b084d3b5
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org.el

+ 2 - 1
lisp/org.el

@@ -15567,7 +15567,7 @@ With prefix ARG, change that many days."
 The date will be changed by N times WHAT.  WHAT can be `day', `month',
 `year', `minute', `second'.  If WHAT is not given, the cursor position
 in the timestamp determines what will be changed."
-  (let ((pos (point))
+  (let ((pos (copy-marker (point)))
 	with-hm inactive
 	(dm (max (nth 1 org-time-stamp-rounding-minutes) 1))
 	org-ts-what
@@ -15631,6 +15631,7 @@ in the timestamp determines what will be changed."
 	    (org-insert-time-stamp time with-hm inactive nil nil extra))
       (org-clock-update-time-maybe)
       (goto-char pos)
+      (move-marker pos nil)
       ;; Try to recenter the calendar window, if any
       (if (and org-calendar-follow-timestamp-change
 	       (get-buffer-window "*Calendar*" t)