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#72862: 29.1; Strange interaction between append-next-kill and kill-whole-line Date: Thu, 29 Aug 2024 07:53:52 +0300 Message-ID: <865xrkgc9r.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3547"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72862@debbugs.gnu.org To: Sean McAfee Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 29 06:54:27 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 1sjXAw-0000lI-Lj for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Aug 2024 06:54:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sjXAh-0000lz-Fi; Thu, 29 Aug 2024 00:54:11 -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 1sjXAd-0000lf-GD for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 00:54:07 -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 1sjXAd-0000xE-6g for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 00:54:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=bcKSY6aSKps3po7HR1WDPreze8sNU6vD9Qax2IGw6O0=; b=ekk+h2wYrofrfeXpJY+UMSmLytr92hTbPF8KlbZMf+1nxfuro67flJLTCjJ6wh+jO/IwdxXY8FdCfx8LVZnjn1CJXCvosx3N2mie7MrX9KORtVEdpzBR9JfXa1QevCn8A/+ZM8sR1UhN5SsJbGuDokErhG8Gwpw8SR+yvh/KUUng8chEEb4qziZFzoDggkNrFiM/nH4JVYSFNSJXGTdaaqnUzkNGb+eKZlss7nJqA6HSnSyp6JycWflnVEYwvF+gWtDrPt2T1uM+D7oT9h/0z3jlNhrmbvtZc6Nm3OZxVYCEUJx0hTpqor2xL7aMI6aK8aE/wCLN6GtHorKfi5ejvA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sjXBW-0000cE-1T for bug-gnu-emacs@gnu.org; Thu, 29 Aug 2024 00:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Aug 2024 04:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72862 X-GNU-PR-Package: emacs Original-Received: via spool by 72862-submit@debbugs.gnu.org id=B72862.17249072972348 (code B ref 72862); Thu, 29 Aug 2024 04:55:02 +0000 Original-Received: (at 72862) by debbugs.gnu.org; 29 Aug 2024 04:54:57 +0000 Original-Received: from localhost ([127.0.0.1]:50066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjXBR-0000bn-1j for submit@debbugs.gnu.org; Thu, 29 Aug 2024 00:54:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33656) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sjXBP-0000bb-CE for 72862@debbugs.gnu.org; Thu, 29 Aug 2024 00:54:55 -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 1sjXAR-0000wV-2T; Thu, 29 Aug 2024 00:53: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=bcKSY6aSKps3po7HR1WDPreze8sNU6vD9Qax2IGw6O0=; b=drbsp8yyoHXL eaqvXqhtJw7AfwOXxmUrj3sz9Y0TIsfiTVAoMwbdjbekwTOr2s32FA0dDn3FCem4tvIQsVZezAVwX SQrmoWxnmkY044tqUFKPbuCRjcQLgkAvYhvW6MamRGjBFmyGFFrdqcR4hcpdbcQnfPvbPy9UvGuiI ztJTTLGJzZV+OKGY4ndqDTqyW1yMzsbPFc/ljKenID9R45u3xachzA3XHpXo3dRfmAY+YrhprbC1b F7wjYGmyb7/bZBHGiI5elO2VIniObJaWNaPYAFjPrJ2L69yCAdCxEsO3qJtLeBoZKc3rJBeavWlTs IZwhIYB2cD58tnPWqlTTsw==; In-Reply-To: (message from Sean McAfee on Wed, 28 Aug 2024 14:12:11 -0700) 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:290901 Archived-At: > From: Sean McAfee > Date: Wed, 28 Aug 2024 14:12:11 -0700 > > Starting from emacs -Q: > > - Enter the text "12345\n" in the scratch buffer. > - Kill the text by any means, eg: C-SPC C-p C-w > - Enter the text "ABCDE" and put point on the C. > - Run append-next-kill with C-M-w and then kill-whole-line with C-S-. > - Yank the most recent kill with C-y. > > The text I get back is "AB12345\nCDE". Apparently the killed whole line > is being wrapped around the preceding kill, at the place where point > was, rather than being appended to it. Yes, because kill-whole-line kills the line in two parts. The commentary to the code there says: ;; - We need to kill in two steps, because the previous command ;; could have been a kill command, in which case the text before ;; point needs to be prepended to the current kill ring entry and ;; the text after point appended. Perhaps what the code there does needs to be augmented for the case of append-next-kill.