[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39512: 28.0.50; Add command isearch-yank-region
From: |
Juri Linkov |
Subject: |
bug#39512: 28.0.50; Add command isearch-yank-region |
Date: |
Thu, 13 Aug 2020 02:44:33 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> Does it really makes sense to call isearch-forward-symbol when the
> region is active and not empty if it works in the way we are describing?
>
> I mean; we could move the call to isearch-forward-symbol inside the cond
> and use just isearch-forward or isearch-forward-regexp directly when the
> bounds are from the active region.
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.
>>> 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.
>>
>>Yes, this could be added to thing-at-pt.
>
> If so, maybe it will be needed to return somehow the information about
> the precedence of the bounds. Anything that can be used in the caller to
> know if the bounds are from thing-at-pt or region or if they are a
> symbol, a word or a region.
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?
- bug#39512: 28.0.50; Add command isearch-yank-region, Lars Ingebrigtsen, 2020/08/09
- bug#39512: 28.0.50; Add command isearch-yank-region, Juri Linkov, 2020/08/09
- bug#39512: 28.0.50; Add command isearch-yank-region, Ergus, 2020/08/09
- bug#39512: 28.0.50; Add command isearch-yank-region, Juri Linkov, 2020/08/10
- bug#39512: 28.0.50; Add command isearch-yank-region, Ergus, 2020/08/10
- bug#39512: 28.0.50; Add command isearch-yank-region, Juri Linkov, 2020/08/11
- bug#39512: 28.0.50; Add command isearch-yank-region, Ergus, 2020/08/12
- bug#39512: 28.0.50; Add command isearch-yank-region,
Juri Linkov <=
- bug#39512: 28.0.50; Add command isearch-yank-region, Ergus, 2020/08/12
bug#39512: 28.0.50; Add command isearch-yank-region, Tino Calancha, 2020/08/10