From: Juri Linkov <juri@linkov.net>
To: Ergus <spacibba@aol.com>
Cc: contovob@tcd.ie, Lars Ingebrigtsen <larsi@gnus.org>,
Tino Calancha <tino.calancha@gmail.com>,
npostavs@gmail.com, 39512@debbugs.gnu.org
Subject: bug#39512: 28.0.50; Add command isearch-yank-region
Date: Wed, 21 Apr 2021 23:41:05 +0300 [thread overview]
Message-ID: <87tunz2wwu.fsf@mail.linkov.net> (raw)
In-Reply-To: <87fszkbsxw.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 20 Apr 2021 23:29:47 +0300")
tags 39512 fixed
close 39512 28.0.50
quit
>>>(or (thing-at-point 'region)
>>> (thing-at-point 'url)
>>> ;; (thing-at-point 'filename)
>>> ;; (thing-at-point 'list)
>>> (thing-at-point 'symbol))
>>>
> What I meant is just to add to thingatpt.el these 4 lines:
>
> +(put 'region 'bounds-of-thing-at-point
> + (lambda ()
> + (when (use-region-p)
> + (cons (region-beginning) (region-end)))))
>
>> As I already mentioned; IMO the idea is to follow the same logic than here:
>>
>> https://github.com/abo-abo/swiper/blob/471d644d6bdd7d5dc6ca4efb405e6a6389dff245/ivy.el#L427
>>
>> where `(thing-at-point 'region)` is basically the first branch in the
>> cond.
>
> `(thing-at-point 'region)` will work with the patch above.
> Then we could add a customizable user option to specify
> in what order the user wants to try things at point, e.g.
>
> `(region url file symbol)`
Now pushed to master and closed.
>> now I use C-M-SPC for this selection and then M-w to copy and C-s
>> C-y. If you add the command, then it will save the M-w and the C-y to
>> copy the region, because region will be already active... But will
>> require the M-s prefix any way... so not 2 but at least 1 bind will be
>> saved. You can consider this option in the future if you want...
>
> Yes, this is a nice way to yank the next list to the search with just
> C-M-SPC M-s M-.
Now works not only with 'C-M-SPC M-s M-.' but also with just 'M-s M-.'
due to 'sexp' in the default value.
next prev parent reply other threads:[~2021-04-21 20:41 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
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 [this message]
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=87tunz2wwu.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).