emacs-orgmode@gnu.org archives
 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 
  #+begin_src emacs-lisp
	(when (or (search-backward "%?" beg t)
		  (search-forward "%?" end t))

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"))

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"))

             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 ` 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:

  List information: https://www.orgmode.org/

* 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 \
    --subject='Re: [Bug]: org-capture-place-plain-text error when template :unnarrowed' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).