From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philip Hudson 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: Sun, 4 Nov 2018 16:31:22 +0000 Message-ID: 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; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gJLJZ-000118-JJ for emacs-orgmode@gnu.org; Sun, 04 Nov 2018 11:31:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gJLJU-0004YB-6C for emacs-orgmode@gnu.org; Sun, 04 Nov 2018 11:31:53 -0500 Received: from mail-pg1-f193.google.com ([209.85.215.193]:38423) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gJLJO-0004CU-9v for emacs-orgmode@gnu.org; Sun, 04 Nov 2018 11:31:44 -0500 Received: by mail-pg1-f193.google.com with SMTP id f8-v6so3092357pgq.5 for ; Sun, 04 Nov 2018 08:31:39 -0800 (PST) In-Reply-To: <8736sh9by2.fsf@nicolasgoaziou.fr> 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: emacs orgmode-mailinglist On Sun, 4 Nov 2018 at 14:03, Nicolas Goaziou wrote= : > > Philip Hudson writes: > > > On Sat, 3 Nov 2018 at 08:34, Nicolas Goaziou w= rote: > > >> I cannot see your template, since you did not send it yet. I assume it > >> uses an `entry' type. > > > > No assumption involved. I stated so plainly. > > Indeed. > > >> Barring `plain', all capture types enforce > >> a certain structure for contents. The `entry' type expects a node, whi= ch > >> is roughly a headline plus contents, as noted in the manual: > >> > >> =E2=80=98entry=E2=80=99 > >> An Org mode node, with a headline. Will be filed as the chi= ld > >> of the target entry or as a top-level entry. The target fil= e > >> should be an Org file. > > > > Agreed, understood, and 100% the case in both my case (I'm afraid > > you'll just have to take my word for it) and in the trivial but > > effectively illustrative minimal failing case I gave you. > > 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? > > The doco seems fine to me. I relied on it for the definition of my > > template, which has worked as expected for years. > > It might be that you misinterpreted the definition of a node. Hence my > suggestion to improve the documentation. If this is the only place that the definition should appear (not saying that I know or believe it is), then are we not free to say that it could be otherwise? Effectively, in terms of actual behavior, the definition of "node" (at least in this context) has been otherwise, for several years at least. In other words, absent a formal definition of interface/contract, the implementation /is/ the interface; this is an implementation change, and thus (arguably) a regression nevertheless. In still other words, I'm arguing this: 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? If that is true, then, under your definition, no well-formed and valid Org file constructed only from Org-capture using templates of the 'entry type can ever start with any number of #+FOO in-buffer settings. This is clearly at odds with the established definition of a well-formed and valid Org file. > In any case, you can simply move the keywords below the headline, and be > done with 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. --=20 Phil Hudson http://hudson-it.ddns.net Pretty Good Privacy (PGP) ID: 0x4E482F85