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: Mon, 10 Aug 2020 02:23:59 +0300 Organization: LINKOV.NET Message-ID: <87mu33zchk.fsf@mail.linkov.net> References: <87eev52bw6.fsf@calancha-pc.dy.bbexcite.jp> <877e0wiosp.fsf@mail.linkov.net> <87v9hst5wv.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31340"; 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, Tino Calancha , npostavs@gmail.com, 39512@debbugs.gnu.org, contovob@tcd.ie To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Aug 10 01:31:12 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 1k4umW-00083K-LO for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 10 Aug 2020 01:31:12 +0200 Original-Received: from localhost ([::1]:38216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4umV-000138-C3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 09 Aug 2020 19:31:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41556) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4umN-00012K-DV for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 19:31:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k4umN-0000kD-3r for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 19:31:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1k4umN-0002M5-1T for bug-gnu-emacs@gnu.org; Sun, 09 Aug 2020 19:31: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: Sun, 09 Aug 2020 23:31: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.15970158238982 (code B ref 39512); Sun, 09 Aug 2020 23:31:02 +0000 Original-Received: (at 39512) by debbugs.gnu.org; 9 Aug 2020 23:30:23 +0000 Original-Received: from localhost ([127.0.0.1]:33693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4ulj-0002Kj-5d for submit@debbugs.gnu.org; Sun, 09 Aug 2020 19:30:23 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44279) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4ulh-0002K4-5v for 39512@debbugs.gnu.org; Sun, 09 Aug 2020 19:30:21 -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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 126C040003; Sun, 9 Aug 2020 23:30:11 +0000 (UTC) In-Reply-To: <87v9hst5wv.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 09 Aug 2020 13:28:16 +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:184464 Archived-At: >> Thanks for creating a new feature request that unlike these discussions >> on emacs-devel won't fall into oblivion. > > This was in February, though, and the patch still hasn't been applied. :-/ > > I think this addition makes sense... was there any particular reason > it's not applied? I really don't see a need for adding isearch-yank-region. I think that isearch-forward-region proposed by Ergus should be sufficient because typing 'M-s M-.' (bound globally to isearch-forward-region) even when isearch mode is active, will exit Isearch and restart Isearch with the contents of the still active region added to the search string. This will cover all cases requested here with just one new command: (defun isearch-forward-region () "Do incremental search forward for text from the active region. Like ordinary incremental search except that text from the region is added to the search string initially if the region is active." (interactive) (isearch-forward nil 1) (cond ((use-region-p) (when (< (mark) (point)) (exchange-point-and-mark)) (isearch-yank-string (buffer-substring-no-properties (region-beginning) (region-end))) (deactivate-mark)) (t (setq isearch-error "No active region") (isearch-push-state) (isearch-update)))) (define-key search-map "\M-." 'isearch-forward-region)