emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug]: org-capture-place-plain-text error when template :unnarrowed


From: No Wayman
Subject: [Bug]: org-capture-place-plain-text error when template :unnarrowed
Date: Tue, 05 May 2020 17:46:54 -0400
User-agent: mu4e 1.3.9; emacs 28.0.50


org-capture-place-plain-text throws an error for templates which meet the following criteria:
 - entry type is 'plain
 - the template has a non-nil :unnarrowed option
- the template string is not empty and does not explicitly include "%?"

Seems to be thrown in this section of org-capture-place-plain-text:
 #+begin_src emacs-lisp
        (when (or (search-backward "%?" beg t)
                  (search-forward "%?" end t))
 #+end_src

A minimal failing case:
#+begin_src emacs-lisp
(let ((org-capture-templates
      '(("t" "test" plain (file "/tmp/bug.org")
         "FAIL" :unnarrowed t))))
 (org-capture nil "t"))
#+end_src

And a minimal passing case:
#+begin_src emacs-lisp
(let ((org-capture-templates
      '(("t" "test" plain (file "/tmp/bug.org")
         "PASS%?" :unnarrowed t))))
 (org-capture nil "t"))
#+end_src



reply via email to

[Prev in Thread] Current Thread [Next in Thread]