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

From: Ergus <[email-masked]>
Date: Thu, 13 Aug 2020 05:14:20 +0200

On Thu, Aug 13, 2020 at 02:44:33AM +0300, Juri Linkov wrote:
>
>The problem is that the name of the command bound to 'M-s .' is
>isearch-forward-symbol-at-point that implies that it has to call
>isearch-forward-symbol.  So not using symbol search on the active region
>will make a mess from this command.
>
>A cleaner solution would be to add a new non-symbol command with a name like
>isearch-forward-thing-at-point-or-region bound to 'M-s M-.' and based on
>thing-at-point-or-region.
>
I would prefer using `M-s .` for consistency (even if it requires
changing the command name). In swiper it works like that and it is very
comfortable and consistent with the "expected" experience; but I
understand that someone will complain for sure... (as usual)

So without any other alternative, `M-s M-.` will be good enough. In
general it would be better (for consistency) if we "reserve" `M-.`
"suffixes" for future thing-at-point-or-region commands right?

>In the previous message you sent a link to `ivy-thing-at-point` that
>also uses (thing-at-point 'url) and also tries to get a filename at point.
>Do you think `thing-at-point-or-region` should do the same?

With the interactive experience in mind I think this could make sense as
it does in `ivy-thing-at-point`.

In my opinion from the api point of view, the important modification
could be the method to know the "kind the thing" detected after calling
the function (region, word, symbol, url) but also a function to get the
bounds instead of the text (like bounds-of-thing-at-point-or-region).