From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#39512: 28.0.50; Add command isearch-yank-region Date: Wed, 12 Aug 2020 19:41:25 +0200 Message-ID: <20200812174125.gicbgyrz7nhsdjsi@Ergus> 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> Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19562"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Tino Calancha , npostavs@gmail.com, 39512@debbugs.gnu.org, contovob@tcd.ie, Lars Ingebrigtsen , eliz@gnu.org, drew.adams@oracle.com To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 12 19:43:47 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 1k5umw-0004zX-HA for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 19:43:46 +0200 Original-Received: from localhost ([::1]:52730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5umv-0002yy-Fv for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 12 Aug 2020 13:43:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5ulG-0000ox-MR for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 13:42:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33910) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k5ulG-000408-Cq for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 13:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k5ulG-00067h-9t for bug-gnu-emacs@gnu.org; Wed, 12 Aug 2020 13:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Aug 2020 17:42:02 +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.159725410323512 (code B ref 39512); Wed, 12 Aug 2020 17:42:02 +0000 Original-Received: (at 39512) by debbugs.gnu.org; 12 Aug 2020 17:41:43 +0000 Original-Received: from localhost ([127.0.0.1]:45456 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5ukw-00067A-Qt for submit@debbugs.gnu.org; Wed, 12 Aug 2020 13:41:43 -0400 Original-Received: from sonic304-9.consmr.mail.bf2.yahoo.com ([74.6.128.32]:45179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k5ukt-00066u-Nq for 39512@debbugs.gnu.org; Wed, 12 Aug 2020 13:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=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XKF_qCo8GVabejKe_66ARC58rVaSPgHF2TgR7IhRsSm43P10 iOcEWoiBxHom50oo3vsfbbU4P1sLNDTDCs6LIGShCDiSEdzHkQqQUjD1zWU48QQfaFEZb4K9PiUP umr.iaAT_ngLhyQTEfWhck9q0teNP.LEulEo0J._uiQZ1EhiJh8nKLy8D_A5rdV3Jwjh.K4auIB6 vH7h9WnYTYAmzabD.WnQ7KlbMyGyxLo2ieB_4OREkW Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic304.consmr.mail.bf2.yahoo.com with HTTP; Wed, 12 Aug 2020 17:41:34 +0000 Original-Received: by smtp415.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 4581c3727821a420aa6b1e5cda06c06b; Wed, 12 Aug 2020 17:41:29 +0000 (UTC) Content-Disposition: inline In-Reply-To: <87k0y4n5dk.fsf@mail.linkov.net> X-Mailer: WebService/1.1.16455 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) 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:184849 Archived-At: On Wed, Aug 12, 2020 at 02:13:11AM +0300, Juri Linkov wrote: >> If the region is active but empty that functionality could make sense >> (extend to the next thing at point), but when it is not empty I think it >> doesn't make too much sense in general use... but let's wait for the >> rest of the opinions. > >Good point. ‘C-SPC M-s . C-s C-s ...’ means that the user wants to >extend the region to one of the next found symbols. > >But still there is an unsolved problem: ‘M-s .’ activates the *symbol* >search mode, not the default non-symbol search mode. This means that >the yanked region will match only symbols, that is useless when the >region is longer than one symbol (the symbol search is activated by >the call of ‘isearch-forward-symbol’ in ‘isearch-forward-symbol-at-point’). > >This means there is still a need to add a new command that yanks the region >but doesn't activate the symbol search mode. > You are right; but... 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. Because for isearch-forward-symbol there is already `M-s _` >> 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 C we could pass a variable by reference; but in elisp I don't know whats the convectional way.