From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#22479: 25.0.50; isearch and query-replace histories do not remember if we were looking for symbols Date: Wed, 03 Feb 2016 02:39:19 +0200 Organization: LINKOV.NET Message-ID: <87k2mm4niw.fsf@mail.linkov.net> References: <87zivq8xp2.fsf@secretsauce.net> <87r3h2boyj.fsf@mail.linkov.net> <89D2C9D3-7CA3-49A8-9BFC-CE455C91A8A8@secretsauce.net> <87io2apqad.fsf@mail.linkov.net> <2e298ac7-bc65-4afc-9d23-72785e2cad93@default> <87bn814qe6.fsf@secretsauce.net> <87oac1o15f.fsf@mail.linkov.net> <871t8v4qzr.fsf@secretsauce.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1454461464 5493 80.91.229.3 (3 Feb 2016 01:04:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 3 Feb 2016 01:04:24 +0000 (UTC) Cc: 22479@debbugs.gnu.org To: Dima Kogan Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Feb 03 02:04:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aQlrg-0004qP-EX for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Feb 2016 02:04:12 +0100 Original-Received: from localhost ([::1]:60171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQlrf-00042Z-OU for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Feb 2016 20:04:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQlra-000416-PY for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 20:04:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQlrX-0001HD-5W for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 20:04:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQlrX-0001H7-2A for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 20:04:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aQlrW-0002FO-SY for bug-gnu-emacs@gnu.org; Tue, 02 Feb 2016 20:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 03 Feb 2016 01:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22479 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22479-submit@debbugs.gnu.org id=B22479.14544614378620 (code B ref 22479); Wed, 03 Feb 2016 01:04:02 +0000 Original-Received: (at 22479) by debbugs.gnu.org; 3 Feb 2016 01:03:57 +0000 Original-Received: from localhost ([127.0.0.1]:57277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQlrR-0002Ey-7n for submit@debbugs.gnu.org; Tue, 02 Feb 2016 20:03:57 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:45009 helo=homiemail-a13.g.dreamhost.com) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQlrP-0002Ei-Kz for 22479@debbugs.gnu.org; Tue, 02 Feb 2016 20:03:55 -0500 Original-Received: from homiemail-a13.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTP id 35BAF33406F; Tue, 2 Feb 2016 17:03:55 -0800 (PST) Original-Received: from localhost.linkov.net (85.253.204.130.cable.starman.ee [85.253.204.130]) (Authenticated sender: jurta@jurta.org) by homiemail-a13.g.dreamhost.com (Postfix) with ESMTPA id 286A033406C; Tue, 2 Feb 2016 17:03:53 -0800 (PST) In-Reply-To: <871t8v4qzr.fsf@secretsauce.net> (Dima Kogan's message of "Mon, 01 Feb 2016 21:32:08 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:112311 Archived-At: >>>> 5. More ideas? ;) >>> >>> - We can retain the two histories: regex, non-regex >>> >>> - Any fancy (word, symbol, etc) searches can be stored into the regex >>> history, bookmarked with the appropriate regexen ("\_<", "\_>" for >>> instance) >>> >>> - When reading the history to present to the user, these can be parsed >>> out. So for instance when the user looks through the symbol-search >>> history by hitting >>> >>> M-s _ >>> C-s >>> >>> emacs can look through the regex history, only selecting entries in >>> \_<...\_>. The C-M-s history can either include all of these, or show >>> only unbookmarked entries; both would be ok, I think. >> >> This approach is compromising but unreliable > > Indeed it is a compromise. It feels to me to be much better than what we > have now, and the issues aren't too significant... I think... > >> (doesn't distinguish between the case when the user uses the symbol >> search M-s _ or types \_<...\_> directly in the regexp search) > > True, but I think this is OK. The symbol-search history would include > M-s _ searches AND those C-M-s searches where the intent was to look for > symbols; I think this is fine. The regex-search history would include > all symbol searches also; maybe that is less fine, but it isn't crazy. > The text search history would include none of these; this is GOOD, and > is not what we do now. How then you would deconstruct an original search string from a char-fold regexp? Almost impossible with such garbage-looking regexp like you demonstrated in bug#22520. >> (need to remember other search parameters like case-fold and >> lax-whitespace). > > Hmmm. This clearly requires metadata so some of your other, more > intrusive proposals would be required to handle this. Might be not too intrusive given that we already have such metadata in isearch-cmds. This means extending the isearch-cmds structure to search-ring, and maybe renaming it to isearch-ring.