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: Mon, 31 May 2021 15:08:05 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: 48478@debbugs.gnu.org
> Date: Mon, 31 May 2021 01:32:15 +0300
> 
> >> When read-from-kill-ring returns an edited string,
> >> how yank-from-kill-ring could use it to adjust kill-ring-yank-pointer?
> >
> > read-from-kill-ring could store the pointer in some variable, I guess?
> 
> There is no way to get the pointer to point to the entry of the kill ring,
> because we can't find the edited string in the kill ring.

Then maybe this is another reason to prefer adding the edited string
to the kill-ring?  In which case you will need to reset the pointer to
the head of the ring?

> >> BTW, the recent fix in ef7a6eec20 broke such use case:
> >> M-w on some region, but then M-y M-p doesn't insert the last item
> >> to the minibuffer, i.e. the same item that is inserted to the buffer
> >
> > Sorry, I don't understand how does minibiffer enter the picture.  Can
> > you show a complete recipe?
> 
> M-y activates the minibuffer and uses its (HISTVAR . HISTPOS)
> to set the initial position for use by the minibuffer history
> to the entry pointed by kill-ring-yank-pointer.  So this is similar
> to what C-y does when it yanks the same entry pointed by 
> kill-ring-yank-pointer.

If this is the scenario, then I don't see a problem: what you describe
works for me, i.e. "M-y M-p" does insert the last killed item into the
minibuffer.  I wonder why it doesn't work for you.





reply via email to

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