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: Tue, 01 Jun 2021 15:13:23 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: 48478@debbugs.gnu.org
> Date: Mon, 31 May 2021 23:20:04 +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?
> 
> When there is a need to add the edited string to the kill-ring,
> then better to do this explicitly by marking the whole contents of
> the edited minibuffer with 'C-x h', then adding it to the kill-ring
> with 'M-w'.

Sure, but that's unrelated to the issue at hand, isn't it?

> >> >> 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.
> 
> I tried in 'emacs -Q', and 'M-y M-p' doesn't insert the last killed item
> into the minibuffer.

It does here, so I guess we are doing something differently.  Can you
show a complete recipe, starting from "emacs -Q"?





reply via email to

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