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: Sat, 10 Nov 2018 11:39:54 +0100 Message-ID: <87va55b4hx.fsf@nicolasgoaziou.fr> References: <87ftwkbhxs.fsf@nicolasgoaziou.fr> <87ftwk9s8e.fsf@nicolasgoaziou.fr> <877ehua7ab.fsf@nicolasgoaziou.fr> <8736sh9by2.fsf@nicolasgoaziou.fr> <87in1btcyo.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLQgN-0006wN-8d for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 05:40:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLQgI-0006M8-9L for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 05:40:03 -0500 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:59361) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gLQgH-0006CV-Uh for emacs-orgmode@gnu.org; Sat, 10 Nov 2018 05:39:58 -0500 In-Reply-To: (Philip Hudson's message of "Tue, 6 Nov 2018 19:24:07 +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: > You have been very clear and categorical about the definition of a > top-level entry/node/heading as a chunk of text starting with a single > asterisk (followed by whitespace, arbitrary heading text, optional > tags and optional further lines of text -- the foundational structure > all Org users are familiar with). Not a single asterisk. One or more asterisks. > You insist that if there is > Something Else before that asterisk -- "data", in your latest reply -- > then your chunk of text is simply and categorically not an entry. Such > a chunk of text may or may not /contain/ an entry, but it is > definitely not itself an entry. Correct. > For any preceding Something Else to disqualify a chunk of text as an > entry, it must first be Something. Lexically speaking, in-buffer > settings are comments; thus, lexically speaking, they are whitespace; > thus, lexically speaking, they are Nothing, not Something. That is my > argument for allowing preceding in-buffer settings within the > definition of an entry, not just in the context of org-capture but > throughout Org. Org has no comment syntax, not in the sense of what you would expect in a programming language. It has something called a "comment", e.g., # This is a comment but this is meaningful for the exporter only. In an Org document, it is behaves as a paragraph, e.g.: 1. Item1 # Comment 1. Item2 instead of 1. Item1 # Comment 2. Item2 There is no Nothing in an Org document. Of course, there syntactical elements in such a document. #+FOO: is one of them. So are #+BEGIN_CENTER and CLOCK:. But there is no reason to support capturing them before an entry, and not regular text. This is just inconsistent. This is also useless, as I pointed out already, since the location of keywords in a document doesn't matter. They need not be before the first heading. Eventually, it is awkward. Think about capturing an entry with text before it, in the "Target" node below: * Target Target contents ** Child Child contents It could become: * Target Target contents ** Child Child contents Captured before ** Captured Captured contents i.e., you modify "Child" contents even though you capture into "Target". It is possible that someone may come up with a use-case for that, but I would suggest them to implement their own capture mechanism. Org shouldn't support that. I stand on my ground: capturing an entry should be limited to real entries, no exception. Regards, -- Nicolas Goaziou