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

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

bug#39512: 28.0.50; Add command isearch-yank-region


From: Ergus
Subject: bug#39512: 28.0.50; Add command isearch-yank-region
Date: Tue, 11 Aug 2020 03:12:46 +0200

On Tue, Aug 11, 2020 at 02:49:44AM +0300, Juri Linkov wrote:
Now I am using swiper which has an improved version for thing-at-point
(something like `thing-at-point-or-region` called `ivy-thing-at-point`)
which actually is much more useful and avoids an extra binding.

https://github.com/abo-abo/swiper/blob/c6b60d34ac37bf4d91a25f16d22e528f85e06938/ivy.el#L426

Implementing something like that in vanilla is (in my opinion) the best
default behaviors for isearch-forward-symbol-at-point. But I don't want
to go in that discussion in the mailing list because it is difficult to
get an agreement what touching old commands. But you are free to do it
if you want.

Indeed there are two ways to add it: as a new command (that requires a new
keybinding) or a new option (disabled by default) for the existing command.
Maybe we could enable it by default, but I don't know how it will affect
the use cases of users - maybe someone users use isearch to extend the
active region to the next matching symbol, and don't want 'M-s .' to yank
the region.

If the region is active but empty that functionality could make sense
(extend to the next thing at point), but when it is not empty I think it
doesn't make too much sense in general use... but let's wait for the
rest of the opinions.

Actually, probably such a function (thing-at-point-or-region) could be
added to thing-at-pt to use it in other functionalities too. (like
highlight thing at point, idle highlight thing at point or region, kill
thing at point or region and so on)

It is something I have seen re-implemented in many packages here and
there again and again, so probably it is time to provide it in vanilla.




reply via email to

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