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: Thu, 13 Aug 2020 02:44:33 +0300 Organization: LINKOV.NET Message-ID: <87h7t7ieqe.fsf@mail.linkov.net> References: <87eev52bw6.fsf@calancha-pc.dy.bbexcite.jp> <877e0wiosp.fsf@mail.linkov.net> <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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5890"; 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: Tino Calancha , npostavs@gmail.com, 39512@debbugs.gnu.org, contovob@tcd.ie, Lars Ingebrigtsen To: Ergus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Aug 13 03:09:30 2020 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 1k61kI-0001Mi-Ci for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 13 Aug 2020 03:09:30 +0200 Original-Received: from localhost ([::1]:33926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k61kH-0004TT-EU for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 21:09:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36388) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k61js-0003qC-2g for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 21:09:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34651) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k61jr-0004qe-P1 for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 21:09:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k61jr-00045e-Kb for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 21:09:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Aug 2020 01:09:03 +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.159728091515633 (code B ref 39512); Thu, 13 Aug 2020 01:09:03 +0000 Original-Received: (at 39512) by debbugs.gnu.org; 13 Aug 2020 01:08:35 +0000 Original-Received: from localhost ([127.0.0.1]:46188 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k61jP-000444-Dn for submit@debbugs.gnu.org; Wed, 12 Aug 2020 21:08:35 -0400 Original-Received: from relay4-d.mail.gandi.net ([217.70.183.196]:33809) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k61jO-00043X-2K for 39512@debbugs.gnu.org; Wed, 12 Aug 2020 21:08:34 -0400 X-Originating-IP: 91.129.102.47 Original-Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id BA544E0002; Thu, 13 Aug 2020 01:08:24 +0000 (UTC) In-Reply-To: <20200812174125.gicbgyrz7nhsdjsi@Ergus> (Ergus's message of "Wed, 12 Aug 2020 19:41:25 +0200") 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:184919 Archived-At: > 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?