From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nix Newsgroups: gmane.emacs.devel Subject: Re: Isearch: retrieve last successful search string from when you quit (`C-g') Date: Tue, 02 Oct 2012 12:26:21 +0100 Message-ID: <87obkl5d42.fsf@spindle.srvr.nix> References: <0860CD16FA6A43A7B3FB40FE34C6B934@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349177228 29459 80.91.229.3 (2 Oct 2012 11:27:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Oct 2012 11:27:08 +0000 (UTC) Cc: Stefan Monnier , Drew Adams , emacs-devel@gnu.org To: Dani Moncayo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 02 13:27:11 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TJ0ci-0001BP-3T for ged-emacs-devel@m.gmane.org; Tue, 02 Oct 2012 13:26:48 +0200 Original-Received: from localhost ([::1]:44272 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0cc-0003Ny-Cd for ged-emacs-devel@m.gmane.org; Tue, 02 Oct 2012 07:26:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0cR-0003MT-PV for emacs-devel@gnu.org; Tue, 02 Oct 2012 07:26:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJ0cQ-0005JK-Mn for emacs-devel@gnu.org; Tue, 02 Oct 2012 07:26:31 -0400 Original-Received: from icebox.esperi.org.uk ([81.187.191.129]:49505 helo=mail.esperi.org.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0cQ-0005Hv-64 for emacs-devel@gnu.org; Tue, 02 Oct 2012 07:26:30 -0400 Original-Received: from spindle.srvr.nix (nix@spindle.srvr.nix [192.168.14.15]) by mail.esperi.org.uk (8.14.5/8.14.5) with ESMTP id q92BQLcp028294; Tue, 2 Oct 2012 12:26:21 +0100 Emacs: (setq software-quality (/ 1 number-of-authors)) In-Reply-To: (Dani Moncayo's message of "Mon, 1 Oct 2012 17:41:32 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-DCC-wuwien-Metrics: spindle 1290; Body=5 Fuz1=5 Fuz2=5 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 81.187.191.129 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153896 Archived-At: On 1 Oct 2012, Dani Moncayo stated: >> Since there is a difference in opinion, a user >> configurable flag is what I would advocate for. > > Another approach: keep `C-g' as it is now (just cancel the current > command) and choose another key for exiting i-search saving the > current search string... Quite. Perhaps I'm just an idiot, but I always thought the current isearch behaviour of not immediately quitting when C-g was stuck on a failed search was a *bug*. Only now, after Drew commented on it, do I notice that it's removing the unfound component of the failed search: i.e., it's a feature, but unless you spend your time looking at the echo area while isearching (and who does that?) they'll never notice it. I don't know the right way to fix this. The operation is clearly useful; C-g is clearly a meaningful keybinding for it, and lots of keys work differently form the norm in isearch, so why not keyboard-escape-quit too; it is clearly documented... but I never realised it was there and thought C-g instantly quit anything unless Emacs was busy at the C layer. So perhaps there is no problem here and I should just chalk this up to being a doofus and needing to spend some time learning what features have been added to isearch in the last fifteen years. Maybe everyone else expects C-g to work the way it does in isearch. But perhaps something other than C-g is the right binding, and C-g really *should* quit, dammit. -- NULL && (void)