GNU bug report logs -
#39512
28.0.50; Add command isearch-yank-region
Previous Next
Reported by: Tino Calancha <tino.calancha <at> gmail.com>
Date: Sat, 8 Feb 2020 18:06:01 UTC
Severity: wishlist
Tags: fixed, patch
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On Wed, Aug 12, 2020 at 02:13:11AM +0300, Juri Linkov wrote:
>> 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.
>
>Good point. ‘C-SPC M-s . C-s C-s ...’ means that the user wants to
>extend the region to one of the next found symbols.
>
>But still there is an unsolved problem: ‘M-s .’ activates the *symbol*
>search mode, not the default non-symbol search mode. This means that
>the yanked region will match only symbols, that is useless when the
>region is longer than one symbol (the symbol search is activated by
>the call of ‘isearch-forward-symbol’ in ‘isearch-forward-symbol-at-point’).
>
>This means there is still a need to add a new command that yanks the region
>but doesn't activate the symbol search mode.
>
You are right; but...
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.
Because for isearch-forward-symbol there is already `M-s _`
>> 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 C we could pass a variable by reference; but in elisp I don't know
whats the convectional way.
This bug report was last modified 4 years and 115 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.