GNU bug report logs - #72862
29.1; Strange interaction between append-next-kill and kill-whole-line

Previous Next

Package: emacs;

Reported by: Sean McAfee <eefacm <at> gmail.com>

Date: Wed, 28 Aug 2024 21:14:02 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Sean McAfee <eefacm <at> gmail.com>
Cc: 72862 <at> debbugs.gnu.org
Subject: bug#72862: 29.1; Strange interaction between append-next-kill and kill-whole-line
Date: Thu, 29 Aug 2024 07:53:52 +0300
> From: Sean McAfee <eefacm <at> gmail.com>
> 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-<backspace>.
> - 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.




This bug report was last modified 247 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.