* [BUG] inserting notes at end
@ 2022-07-26 14:15 Tor Kringeland
2022-07-27 3:41 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Tor Kringeland @ 2022-07-26 14:15 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
If our Org file is
#+begin_example
* a heading
text<POINT>
#+end_example
And we insert an empty note, we get
#+begin_example
* a heading
- Note taken on [2022-07-26 Tue 16:10]
text
#+end_example
instead of the expected
#+begin_example
* a heading
- Note taken on [2022-07-26 Tue 16:10]
text
#+end_example
If POINT is at the heading or the line below, behavior is as expected.
If a note has already been inserted correctly before (as in the third
snippet), then subsequent notes are insert corrected as well, regardless
of POINT. Conversely, if one first is inserted wrongly, then subsequent
will also be inserted wrongly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] inserting notes at end
2022-07-26 14:15 [BUG] inserting notes at end Tor Kringeland
@ 2022-07-27 3:41 ` Ihor Radchenko
2022-07-27 8:42 ` Tor Kringeland
0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-07-27 3:41 UTC (permalink / raw)
To: Tor Kringeland; +Cc: emacs-orgmode@gnu.org
Tor Kringeland <tor.kringeland@ntnu.no> writes:
> If our Org file is
>
> #+begin_example
> * a heading
>
> text<POINT>
> #+end_example
>
> And we insert an empty note, we get
>
> #+begin_example
> * a heading
>
> - Note taken on [2022-07-26 Tue 16:10]
> text
> #+end_example
>
> instead of the expected
>
> #+begin_example
> * a heading
> - Note taken on [2022-07-26 Tue 16:10]
>
> text
> #+end_example
I get note after empty lines below the headline in both the cases.
This behavior is intentional according to org-log-beginning.
Best,
Ihor
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] inserting notes at end
2022-07-27 3:41 ` Ihor Radchenko
@ 2022-07-27 8:42 ` Tor Kringeland
2022-07-28 14:17 ` Ihor Radchenko
0 siblings, 1 reply; 4+ messages in thread
From: Tor Kringeland @ 2022-07-27 8:42 UTC (permalink / raw)
To: Ihor Radchenko; +Cc: emacs-orgmode@gnu.org
Ihor Radchenko <yantar92@gmail.com> writes:
> I get note after empty lines below the headline in both the cases.
> This behavior is intentional according to org-log-beginning.
I see. Maybe this could be noted in the docstring for org-add-note? If
org-log-into-drawer is non-nil, then the behavior is different (the
drawer is always placed at the first newline below the heading).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [BUG] inserting notes at end
2022-07-27 8:42 ` Tor Kringeland
@ 2022-07-28 14:17 ` Ihor Radchenko
0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-07-28 14:17 UTC (permalink / raw)
To: Tor Kringeland; +Cc: emacs-orgmode@gnu.org
Tor Kringeland <tor.kringeland@ntnu.no> writes:
> Ihor Radchenko <yantar92@gmail.com> writes:
>
>> I get note after empty lines below the headline in both the cases.
>> This behavior is intentional according to org-log-beginning.
>
> I see. Maybe this could be noted in the docstring for org-add-note? If
> org-log-into-drawer is non-nil, then the behavior is different (the
> drawer is always placed at the first newline below the heading).
The reason why empty lines are skipped when inserting the first note in
a headline is purely technical. It may or may not be changed in future.
The behaviour is essentially undefined - there is not much point
"freezing" the current behaviour in the docstring.
IMHO, there is not much point changing the current behaviour to not
skipping empty lines. I personally prefer to keep empty lines after the
headline and before notes. So, opinions can differ.
A proper implementation that would satisfy all users should do something
similar to :empty-lines in org-capture-templates, but it will be a fair
bit of work with no clear interest from Org users. Of course, if anyone
thinks that such feature is going to be useful, please chime in and reply
to this email.
Best,
Ihor
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-28 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-26 14:15 [BUG] inserting notes at end Tor Kringeland
2022-07-27 3:41 ` Ihor Radchenko
2022-07-27 8:42 ` Tor Kringeland
2022-07-28 14:17 ` Ihor Radchenko
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).