all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: Capture template insertion fails with #+FOO [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/phil/.emacs.d/elpa/org-9.1.14/)]
@ 2018-10-29 22:47 Philip Hudson
  2018-11-01 10:04 ` Philip Hudson
  2018-11-01 21:34 ` Nicolas Goaziou
  0 siblings, 2 replies; 14+ messages in thread
From: Philip Hudson @ 2018-10-29 22:47 UTC (permalink / raw)
  To: emacs orgmode-mailinglist

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

    https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------

Regression in org-capture template handling.

I expected my (previously working) org-capture template to be
inserted into a newly-created empty Org file. The file name and
location are the output of a function specified in the template
(sequentially numbered filename).

Function `org-capture-insert-template-here' in file org-capture.el
now errors if the template specifies that its type is 'entry and it
begins with one or more lines of the general form "#+KEY value".
The error traces to a call to `org-kill-is-subtree-p', defined in file
org.el.

Fix (sorry it's not a proper patch):

Change line 1399 of org-capture.el from:

   (org-capture-verify-tree (org-capture-get :template))

to:

   (org-capture-verify-tree (replace-regexp-in-string "#\+[^\n]*\n" ""
template))

(This includes a refactoring-out of that redundant call to `org-capture-get').

NOTE: I have signed the FSF papers. In fact I've made small
contributions to Org-mode previously.

Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
of 2017-09-12 on hullmann, modified by Debian
Package: Org mode version 9.1.14 (9.1.14-1-g4931fc-elpa @
/home/phil/.emacs.d/elpa/org-9.1.14/)

-- 
Phil Hudson                  http://hudson-it.ddns.net
Pretty Good Privacy (PGP) ID: 0x4E482F85

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

end of thread, other threads:[~2018-11-10 15:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-29 22:47 Bug: Capture template insertion fails with #+FOO [9.1.14 (9.1.14-1-g4931fc-elpa @ /home/phil/.emacs.d/elpa/org-9.1.14/)] Philip Hudson
2018-11-01 10:04 ` Philip Hudson
2018-11-01 21:34 ` Nicolas Goaziou
2018-11-02  0:24   ` Philip Hudson
2018-11-02  1:35     ` Nicolas Goaziou
2018-11-02  9:22       ` Philip Hudson
2018-11-03  8:34         ` Nicolas Goaziou
2018-11-03  9:09           ` Philip Hudson
2018-11-04 14:03             ` Nicolas Goaziou
2018-11-04 16:31               ` Philip Hudson
2018-11-05 21:46                 ` Nicolas Goaziou
2018-11-06 19:24                   ` Philip Hudson
2018-11-10 10:39                     ` Nicolas Goaziou
2018-11-10 15:06                       ` Philip Hudson

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.