From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39512: 28.0.50; Add command isearch-yank-region Date: Wed, 21 Apr 2021 23:41:05 +0300 Organization: LINKOV.NET Message-ID: <87tunz2wwu.fsf@mail.linkov.net> References: <87v9hst5wv.fsf@gnus.org> <87mu33zchk.fsf@mail.linkov.net> <20200810011954.ro4utplq3ohpob2d@Ergus> <87v9hqjb27.fsf@mail.linkov.net> <20200811011246.bcciofvpzjtuy3jb@Ergus> <87k0y4n5dk.fsf@mail.linkov.net> <20200812174125.gicbgyrz7nhsdjsi@Ergus> <87h7t7ieqe.fsf@mail.linkov.net> <20200813031420.7vq5bz7loeqiuntx@Ergus> <8735vrgx8p.fsf@linkov.net> <20210418153400.vf5bum44i4zw72i7@Ergus> <87fszkbsxw.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: contovob@tcd.ie, Lars Ingebrigtsen , Tino Calancha , npostavs@gmail.com, 39512@debbugs.gnu.org To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 21 22:43:29 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lZJh1-0005Iv-Hs for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Apr 2021 22:43:27 +0200 Original-Received: from localhost ([::1]:40828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lZJh0-0006jZ-L3 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 21 Apr 2021 16:43:26 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lZJgc-0006i9-Ds for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 16:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48373) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lZJgc-0001tP-4k for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 16:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lZJgb-000205-Vm for bug-gnu-emacs@gnu.org; Wed, 21 Apr 2021 16:43:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 Apr 2021 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39512 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 39512-submit@debbugs.gnu.org id=B39512.16190377567647 (code B ref 39512); Wed, 21 Apr 2021 20:43:01 +0000 Original-Received: (at 39512) by debbugs.gnu.org; 21 Apr 2021 20:42:36 +0000 Original-Received: from localhost ([127.0.0.1]:59917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZJgB-0001zF-Rq for submit@debbugs.gnu.org; Wed, 21 Apr 2021 16:42:36 -0400 Original-Received: from relay12.mail.gandi.net ([217.70.178.232]:33107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lZJg9-0001yz-VL; Wed, 21 Apr 2021 16:42:34 -0400 Original-Received: from mail.gandi.net (m91-129-102-166.cust.tele2.ee [91.129.102.166]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id DF613200008; Wed, 21 Apr 2021 20:42:24 +0000 (UTC) In-Reply-To: <87fszkbsxw.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 20 Apr 2021 23:29:47 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:204659 Archived-At: 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.