diff options
author | Bastien Guerry <bzg@altern.org> | 2011-06-27 18:22:37 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2011-06-27 18:22:37 +0200 |
commit | d7c693c1ffe2ebf38604dd30fdd2f9d51a1c44d0 (patch) | |
tree | 4e1ea57a6bb7bd01a5396ab3d0af846fd3cc198d | |
parent | 6d18e03519539b4d64a8a3bb0a37ce0e1c8dba9e (diff) | |
download | org-mode-d7c693c1ffe2ebf38604dd30fdd2f9d51a1c44d0.tar.gz |
org.el: fix bug about repeater not kept when using org-time-stamp
Thanks to Karl Voit for reporting this.
-rw-r--r-- | lisp/org.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/org.el b/lisp/org.el index 6434c00..e139f91 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -14382,6 +14382,13 @@ at the cursor, it will be modified." (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 + (end-of-line) + (when (re-search-backward + "\\([.+]+[0-9]+[dwmy]\\(?:[/ ][-+]?[0-9]+[dwmy]\\)?\\) ?" + (- (point) 20) t) + (match-string 1))))) org-time-was-given org-end-time-was-given time) (cond ((and (org-at-timestamp-p t) @@ -14401,7 +14408,11 @@ at the cursor, it will be modified." (setq org-last-changed-timestamp (org-insert-time-stamp time (or org-time-was-given arg) - inactive nil nil (list org-end-time-was-given)))) + inactive nil nil (list org-end-time-was-given))) + (when repeater (goto-char (1- (point))) (insert " " repeater) + (setq org-last-changed-timestamp + (concat (substring org-last-inserted-timestamp 0 -1) + " " repeater ">")))) (message "Timestamp updated")) (t (setq time (let ((this-command this-command)) |