From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71459: 29.3; reindent-then-newline-and-indent bug when newline triggers abbrev expansion Date: Sat, 15 Jun 2024 13:05:51 +0300 Message-ID: <86cyoiv7uo.fsf@gnu.org> References: <87frtltqd9.fsf@bcc32.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6111"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71459-done@debbugs.gnu.org To: z@bcc32.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 15 12:07:34 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sIQJp-0001N4-Cs for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Jun 2024 12:07:33 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sIQJL-0005Ba-OP; Sat, 15 Jun 2024 06:07:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIQJJ-0005B4-QN for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 06:07:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sIQJJ-0007Vg-IT for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 06:07:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sIQJK-0003KI-1m for bug-gnu-emacs@gnu.org; Sat, 15 Jun 2024 06:07:02 -0400 Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jun 2024 10:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 71459 X-GNU-PR-Package: emacs Mail-Followup-To: 71459@debbugs.gnu.org, eliz@gnu.org, z@bcc32.com Original-Received: via spool by 71459-done@debbugs.gnu.org id=D71459.171844596412635 (code D ref 71459); Sat, 15 Jun 2024 10:07:01 +0000 Original-Received: (at 71459-done) by debbugs.gnu.org; 15 Jun 2024 10:06:04 +0000 Original-Received: from localhost ([127.0.0.1]:59996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIQIO-0003Hg-2F for submit@debbugs.gnu.org; Sat, 15 Jun 2024 06:06:04 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sIQIL-0003H1-Ug for 71459-done@debbugs.gnu.org; Sat, 15 Jun 2024 06:06:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sIQIF-0007Nf-NB; Sat, 15 Jun 2024 06:05:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=nvekaUveTtVTOn+VdqNH/sAFIHD/S0t/9LiS/OX7/8Q=; b=fSnYFidTGbdM NO6eV2QsMmoUVz0/l2LmAPKrfOAIHN4zde9mh8RpPzdj1VYC64pWRIDSNdclRNM+Fz/6MT9bxJ4cX 1QhV0prbbaDNtPw8/pd4BAGxSFCR5zC5qLFj/QH4XsuZHG3j7Ooxz9lcAAHuz0DYZl02d/jWj8fOb /tIMLSPOpxjL8EFNL2PIag2nHAU/sLr4/w+CwyhU5E3sPfvpE/mkv5pQrkg0XWWxfOmmXQg4Qlcbd J3q8vpNanN0mcsxj+lktBk93r9qhizHkWWfZOX14P/hIZZ0GW2KfF4KMTU+zX34AfCTwvjdW/MGtE /Kj17OPFfPO4WY8oqHDo2Q==; In-Reply-To: <87frtltqd9.fsf@bcc32.com> (z@bcc32.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287276 Archived-At: > From: z@bcc32.com > Date: Sun, 09 Jun 2024 23:42:58 -0400 > > 1. emacs -Q > 2. Open an empty buffer in a mode like conf-mode. Enable abbrev-mode. > 3. Type "# this is a comment", select the line, and run M-x > add-mode-abbrev, give it some abbrev like "tc". > 4. On a new line, type tc and then M-x reindent-then-newline-and-indent > > I expect this to insert "# this is a comment", but instead it inserts > "#this is a comment". Note the missing space between the > comment-start marker and the comment text. > > For context, this came up in a major mode (ledger-mode) where I had > bound RET to reindent-then-newline-and-indent, so it happens quite > freqently to me. > > I think just making reindent-then-newline-and-indent use a marker for > the initial value of `pos' would work, but I haven't thought about it > very much. Thanks, I went with your suggestion of using a marker. I installed the change on the master branch, and I'm therefore closing this bug.