all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [Bug]: org-capture-place-plain-text error when template :unnarrowed
@ 2020-05-05 21:46 No Wayman
  2020-05-05 22:00 ` No Wayman
  2020-05-07 20:37 ` Nicolas Goaziou
  0 siblings, 2 replies; 3+ messages in thread
From: No Wayman @ 2020-05-05 21:46 UTC (permalink / raw)
  To: emacs-orgmode, N V


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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-07 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-05 21:46 [Bug]: org-capture-place-plain-text error when template :unnarrowed No Wayman
2020-05-05 22:00 ` No Wayman
2020-05-07 20:37 ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.