all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: No Wayman <iarchivedmywholelife@gmail.com>
To: emacs-orgmode@gnu.org, N V <iarchivedmywholelife@gmail.com>
Subject: [Bug]: org-capture-place-plain-text error when template :unnarrowed
Date: Tue, 05 May 2020 17:46:54 -0400	[thread overview]
Message-ID: <87h7wuawc1.fsf@gmail.com> (raw)


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	other threads:[~2020-05-05 21:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 21:46 No Wayman [this message]
2020-05-05 22:00 ` [Bug]: org-capture-place-plain-text error when template :unnarrowed No Wayman
2020-05-07 20:37 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7wuawc1.fsf@gmail.com \
    --to=iarchivedmywholelife@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.