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

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

bug#9406: 24.0.50; Use M-p/M-n to navigate through the kill ring


From: Antoine Levitt
Subject: bug#9406: 24.0.50; Use M-p/M-n to navigate through the kill ring
Date: Thu, 01 Sep 2011 11:53:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

01/09/11 11:13, Dani Moncayo
> On Thu, Sep 1, 2011 at 10:42, Juri Linkov <address@hidden> wrote:
>>> WDYT?
>>
>> I think we should not change the traditional behavior of `C-y M-y M-y ...'
>> that many users are accustomed to.
>
> Sorry to hear that.  I agree that it is good to keep the traditional
> behavior as much as possible, but not at the expense of evolving
> positively.
>
>> What we could do is to activate the
>> minibuffer browsing the kill-ring on `M-y' (not preceded by `C-y').
>
> So you want to keep the current behavior of "C-y M-y" for the sake of
> "traditional behavior", so that M-y would do one thing when preceded
> by C-y, and another one (completely different) when not.  IMO, this
> mixing/overloading of functionality in M-y is not clean, and besides,
> one of those two tasks would be already implemented in M-p.  I'd like
> you to reconsider this, please.
>
>> And optionally bind `M-p'/`M-n' after `C-y' to more transient version
>> of the current `M-y' that doesn't require multiple undo (but still
>> you have to undo the first yank inserted by `C-y').
>
> 100% agreement on that (I like your "transient version" improvement).

What about the following UI?

M-y triggers a kind of kill-ring browsing: it opens a small buffer above
the minibuffer with the next killed text (that which would be inserted
by C-y), accessible with M-y or M-n. If the user presses M-y or M-n, the
buffer expands to display the previous killed text as well, accessible
with M-p. In any event, pressing RET inserts the current killed text to
the buffer, and pressing anything other than RET/M-y/M-n/M-p kills the
buffer and resumes normal editing.

C-y M-y directly jumps to the second step of the above, but inserts
automatically the current killed text, preserving backwards
compatibility.

Therefore, C-y M-y M-y ... does the right thing, with the added
convenience of a buffer allowing you to go back to a previous
completion. Also M-y becomes a nice alias for viewing the kill-ring.

This has the merit of not binding M-n / M-p in anything else than the
mode this buffer would be displayed in. Doing it any other way would
probably cause confusion to users/modes who bind M-n/M-p.

The appearance of the small window would be controllable with a boolean
setting.






reply via email to

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