summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-02-19 13:32:49 +0100
committerBastien <bzg@gnu.org>2020-02-19 13:32:49 +0100
commit26ba4f7d7fa1d920a49394b7d18acd6432d3268d (patch)
tree5c9b95ba1d37170cf6d18aa114a9fe414eccb228
parent4150832d430ac52acbda5d00be4277aea21d3c38 (diff)
downloadorg-mode-26ba4f7d7fa1d920a49394b7d18acd6432d3268d.tar.gz
org-capture.el: Don't throw an error abusively
* lisp/org-capture.el (org-capture-fill-template): Don't throw a user error when immediately finishing a template from which an initial annotation is missing, warn instead. This fixes 78ec8da52a. Thanks to Eric Fraga for reporting this.
-rw-r--r--lisp/org-capture.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index fac6030..01ecd0e 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1576,11 +1576,11 @@ The template may still contain \"%?\" for cursor positioning."
annotation
(org-capture-get :annotation)
;; When immediately finishing and %a cannot be
- ;; expanded, through a user error:
+ ;; expanded, warn the user:
(if (org-capture-get :immediate-finish)
- (user-error "Missing initial annotation in this template: %s"
- (replace-regexp-in-string
- "\n" " " (org-capture-get :template)))
+ (warn "Missing initial annotation in this template: %s"
+ (replace-regexp-in-string
+ "\n" " " (org-capture-get :template)))
""))))
;; Is the link empty? Then we do not want it...
(if (equal a "[[]]") "" a)))