forked from mirrors/org-mode
Merge branch 'maint'
This commit is contained in:
commit
c3d67b3556
|
@ -8903,10 +8903,10 @@ with the original repeater."
|
||||||
"Date shift per clone (e.g. +1w, empty to copy unchanged): ")
|
"Date shift per clone (e.g. +1w, empty to copy unchanged): ")
|
||||||
""))) ;No time shift
|
""))) ;No time shift
|
||||||
(doshift
|
(doshift
|
||||||
(or (not (org-string-nw-p shift))
|
(and (org-string-nw-p shift)
|
||||||
(string-match "\\`[ \t]*\\+?\\([0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
|
(or (string-match "\\`[ \t]*\\+?\\([0-9]+\\)\\([dwmy]\\)[ \t]*\\'"
|
||||||
shift)
|
shift)
|
||||||
(user-error "Invalid shift specification %s" shift))))
|
(user-error "Invalid shift specification %s" shift)))))
|
||||||
(goto-char end-of-tree)
|
(goto-char end-of-tree)
|
||||||
(unless (bolp) (insert "\n"))
|
(unless (bolp) (insert "\n"))
|
||||||
(let* ((end (point))
|
(let* ((end (point))
|
||||||
|
|
|
@ -1376,6 +1376,14 @@
|
||||||
(replace-regexp-in-string
|
(replace-regexp-in-string
|
||||||
"\\( [.A-Za-z]+\\)\\( \\+[0-9][hdmwy]\\)?>" "" (buffer-string)
|
"\\( [.A-Za-z]+\\)\\( \\+[0-9][hdmwy]\\)?>" "" (buffer-string)
|
||||||
nil nil 1))))
|
nil nil 1))))
|
||||||
|
;; Clone with blank SHIFT argument.
|
||||||
|
(should
|
||||||
|
(string-prefix-p
|
||||||
|
"* H <2012-03-29"
|
||||||
|
(org-test-with-temp-text "* H <2012-03-29 Thu><point>"
|
||||||
|
(org-clone-subtree-with-time-shift 1 "")
|
||||||
|
(buffer-substring-no-properties (line-beginning-position 2)
|
||||||
|
(line-end-position 2)))))
|
||||||
;; Find time stamps before point. If SHIFT is not specified, ask
|
;; Find time stamps before point. If SHIFT is not specified, ask
|
||||||
;; for a time shift.
|
;; for a time shift.
|
||||||
(should
|
(should
|
||||||
|
@ -1391,7 +1399,7 @@
|
||||||
(org-test-with-temp-text "* H <2014-03-04 Tue><point>"
|
(org-test-with-temp-text "* H <2014-03-04 Tue><point>"
|
||||||
(cl-letf (((symbol-function 'read-from-minibuffer)
|
(cl-letf (((symbol-function 'read-from-minibuffer)
|
||||||
(lambda (&rest args) "+1d")))
|
(lambda (&rest args) "+1d")))
|
||||||
(org-clone-subtree-with-time-shift 1 "+1d"))
|
(org-clone-subtree-with-time-shift 1))
|
||||||
(buffer-substring-no-properties (line-beginning-position 2)
|
(buffer-substring-no-properties (line-beginning-position 2)
|
||||||
(line-end-position 2))))))
|
(line-end-position 2))))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue