From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#39512: 28.0.50; Add command isearch-yank-region Date: Mon, 10 Feb 2020 02:45:17 +0200 Organization: LINKOV.NET Message-ID: <87o8u75lfe.fsf@mail.linkov.net> References: <87eev52bw6.fsf@calancha-pc.dy.bbexcite.jp> <877e0wiosp.fsf@mail.linkov.net> <878slc2ax5.fsf@calancha-pc.dy.bbexcite.jp> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="90773"; 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: spacibba@aol.com, npostavs@gmail.com, 39512@debbugs.gnu.org, contovob@tcd.ie To: Tino Calancha Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 10 01:52:14 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 1j0xJ8-000NVi-DS for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Feb 2020 01:52:14 +0100 Original-Received: from localhost ([::1]:55716 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0xJ7-00074M-FN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Feb 2020 19:52:13 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59483) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j0xIy-00073y-P7 for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 19:52:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j0xIx-0002eS-KB for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 19:52:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47522) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j0xIw-0002cy-Gl for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 19:52:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j0xIw-0004Se-En for bug-gnu-emacs@gnu.org; Sun, 09 Feb 2020 19:52:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: <87eev52bw6.fsf@calancha-pc.dy.bbexcite.jp> Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Feb 2020 00:52: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.158129589517100 (code B ref 39512); Mon, 10 Feb 2020 00:52:02 +0000 Original-Received: (at 39512) by debbugs.gnu.org; 10 Feb 2020 00:51:35 +0000 Original-Received: from localhost ([127.0.0.1]:53492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0xIV-0004Rj-EJ for submit@debbugs.gnu.org; Sun, 09 Feb 2020 19:51:35 -0500 Original-Received: from bisque.elm.relay.mailchannels.net ([23.83.212.18]:31482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j0xIT-0004Ra-5Z for 39512@debbugs.gnu.org; Sun, 09 Feb 2020 19:51:34 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D6F65340BDB; Mon, 10 Feb 2020 00:51:31 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a69.g.dreamhost.com (100-96-0-7.trex.outbound.svc.cluster.local [100.96.0.7]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 3EB53340BD3; Mon, 10 Feb 2020 00:51:31 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a69.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Mon, 10 Feb 2020 00:51:31 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Stupid-Spill: 6ed9b67a46962da6_1581295891520_9545616 X-MC-Loop-Signature: 1581295891520:2107439328 X-MC-Ingress-Time: 1581295891520 Original-Received: from pdx1-sub0-mail-a69.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a69.g.dreamhost.com (Postfix) with ESMTP id A8FBB81B25; Sun, 9 Feb 2020 16:51:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:message-id:mime-version:content-type; s=linkov.net; bh=SxYTA3o/ECoheAdrJnSH5ikqiOk=; b=ERvvLz9/pftSLd a7qFBWh8E6O0p8TQWZ5DE5QjgLLU9SxVFFh5nxaYhrnQCwV75X01gioBZfptPHjR Hc7X6s/nCVD9qkCfNZ2lYax27gzRooNcYkeJ7XUNYaq7Xceq0m+y7LeVPwgCu2fs J1cLGV2xQbWwWMLbmxhZSRMHzAY2o= Original-Received: from mail.jurta.org (m91-129-105-126.cust.tele2.ee [91.129.105.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a69.g.dreamhost.com (Postfix) with ESMTPSA id EB86D81B1F; Sun, 9 Feb 2020 16:51:20 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a69 X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrheelgdduieekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedruddvieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedruddviedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehtihhnohdrtggrlhgrnhgthhgrsehgmhgrihhlrdgtohhm X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:175850 Archived-At: > I have added global keybinding `M-s M-.' for my `isearch-yank-region'. Thanks. > `isearch-yank-kill' and `isearch-yank-region' are good names for the > use case of calling them once we are in an interactive search. > > The names are not any good for the use case of calling them directly > (from a global keybinding). We might want: > > 1. aliases `isearch-forward-kill', `isearch-forward-region' Aliases might add more confusion and make impression that these are separate commands when displayed in a list of isearch commands, e.g. in completion list, in documentation. > 2. restrict the use of them for just inside the interactive search, and > define the new commands (`isearch-forward-kill',`isearch-forward-region') > as those calling `isearch-mode' at the beginning. Restricting would be worse. So maybe `isearch-yank-kill' and `isearch-yank-region' still are not too bad names to use as entry points to enable isearch mode. > + (define-key map "\M-." 'isearch-yank-region) Some doubts are about `M-.' - what if some users might want to use `M-.' to exit isearch and run its global binding `xref-find-definitions' on the found symbol? Maybe better to bind `isearch-yank-region' to `M-s M-.' in isearch-mode too? > I have some advice in that function that lets me call it with no arguments. Maybe a new function could be added as a wrapper around `(funcall region-extract-function)' and with its argument optional.