[Top][All Lists]

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

Re: easy-kill: drop-in replacement for kill-ring-save

From: Dmitry Gutov
Subject: Re: easy-kill: drop-in replacement for kill-ring-save
Date: Wed, 09 Oct 2013 07:18:22 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 08.10.2013 10:25, Leo Liu wrote:
On the other hand, extending it with new "things" will be more
difficult, since each one of them will require a dedicated key and some
headspace estate to remember it. And there's no mechanism to "expand"
the region from smaller to bigger things. Maybe I don't really need
that, though.

The extensions are provided both for development and for experienced

I have made +/- expand/shrink on list or sexp more lispy could you try
it out?

Yes, thank you, looks good. Especially since you can still press `s' or `l' to get the previous behavior (I haven't noticed that initially).

But the point I was trying to make is that expand-region just expands to the next largest thing (of any kind), so the user doesn't need to remember all available kinds, or their keys.

The one problem I encountered has to do with the next command expecting
an active region: mc/mark-all-like-this-dwim, from the multiple-cursors
package, uses the active region, if it's present.

With expand-region, the region becomes active as a result, and
mc/mark-all-like-this-dwim marks all occurences of the text in the
region. Not so with easy-kill: the text gets copied to the kill ring,
but the region is inactive, so mc/mark-all-like-this-dwim just uses the
symbol at point.

Sorry I use neither of these packages. Is the intention to have region
active after exit easy-kill? Or is it better to have, for example, C-SPC
exit easy-kill and activate region? I'll experiment with these ideas
later today.

I'd say neither, ideally.

Having region always active after pressing M-w would be weird.

C-SPC is a better option, but honestly, it's way too many keystrokes compared to expand-region when you just want to select the current symbol.

With expand-region, it's just one keystroke (it defaults to symbols), and with easy-kill it is `M-w s C-SPC'.

I think, ideally, easy-kill would activate the region only as far as the next command is concerned (so that command can use it). Not sure how to implement it best.
Maybe via a one-time pre/post-command-hook that would remove itself?

reply via email to

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