emacs-orgmode@gnu.org archives
 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

* Re: [Bug]: org-capture-place-plain-text error when template :unnarrowed
  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
  1 sibling, 0 replies; 3+ messages in thread
From: No Wayman @ 2020-05-05 22:00 UTC (permalink / raw)
  To: emacs-orgmode, N V


Note, the empty string or a nil template do not cause the error.


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

* Re: [Bug]: org-capture-place-plain-text error when template :unnarrowed
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2020-05-07 20:37 UTC (permalink / raw)
  To: No Wayman; +Cc: emacs-orgmode

Hello,

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.

Regards,

-- 
Nicolas Goaziou


^ 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 public inbox

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

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