emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Philip Hudson <phil.hudson@iname.com>
Cc: emacs orgmode-mailinglist <emacs-orgmode@gnu.org>
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	[thread overview]
Message-ID: <87va55b4hx.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAJ1MqVEXLdndeKfJkpy4Bw6iO0gJ518PxipwhnXO9djqyOj8HA@mail.gmail.com> (Philip Hudson's message of "Tue, 6 Nov 2018 19:24:07 +0000")

Hello,

Philip Hudson <phil.hudson@iname.com> 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

  reply	other threads:[~2018-11-10 10:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2018-11-10 15:06                       ` Philip Hudson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87va55b4hx.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=phil.hudson@iname.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).