From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Re: Simple isearch concerns Date: Mon, 5 Apr 2021 03:41:40 +0200 Message-ID: <20210405014140.atgn4dva5pi5i6eb@Ergus> References: <20210403001539.x4rb55dvh46rmhb3.ref@Ergus> <20210403001539.x4rb55dvh46rmhb3@Ergus> <87tuold7or.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23739"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juri Linkov , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 05 03:42:59 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lTEGY-000650-KY for ged-emacs-devel@m.gmane-mx.org; Mon, 05 Apr 2021 03:42:58 +0200 Original-Received: from localhost ([::1]:44672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTEGX-0003m2-96 for ged-emacs-devel@m.gmane-mx.org; Sun, 04 Apr 2021 21:42:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTEFk-0003M0-TF for emacs-devel@gnu.org; Sun, 04 Apr 2021 21:42:08 -0400 Original-Received: from sonic310-15.consmr.mail.bf2.yahoo.com ([74.6.135.125]:37367) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTEFh-00013i-Hg for emacs-devel@gnu.org; Sun, 04 Apr 2021 21:42:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1617586922; bh=4O3mwexoDaVviPDgB5o+V87Nqo6SU1QZ8I6SVrhKTRM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject:Reply-To; b=HGm61xtTvq9bzr32hKuLu9o953kCeK5Jnq7uE02OfNlEzPmD7BZ+LHXUx5AOFyujjk2LvQf4OODU7aNVowV31RWEp4BYnZkk6iDbdNoAXwBOsGLAS9teolpXMc0l2dDpEQsJqkvnNrVHrFZWeMitlQ/M7wQBe+M/AsCPwGuT6laDAJfld1DsCDeL0SN5e3lHTCGnkZyQn4zdG78UHaII1WDuDYc8YX8AffYbwM2xyFWIYTPVGPoROxCvo4TwfNsJ18eDEOvWV13oj9/EDCF1THzAFqV1G/6BZmsOegDaUR3NI4a1ZVO6eL8jHisgF6ymsFwKczqqejIkmhYNh3w0kA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1617586922; bh=DC/wMoJxPrKuyTfyvVfH7ZfbuJRLkchuPuXbrXkOBSP=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=BzbQf99PH5eMZShiuP+ffGBvVseQYpmR7CGiFKZHKqNhqVgL+kMTRoGpJtsDATvbInpnaRCNeNfPlgUf24oWxQWFjhCbFZx71a5Y84rs0Zo8YhZY/14cGtL6M1T6Mso5k+p6x10+/8/hQm55D0nQ6iXeCoGVrIi5r3vKaAu1eOuw/a7Xz4Y/n8WlnSOCfE+REIN6cKCyLplz/YtwX9+TyMSKsPLCqCPCjLiXS1XM/TiLDwMrFAopGBfxgi6Z5w4pCzjOctkkrRwp1V0W0JF8lEZi5UeGC2dGFO6/5tP/A9mBI2I8+LBGEI+XXl79cgdc1iRG0/o/Tc6M4sECWJaXwQ== X-YMail-OSG: TGdnuWYVM1lDBbpxkKrzCUt4_RR6q8QI3kOLI6d7AoQIjPzZ8QCq5.ATYFVFVJW .5Tq3BWiufYmK8UjAVd2T966A0j_J_b6ETN2FU8iYPkXj_TooChOn5gzHv2iNZWjP5_CJWGM4QKj ivfeGSbdAbOSxAlCRadcOFszbgNNYfXmErDKzNLN48yJ6UUNpGnyHkq5il8yyJBD7tiJn_wVKZqO _5_GH2BmMPZ2TAhlGnpIreTw7LI8jruOOZKJlp.CFioi950jM1D54Nd63Odf_godcZ7vQARAuB63 AcPeh8fGAbgp7pWGkscPNAW_Tu2VyTTIeS7FYWnwhgileZnqyoscANB2.m2wI4H2vQKpEBd35ruG 5eizeD8ml.lIt9Sd6ckttX.I8bH81QTseUE5eO5KXkwtJ8v0wkTlNE5sdoZmZ_l_W2H7VVGBaQDg pAccK5zVhwCa62GO5HhrgVlvlWVvr9Docdzqw9HEinKgDjNU5XvjFk8zqYM21H_RC0p3Vqg6CVCT N9MZLejoRSX9DFsf.xWBkfB422xtvtwq7chVVapgSZExbvgw7GmvQwr_pG3M7SalQNXqpxV4Yb0R CfAMXhj0OWwaocSEjtLwiN1ZzhOYSjL4i2yS_oaT.sPDuJsL6H79I3ZxLOdk23fx7GAPFDJ36knK iuAHY5XUSox0LHDgUPsCdgEq.HOFZxBm1rrdKiOouiN5WbEdnIE.2Kk.SGrd03NRFXKeuzsG_ww. zgjNpNfj1g7eSW16a0f0ysnr0__TVnQoBJAk_kbjn08Ql7E7gnQ9YoAjWiSIFiTfMkAASz1s8vda jUiJlGkH7Co4q1aGDDchN4jx..QsIvVP0mJH7A6MHO X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.bf2.yahoo.com with HTTP; Mon, 5 Apr 2021 01:42:02 +0000 Original-Received: by kubenode510.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 07c01f556710f8eea00de7fb1a2c165f; Mon, 05 Apr 2021 01:41:57 +0000 (UTC) Content-Disposition: inline In-Reply-To: X-Mailer: WebService/1.1.18070 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/16) Received-SPF: pass client-ip=74.6.135.125; envelope-from=spacibba@aol.com; helo=sonic310-15.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267399 Archived-At: On Sun, Apr 04, 2021 at 07:27:13PM -0400, Stefan Monnier wrote: >> -(defvar isearch-mode-end-hook nil >> +(defcustom isearch-mode-end-hook nil >> "Function(s) to call after terminating an incremental search. >> When these functions are called, `isearch-mode-end-hook-quit' >> -is non-nil if the user quits the search.") >> +is non-nil if the user quits the search." >> + :type 'hook >> + :options '(isearch-exit-other-end) >> + :version "28.1") > >FWIW, I can't imagine why someone would like that option. I can see it >being useful *sometimes*, but I think it'd be harmful at least as often >as it is useful. > > > Stefan > Hi Stefan: Swiper provides this option and after trying it I found it very useful and some other users seems they do too. Specially when the idea is to select a word C-M-SPC after it is found is very handy. Another use case is when the word looks like my_var or my-var it requires M-b twice to go to the beginning and then select. In any case, if you think this option is not desirable for any reason, another alternative may be to add a command in the isearch map (bind to C-RET, or M-RET) to end the search and go to the other end... something like isearch-exit-go-other-end. This alternative is actually a bit more interesting; and maybe equivalent to pressing C-r before RET... but faster?