From: Juri Linkov <juri@linkov.net>
To: Ergus <spacibba@aol.com>
Cc: Tino Calancha <tino.calancha@gmail.com>,
npostavs@gmail.com, 39512@debbugs.gnu.org, contovob@tcd.ie,
Lars Ingebrigtsen <larsi@gnus.org>
Subject: bug#39512: 28.0.50; Add command isearch-yank-region
Date: Thu, 13 Aug 2020 02:44:33 +0300 [thread overview]
Message-ID: <87h7t7ieqe.fsf@mail.linkov.net> (raw)
In-Reply-To: <20200812174125.gicbgyrz7nhsdjsi@Ergus> (Ergus's message of "Wed, 12 Aug 2020 19:41:25 +0200")
> 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?
next prev parent reply other threads:[~2020-08-12 23:44 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-08 18:04 bug#39512: 28.0.50; Add command isearch-yank-region Tino Calancha
2020-02-08 23:47 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-02-09 0:31 ` Juri Linkov
2020-02-09 11:21 ` Tino Calancha
2020-02-09 12:38 ` Tino Calancha
2020-02-10 0:45 ` Juri Linkov
2020-02-12 22:10 ` Juri Linkov
2020-08-09 11:28 ` Lars Ingebrigtsen
2020-08-09 23:23 ` Juri Linkov
2020-08-10 1:19 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-10 23:49 ` Juri Linkov
2020-08-11 1:12 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-11 23:13 ` Juri Linkov
2020-08-12 17:41 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-08-12 23:44 ` Juri Linkov [this message]
2020-08-13 3:14 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-15 20:52 ` Juri Linkov
2021-04-18 15:34 ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-20 20:29 ` Juri Linkov
2021-04-21 20:41 ` Juri Linkov
2020-08-10 17:00 ` Tino Calancha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h7t7ieqe.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=39512@debbugs.gnu.org \
--cc=contovob@tcd.ie \
--cc=larsi@gnus.org \
--cc=npostavs@gmail.com \
--cc=spacibba@aol.com \
--cc=tino.calancha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).