emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: No Wayman <iarchivedmywholelife@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [Bug]: org-capture-place-plain-text error when template :unnarrowed
Date: Thu, 07 May 2020 22:37:55 +0200	[thread overview]
Message-ID: <87k11n5vmk.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87h7wuawc1.fsf@gmail.com> (No Wayman's message of "Tue, 05 May 2020 17:46:54 -0400")


No Wayman <iarchivedmywholelife@gmail.com> writes:

> 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

Fixed. Thank you.


Nicolas Goaziou

      parent reply	other threads:[~2020-05-07 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 21:46 No Wayman
2020-05-05 22:00 ` No Wayman
2020-05-07 20:37 ` Nicolas Goaziou [this message]

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=87k11n5vmk.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=iarchivedmywholelife@gmail.com \
    --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).