bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48478: 28.0.50; yank-from-kill-ring and kill-ring-yank-pointer


From: Eli Zaretskii
Subject: bug#48478: 28.0.50; yank-from-kill-ring and kill-ring-yank-pointer
Date: Fri, 21 May 2021 08:51:54 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: 48478@debbugs.gnu.org
> Date: Thu, 20 May 2021 23:44:22 +0300
> 
> >> > However, I'm not sure I understand what happens when I edit the
> >> > kill-ring entry before hitting RET, which gets it inserted.  Is the
> >> > edited entry added to the kill-ring?  It looks like it isn't, because
> >> > the next C-y inserts the last kill-ring entry, i.e. neither the
> >> > original entry I edited nor the edited entry actually inserted.  Why
> >> > does the kill-ring-yank-pointer gets reset to the front of the
> >> > kill-ring in this case?
> >>
> >> After inserting the edited entry it resets the kill-ring-yank-pointer
> >> for the same reason why the kill-ring-yank-pointer gets reset
> >> when a new entry gets added to the kill-ring after C-w,
> >> i.e. like this line in 'kill-new':
> >>
> >>   (setq kill-ring-yank-pointer kill-ring)
> >
> > I could understand that if the edited entry were added to the
> > kill-ring.  But it isn't is it?
> 
> It would be unexpected when yanking the edited entry with M-y
> would add it to the kill-ring as its opposite command M-w does.

Why unexpected?  If we document that, it wouldn't be unexpected.

Once again, we could decide to either add the edited entry to
kill-ring or not add it.  If we don't add it, kill-ring-yank-pointer
should stay at its position, which corresponds to the original entry
before the editing.  If we do add it, the pointer should be reset to
the slot where the edited entry is.  Both of these behaviors can be
easily documented and will be reasonably logical and intuitive,
because they are basically similar to what the old M-y did.  What we
do now is much harder to explain and is not intuitive, at least not
according to my intuition.

Does anyone else have an opinion about this?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]