From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UN+aKxrHEmBKdgAA0tVLHw (envelope-from ) for ; Thu, 28 Jan 2021 14:15:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0Gd9JxrHEmB5TQAAbx9fmQ (envelope-from ) for ; Thu, 28 Jan 2021 14:15:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 54FE5940276 for ; Thu, 28 Jan 2021 14:15:54 +0000 (UTC) Received: from localhost ([::1]:47256 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l585R-0002Cm-7c for larch@yhetil.org; Thu, 28 Jan 2021 09:15:53 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3NVZ-00043N-Bx for emacs-orgmode@gnu.org; Sat, 23 Jan 2021 13:19:37 -0500 Received: from mail.johannes-mueller.org ([79.140.42.112]:54180) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l3NVU-0002Db-0F for emacs-orgmode@gnu.org; Sat, 23 Jan 2021 13:19:35 -0500 Received: from yksi.localnet (unknown [IPv6:2a02:8070:24cd:39fd::c55]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.johannes-mueller.org (Postfix) with ESMTPSA id B9D2311811C for ; Sat, 23 Jan 2021 19:19:25 +0100 (CET) From: Johannes Mueller 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 Message-ID: <3715730.BJ41AJB0qc@yksi> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: pass client-ip=79.140.42.112; envelope-from=joh@johannes-mueller.org; helo=mail.johannes-mueller.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 28 Jan 2021 09:15:06 -0500 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.35 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 54FE5940276 X-Spam-Score: -0.35 X-Migadu-Scanner: scn0.migadu.com X-TUID: Wg+AX9O68dwK 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` Expected behavior: Buffer contents should be ``` * This is a headline * ``` Actual behavior: Buffer contens is ``` * this is a headline * ``` Obviously right after typing and thus inserting +"*" 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/)