From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: Isearch: retrieve last successful search string from when you quit (`C-g') Date: Mon, 1 Oct 2012 08:21:01 -0700 Message-ID: <0860CD16FA6A43A7B3FB40FE34C6B934@us.oracle.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1349104896 27980 80.91.229.3 (1 Oct 2012 15:21:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Oct 2012 15:21:36 +0000 (UTC) Cc: emacs-devel@gnu.org, 'Dani Moncayo' To: "'Christopher Monsanto'" , "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 01 17:21:39 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 1TIhoQ-0002rU-3H for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2012 17:21:38 +0200 Original-Received: from localhost ([::1]:36596 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhoK-0000MJ-FL for ged-emacs-devel@m.gmane.org; Mon, 01 Oct 2012 11:21:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIhoE-0008Vu-3m for emacs-devel@gnu.org; Mon, 01 Oct 2012 11:21:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TIho7-0007cr-Kj for emacs-devel@gnu.org; Mon, 01 Oct 2012 11:21:26 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:51575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TIho7-0007ci-Ex for emacs-devel@gnu.org; Mon, 01 Oct 2012 11:21:19 -0400 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q91FLG3k028707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 1 Oct 2012 15:21:17 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q91FLFkl000594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 1 Oct 2012 15:21:16 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q91FLF5c026454; Mon, 1 Oct 2012 10:21:15 -0500 Original-Received: from dradamslap1 (/10.159.219.190) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 01 Oct 2012 08:21:15 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac2f5kTZBJK0Uw4IT8uOmiZVNJnIrwAAEpPQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 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:153842 Archived-At: > To be honest, I always thought there was some bug in isearch that made > it forget my search strings. I'd love it if isearch just > unconditionally remembered my searches. It is not a bug; it is by design. And a good design it is. AFAIK, no one has ever filed a bug report complaining that abandoned searches are not saved in the histories. I doubt if you would really love it, in practice. But it is simple for you to try it, to see. As an analogy, think of moving to a search hit and staying there as "entering" the search string into an input history, much as when you hit RET to choose a completion during minibuffer input with completion. Would you want your input history to also remember the minibuffer content that was current each time you hit TAB? I don't think so. When you "accept" a search hit, moving there and ending Isearch, it shows that the search string was useful to you. It should be added to the search history. When you abandon searching, regardless of whether you might have looked at some search hits, it indicates that you did not want to move to any of them and stay there. That search was not useful to you - at least not in terms of changing your location. That search string should not be added to the history, IMO. The history is (and should remain, IMO) a history of used searches. But for the last such successful-but-unused search string, yes, there should perhaps be a way to get it back. That is what I proposed, not systematically adding unused searches to the history.