From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: 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/)] Date: Mon, 05 Nov 2018 22:46:07 +0100 Message-ID: <87in1btcyo.fsf@nicolasgoaziou.fr> References: <87ftwkbhxs.fsf@nicolasgoaziou.fr> <87ftwk9s8e.fsf@nicolasgoaziou.fr> <877ehua7ab.fsf@nicolasgoaziou.fr> <8736sh9by2.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38959) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJmhW-0006T1-B8 for emacs-orgmode@gnu.org; Mon, 05 Nov 2018 16:46:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJmhM-0007um-1Q for emacs-orgmode@gnu.org; Mon, 05 Nov 2018 16:46:20 -0500 Received: from relay10.mail.gandi.net ([217.70.178.230]:42781) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gJmhI-0007g7-Cf for emacs-orgmode@gnu.org; Mon, 05 Nov 2018 16:46:14 -0500 In-Reply-To: (Philip Hudson's message of "Sun, 4 Nov 2018 16:31:22 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Philip Hudson Cc: emacs orgmode-mailinglist Hello, Philip Hudson writes: > On Sun, 4 Nov 2018 at 14:03, Nicolas Goaziou wrote: >> No, it is not the case. AFAIU, in the minimal failing case, you capture >> >> #+FOO: bar >> * Baz >> >> This is _not_ a node. A node starts with a headline and everything is >> contained within that headline. So it doesn't qualify as a valid `entry' >> capture type. > > That's disappointing, and, obviously, news to me. So I have not > encountered a regression but rather a tightening of the existing > documented contract. Is that a fair interpretation of what you're > saying? If so, and not that I doubt you, do you have a reference for > that? It is not a tightening of anything. The function responsible for the raised error is `org-capture-verify-tree'. It is called from the function responsible for capturing `entry' types since December 2010: commit 8aacc708dd038fd0d351abbed04d49f813f8a7bf Author: Carsten Dominik Date: Thu Dec 16 16:51:04 2010 +0100 Capture: Better error message for invalid entry-type templates It seems to me the intent is clear, and from the documentation, I wouldn't have thought about inserting data before the headline. I'm surprised that your template even worked at some point. I did my homework, though. I tried the following set-up (setq org-capture-templates '(("B" "BUG" entry (file "/tmp/bug-capture.org") "#+BAR: baz\n* Foo" :immediate-finish t))) Even in Org 8.2.10, which is old in my book, I got an error mentioning the template was invalid. > The idea of 'entry type for templates, and of a node as we are > discussing it, is that a well-formed and valid Org file is composed > exclusively of these entities and nothing else. Correct? Not at all. I'm absolutely not talking about what is a valid Org file. See for this. I'm talking about what can be captured using an `entry' template, i.e., a node/heading/entry and that's it. > Sorry if this is getting tiresome. At this point I'm content for you > to close this issue and move on if you'd rather. I'll change my > template type to 'plain, or find some other workaround. But if you'd > like to keep going for the sake of clarifying what the right and > proper meaning of 'entry and "node" are then I'm glad to participate. Entry, node, and heading (and to some extent, headline) are synonyms. They mean star(s) at the beginning of line, followed by a space, and optionally other stuff of that line. Contents can be anything as long as no line starts with as many or less stars followed by a space, i.e., there is no headline of a lesser or equal level. In any case, if documentation needs to be clarified, please let me know. Regards, -- Nicolas Goaziou