GNU bug report logs - #39512
28.0.50; Add command isearch-yank-region

Previous Next

Package: emacs;

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


Message #53 received at 39512 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Ergus <spacibba <at> aol.com>
Cc: Tino Calancha <tino.calancha <at> gmail.com>, npostavs <at> gmail.com,
 39512 <at> debbugs.gnu.org, contovob <at> tcd.ie, Lars Ingebrigtsen <larsi <at> gnus.org>,
 eliz <at> gnu.org, drew.adams <at> oracle.com
Subject: Re: bug#39512: 28.0.50; Add command isearch-yank-region
Date: Thu, 13 Aug 2020 02:44:33 +0300
> 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?




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.