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
Message #59 received at 39512 <at> debbugs.gnu.org (full text, mbox):
> 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).
I continued trying to do what you suggested some time ago
and immediately stumbled upon a question what "thing"
to use by default as an argument of '(thing-at-point thing)'?
Trying these priorities:
(or (thing-at-point 'region)
(thing-at-point 'url)
;; (thing-at-point 'filename)
;; (thing-at-point 'list)
(thing-at-point 'symbol))
has several problems:
1. There is no such "thing" as 'region'. Maybe could be added to thingatpt.el?
2. 'url' returns nil when there is no url at point, good. But
'filename' returns non-nil on any string, not only on real filenames.
3. It would be nice to use (thing-at-point 'list) only when point
is on the open/close parens. This is how double-clicking by mouse
selects the thing at point of mouse click. When clicked on a paren,
the whole list is selected by 'mouse-start-end'.
'isearch-forward-thing-at-point' could be the same logic.
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.