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: Sun, 23 May 2021 10:19:49 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: 48478@debbugs.gnu.org
> Date: Sat, 22 May 2021 23:59:31 +0300
> 
> >> For the case of not adding the edited entry to the kill-ring,
> >> now kill-ring-yank-pointer stays at the same position it was
> >> before the editing.
> >
> > It doesn't look like that in my testing.  Here's the recipe:
> >
> >   emacs -Q
> >   For the words "buffer", "text", "Lisp", and "evaluation" from the
> >     first line, mark each word and then M-w
> >   M->
> >   M-y
> >   Type "tex TAB", which will expand to "text"
> >   Type "oize RET", which will insert "textoize"
> >   Type C-y
> >   This inserts the last kill, which is "evaluation", whereas I
> >     expected to see "text", since you said the pointer stays at the
> >     same position.
> 
> The pointer kill-ring-yank-pointer stays at the same position:
> before M-y, kill-ring-yank-pointer points to "evaluation",
> and after M-y, kill-ring-yank-pointer points to "evaluation".

I think this is not the optimal behavior.  The optimal behavior IMO is
if M-y would yield the same results wrt kill-ring-yank-pointer as does
M-y after C-y.  IOW, it would be natural if M-y invoked after a
non-yank command would just allow a "direct access" to a specific slot
of the kill-ring, and would otherwise work like M-y after a yank
command.  Once again, from user's POV M-y is the same command, so
every subtle change in the results is IMO a disadvantage, if the
change is not a direct consequence of the differences in use cases.

If you want yank-from-kill-ring to leave kill-ring-yank-pointer
unaltered, we could move the pointer in yank-pop, after
yank-from-kill-ring returns.  WDYT?





reply via email to

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