GNU bug report logs -
#79197
[PATCH] ; * lisp/simple.el (yank): Update docstring.
Previous Next
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> 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:
>
> (insert-for-yank (current-kill (cond
> ((listp arg) 0)
> ((eq arg '-) -2)
> (t (1- arg)))))
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: 79197 <at> debbugs.gnu.org
>> Date: Sat, 09 Aug 2025 09:15:50 +0300
>> From: Eli Zaretskii <eliz <at> gnu.org>
>>
>> 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.
Here's my story:
In the kill-'ring', the position is only relative, not an absolute one
of the order in which kills were entered. The 'negative prefix' argument
yielding what it does seems to have been an attempt to get the 'earliest
kill available': which is ultimately doomed, because no such state is
stored specifically. Normally, -2 would give you that. But if the
kill-ring pointer is ever moved backward (by C-y, M-y ... or C-u <n>
C-y) the assumption breaks down.
>
> Oh, and when you look into this, please also consider what should be
> the meaning of a zero argument.
C-u 0 simply gives the 'next' kill. For instance, I often use: C-y, M-y
... until I find the first one in a series of kills, then follow up with
C-u 0 C-y, ... to recreate the whole.
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Date: Sun, 10 Aug 2025 08:20:22 +0530
>> From: James Thomas <>
>> CC: monnier <at> iro.umontreal.ca, Eli Zaretskii <eliz <at> gnu.org>
>>
>> If I'm right, it seems to a mystery about a commit committed in the
>> past, finally solved! :D (it was a dark and stormy night here).
>
> Sorry, I'm confused by the several messages you posted, without any
> clear reference to what I wrote. Would you mind replying to my
> message with specific answers to the questions I asked and the issues
> I raised?
>
> TIA
--
This bug report was last modified 3 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.