Add Emacs-style kill ring to Qt console.
Any feedback on this? Since this is a non-trivial code addition, I'd prefer to have some before committing. Thanks.
How is this supposed to behave? Reading the code it looks like there is support for more than one item in the ring, but I can't find a way to get anything other than the most recent kill out. (not an emacs user).
Use Ctrl-Y to retrieve the most recent item from the kill ring. Use Meta-Y to cycle through previous items in the kill ring. Note that M-Y only has an affect when used immediately after C-Y. So the sequence is "C-Y once, plus M-Y zero or more times".
By the way, all of this also works in bash, although I don't use it there very often myself.
okay, thanks. So ctrl-y yanks, and meta-y lets you select which entry to yank. That seems to work.
kill doesn't seem to include the newline char, so it doesn't match terminal behavior. Can you fix that?
In the terminal and in Emacs, Ctrl-K kills to the end of line, but does not include the newline. (In Emacs, Ctrl-K on an empty line kills the newline. The Qt console supports this for multiline input. In a terminal, there is no such thing as multiline input, so that's not even an option.)
Is Ctrl-K getting a newline in your terminal?
Ah, I was playing around with too many apps at once. ctrl-k includes newline in pico/nano, but not emacs.
In that case, it does seem to match emacs (even if it's not as nice as the pico behavior).
I don't see any reason not to go ahead and merge, then.