From: Ihor Radchenko <yantar92@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: [feature request] A new cookie type [!] showing the last note taken
Date: Mon, 31 Aug 2020 10:26:15 +0800 [thread overview]
Message-ID: <87y2lvwny0.fsf@localhost> (raw)
In-Reply-To: <87sgc470lk.fsf@nicolasgoaziou.fr>
> I wouldn't dismiss plain text insertion too easily, either. It also
> includes external tools. What happens if an external tool automatically
> insert notes?
>
> The feature you are requesting could make sense if notes had a clear
> syntax. This would bring some interesting features, too (e.g., being
> able to list all notes in an entry, accurately). But it would also raise
> new problems, as any syntax change (backward compatibility with old
> documents, external tools...).
I would not call defining syntax for notes "a syntax change". Rather
addition to syntax. Since there was no formal definition of notes in the
past, introducing formal syntax for notes should not break any existing
tool. If anything, it should make it easier for those tools to deal with
notes.
For the compatibility, we can reuse the frequently used (at least,
because it is built-in) syntax used by `org-add-note' (see below).
> This is more realistic, but you are then binding the tool
> (`org-add-note') to the syntax ("[!]"), which is a step in the wrong
> direction. We must not assume Org mode is the only tool writing Org
> documents.
Good point.
Instead of linking to the function, we can define the format used by
`org-add-note' as a formal format for notes. Currently `org-add-note'
uses the following format:
- <note heading> \\
<User note, possibly multi-line>
The <note heading> is taken from `org-log-note-headings'.
Notably, this syntax is partially used in org, despite lack of formal
definition. For example, `org-habit-parse-todo' assumes that state
change notes were added by `org-add-note' using format defined in
`org-log-note-headings'. All the external tools dealing with state
change statistics already have to consider this syntax.
Also, it can nicely play with the existing built-in
`org-element-plain-list-parser' with note being a special kind of list
element.
Best,
Ihor
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> I feel that my understand of "note" in context of org is different from
>> yours. Is there a formal definition of "note" in org?
>
> As I stated in my first post a few hours ago:
>
> Notes are mostly free-form; there is no syntax describing them.
>
>> However, we can formalise the "last note taken" to "last note taken
>> using org-add-note".
>
> This is more realistic, but you are then binding the tool
> (`org-add-note') to the syntax ("[!]"), which is a step in the wrong
> direction. We must not assume Org mode is the only tool writing Org
> documents.
>
>> org-add-note is the only way I am aware about (except plain text,
>> indeed). That's why I wrote the function saving the last note taken
>> using org-add-note into SUMMARY. The property is only used here for
>> convenient retrieval, not because I implied showing a property value.
>
> I understand the property was used for convenience, but showing its
> value is the only problem your can really claim solving at the moment.
>
>> May I know what are the other ways to add note via interactive function
>> in Org?
>
> Capture is certainly one way. In fact, `org-add-note' could (should ?)
> be rewritten using Capture library.
>
> I wouldn't dismiss plain text insertion too easily, either. It also
> includes external tools. What happens if an external tool automatically
> insert notes?
>
> The feature you are requesting could make sense if notes had a clear
> syntax. This would bring some interesting features, too (e.g., being
> able to list all notes in an entry, accurately). But it would also raise
> new problems, as any syntax change (backward compatibility with old
> documents, external tools...).
>
> Regards,
next prev parent reply other threads:[~2020-08-31 2:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-29 6:40 [feature request] A new cookie type [!] showing the last note taken Ihor Radchenko
2020-08-30 8:50 ` Nicolas Goaziou
2020-08-30 10:40 ` Ihor Radchenko
2020-08-30 11:03 ` Nicolas Goaziou
2020-08-30 12:18 ` Ihor Radchenko
2020-08-30 12:57 ` Nicolas Goaziou
2020-08-30 14:58 ` Eric Abrahamsen
2020-08-31 2:26 ` Ihor Radchenko [this message]
2020-08-31 8:42 ` Julius Müller
2020-08-31 11:55 ` Ihor Radchenko
2020-08-31 14:58 ` Nicolas Goaziou
2020-09-02 2:02 ` Ihor Radchenko
2020-09-03 9:16 ` Nicolas Goaziou
2020-09-05 5:52 ` Ihor Radchenko
2020-09-09 14:00 ` Nicolas Goaziou
2020-09-10 9:24 ` Ihor Radchenko
2020-09-13 13:09 ` Nicolas Goaziou
2020-09-14 19:49 ` Eric Abrahamsen
2020-09-05 22:14 ` Allen Li
2020-09-06 1:23 ` Ihor Radchenko
2020-09-06 18:16 ` Eric Abrahamsen
2021-01-17 15:38 ` Christopher Miles
2021-01-18 2:07 ` Ihor Radchenko
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y2lvwny0.fsf@localhost \
--to=yantar92@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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 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.