emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Johannes Mueller <joh@johannes-mueller.org>
To: emacs-orgmode@gnu.org
Subject: Bug: Bad behavior of refill-mode at end of org-mode file [9.4.4 (9.4.4-11-g9e8215-elpa @ /home/joh/.emacs.d/elpa/org-20210118/)]
Date: Sat, 23 Jan 2021 19:19:25 +0100	[thread overview]
Message-ID: <3715730.BJ41AJB0qc@yksi> (raw)

When using refill-mode in combination with org-mode adding a new section or a
list item at the end of the buffer, obviously because refill-mode steps in and
deletes the line break before the headline marker or the list marker.

Steps to reproduce:

1. Launch emacs -Q
2. Open a empty buffer and activate org-mode and refill-mode
3. Type `* This is a headline<M-RET>`

Expected behavior:

Buffer contents should be
```
* This is a headline
*
```

Actual behavior:

Buffer contens is
```
* this is a headline *
```

Obviously right after typing <M-RET> and thus inserting <line break>+"*"
refill-mode steps in and interprets the second line as part of the paragraph.

Remarks:

* The problem does not occur when there is text after the place where the new
headline is inserted

* The problem occurs with any kinds of headlines as well as with list items.


I tried to tweak paragraph-start, but I was not able to get the behavior I was
expecting.


Emacs  : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.22, 
cairo version 1.17.3)
 of 2020-08-28
Package: Org mode version 9.4.4 (9.4.4-11-g9e8215-elpa @ /home/joh/.emacs.d/
elpa/org-20210118/)





             reply	other threads:[~2021-01-28 14:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 18:19 Johannes Mueller [this message]
2021-10-30  9:05 ` Bug: Bad behavior of refill-mode at end of org-mode file [9.4.4 (9.4.4-11-g9e8215-elpa @ /home/joh/.emacs.d/elpa/org-20210118/)] 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

  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=3715730.BJ41AJB0qc@yksi \
    --to=joh@johannes-mueller.org \
    --cc=emacs-orgmode@gnu.org \
    /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).