From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: isearch region or thing at point. Date: Mon, 29 Apr 2019 22:41:28 +0300 Organization: LINKOV.NET Message-ID: <87h8agy4yf.fsf@mail.linkov.net> References: <20190427001453.isjx247kc3lu5fe4@Ergus> <87a7gcp51i.fsf@tcd.ie> <20190429004135.rn5tp2gnmbjovrxj@Ergus> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="198629"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: "Basil L. Contovounesios" , emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 29 22:21:42 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hLCmT-000pXm-Ba for ged-emacs-devel@m.gmane.org; Mon, 29 Apr 2019 22:21:41 +0200 Original-Received: from localhost ([127.0.0.1]:34799 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLCmS-0002KU-6o for ged-emacs-devel@m.gmane.org; Mon, 29 Apr 2019 16:21:40 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:46421) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLCl9-0002Ix-3p for emacs-devel@gnu.org; Mon, 29 Apr 2019 16:20:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hLCl8-0003Oh-3J for emacs-devel@gnu.org; Mon, 29 Apr 2019 16:20:19 -0400 Original-Received: from catfish.maple.relay.mailchannels.net ([23.83.214.32]:13062) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hLCl7-0003Lk-Na for emacs-devel@gnu.org; Mon, 29 Apr 2019 16:20:18 -0400 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 0EF931244B9; Mon, 29 Apr 2019 20:20:15 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a39.g.dreamhost.com (unknown [100.96.16.23]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id AB2691260C7; Mon, 29 Apr 2019 20:20:14 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a39.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.17.2); Mon, 29 Apr 2019 20:20:15 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Arch-Broad: 00f0ca273e745f52_1556569214816_3803807379 X-MC-Loop-Signature: 1556569214815:1826071338 X-MC-Ingress-Time: 1556569214815 Original-Received: from pdx1-sub0-mail-a39.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a39.g.dreamhost.com (Postfix) with ESMTP id 5A35082B6A; Mon, 29 Apr 2019 13:20:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=RxhQRpvcgUbNyrWQL5Gg2wako7s=; b= i2LNp90LakEkClv3yyQ4MLafe9+gei0Zsx0O/e8h/kuKYuDEcMB49senzCDb0ocS 8j19Yj79AqEZhIM5GEHpVL5LzNc7btKFvWBqgd8cbNLVTM1LtqOlgvJfLu4dRuxj c8ycCnDQkIN7vseJZ9KQwWLF0PIl5HWvdmWCeTcMHpM= Original-Received: from mail.jurta.org (m91-129-107-198.cust.tele2.ee [91.129.107.198]) (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-a39.g.dreamhost.com (Postfix) with ESMTPSA id A871A82B67; Mon, 29 Apr 2019 13:20:11 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a39 In-Reply-To: <20190429004135.rn5tp2gnmbjovrxj@Ergus> (Ergus's message of "Mon, 29 Apr 2019 02:41:35 +0200") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduuddriedvgddugeelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdejrdduleeknecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddtjedrudelkedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehsphgrtghisggsrgesrgholhdrtghomhenucevlhhushhtvghrufhiiigvpedt X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 23.83.214.32 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:236036 Archived-At: >>The closest to this that I'm aware of is >>isearch-forward-symbol-at-point, bound to 'M-s .' by default. >> > I just made a small change in isearch.el to enable region text auto > insertion in transient-mark-mode. (patch attached) > > I did it as simple as I could. So please if you (or any anyone) could > give a look and correct/improve/expose corner cases, or suggest a better > implementation will be very nice. > > I don't have corner cases right now, but I just started testing it. > > So any correction/suggestion/recommendation is very appreciated. Thanks, such addition is welcome. Currently searching the active region requires invocation of several commands: M-w C-s M-y with a bad side-effect of leaving the region in the kill-ring. However, adding a new option is not a satisfactory solution because often isearch is used to extend the boundaries of the active region, e.g. by setting the region's beginning with C-SPC, then searching the region's end and exiting isearch there. Fortunately, like Basil mentioned the command isearch-forward-symbol-at-point bound to 'M-s .' you could create a similar command bound to e.g. 'M-s r' that would start isearch with the text from the active region.