GNU bug report logs -
#79197
[PATCH] ; * lisp/simple.el (yank): Update docstring.
Previous Next
Full log
View this message in rfc822 format
> From: James Thomas <jimjoe <at> gmx.net>
> Cc: Eli Zaretskii <eliz <at> gnu.org>
> Date: Sat, 09 Aug 2025 04:08:06 +0530
>
> Eli Zaretskii writes:
>
> >> Date: Fri, 08 Aug 2025 02:52:28 +0530
> >> From: James Thomas via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> >>
> >> +If N is negative, reinsert the earliest available kill.
> >
> > Thanks, but that is not what I see when I try "C-u - 1 C-y". It
> > inserts the 2nd earliest kill, i.e., not the first one I killed, but
> > the one after it. Which seems to be consistent with this snippet:
>
> Well, obviously, because it's wrong! :-) And undocumented to boot...
Your patch is the exact opposite of commit 8e5d85ffc0, and will make
"C-u -" produce a different effect from "C-u - 1", which is very
surprising. So at least we need to also change the handling of
negative numerical argument as well, to make them consistent.
And anyway, something is still amiss. Try killing several pieces of
text, then type "C-u - 1 C-y" several times, with some typing between
the yank commands (to avoid any dwim-ish behavior when several yank
commands are invoked one after another). That is,
C-u - 1 C-y
foo
C-u - 1 C-y
foo
C-u - 1 C-y
foo
C-u - 1 C-y
foo
C-u - 1 C-y
foo
Each yank will insert a different text, so saying "the earliest kill
available" is incorrect, because what that "earliest" kill is depends
on what the user manual calls "last yank pointer". See current-kill,
which determines what happens here. (The manual doesn't say anything
about negative arguments to C-y, which is at least interesting.)
This bug report was last modified 4 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.