emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tor Kringeland <tor.kringeland@ntnu.no>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Adding note to heading without newline at the end
Date: Mon, 20 Jun 2022 15:11:54 +0000	[thread overview]
Message-ID: <m24k0ffjyd.fsf@ntnu.no> (raw)
In-Reply-To: <87o7yn3117.fsf@localhost>

Ihor Radchenko <yantar92@gmail.com> writes:

> Can you reproduce the problem starting from emacs -Q?

I did.  The bug only occurs if there is no newline at the end.  So for
example if you open a new buffer and don't save it, the bug should
occur.

Similarly, in my own config (where I have enabled org-log-into-drawer),
the note gets inserted below as is correct but the last letter of the
heading gets inserted at the end, like:

#+begin_example
* tes
  :LOGBOOK:
  - Note taken on [2022-06-20 Mon 17:07]
  :END:
t
#+end_example

(it doesn't seem to matter /where/ in the heading you are when you
insert the note --- it's always the last letter falling down).

I haven't been able to reproduce this with emacs -Q yet, though, but I
suspect the source of the error is the same.  Anyway, running Emacs as
before with -Q and inserting a note, the result is:

#+begin_example
- Note taken on [2022-06-20 Mon 17:07]
* test
#+end_example

Again, if there is a newline at the end (as would happen if you first
save the file) the bug doesn't occur.

I'm using a recent build of Emacs 29.

  reply	other threads:[~2022-06-20 15:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-20  0:27 [BUG] Adding note to heading without newline at the end Tor Kringeland
2022-06-20 13:41 ` Ihor Radchenko
2022-06-20 15:11   ` Tor Kringeland [this message]
2022-06-21  2:24     ` [PATCH] " Ihor Radchenko
2022-06-21 10:58       ` Tor Kringeland
2022-06-21 11:13         ` Tim Cross
2022-06-21 11:38         ` Ihor Radchenko
2022-06-22 14:28           ` Tor Kringeland
2022-06-23 15:59             ` Samuel Banya
2022-06-26 23:32               ` Samuel Banya
2022-06-26 23:45                 ` Ihor Radchenko
2022-06-27  2:42                 ` Samuel Banya
2022-06-27 10:18                   ` Ihor Radchenko
2022-06-28  2:47                     ` Samuel Banya
2022-06-28  2:57                       ` Ihor Radchenko
2022-09-13 14:13         ` Ihor Radchenko
2022-06-21  1:56 ` Samuel Banya
2022-06-21  2:21   ` Tor Kringeland

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=m24k0ffjyd.fsf@ntnu.no \
    --to=tor.kringeland@ntnu.no \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.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).