From 181dc50d110f3ae01a60891074c445654d5b6182 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 17 Jan 2017 09:59:53 +0100 Subject: [PATCH] Small fix * lisp/org.el (org-clone-subtree-with-time-shift): Handle nil shift case. --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 00498f4bd..ea123abe2 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8999,7 +8999,8 @@ with the original repeater." (let* ((end (point)) (template (buffer-substring beg end)) (shift-n (and doshift (string-to-number (match-string 1 shift)))) - (shift-what (pcase (match-string 2 shift) + (shift-what (pcase (and doshift (match-string 2 shift)) + (`nil nil) ("d" 'day) ("w" (setq shift-n (* 7 shift-n)) 'day) ("m" 'month)