From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Isearch interaction model Date: Fri, 09 Mar 2018 00:41:30 +0200 Organization: LINKOV.NET Message-ID: <87d10echr9.fsf@mail.linkov.net> References: <87po4slrg4.fsf@mail.linkov.net> <2854ae14-ad4a-2fa2-ff0f-652e1501819e@dancol.org> <87fu5jh14h.fsf_-_@mail.linkov.net> <87po4gvptz.fsf@mail.linkov.net> <87h8prwmaq.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1520550259 23567 195.159.176.226 (8 Mar 2018 23:04:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2018 23:04:19 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: Emacs developers To: dancol@dancol.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Mar 09 00:04:15 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eu4a7-000630-4A for ged-emacs-devel@m.gmane.org; Fri, 09 Mar 2018 00:04:15 +0100 Original-Received: from localhost ([::1]:42371 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu4c9-00034n-U5 for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2018 18:06:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33400) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eu4Vo-0006gC-Sv for emacs-devel@gnu.org; Thu, 08 Mar 2018 17:59:49 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eu4Vl-00030N-0C for emacs-devel@gnu.org; Thu, 08 Mar 2018 17:59:48 -0500 Original-Received: from sub3.mail.dreamhost.com ([69.163.253.7]:32844 helo=homiemail-a15.g.dreamhost.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eu4Vk-0002zx-QC for emacs-devel@gnu.org; Thu, 08 Mar 2018 17:59:44 -0500 Original-Received: from homiemail-a15.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTP id 3C49476C069; Thu, 8 Mar 2018 14:59:40 -0800 (PST) Original-Received: from localhost.linkov.net (m91-129-108-46.cust.tele2.ee [91.129.108.46]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by homiemail-a15.g.dreamhost.com (Postfix) with ESMTPSA id 3071E76C065; Thu, 8 Mar 2018 14:59:38 -0800 (PST) In-Reply-To: (dancol's message of "Wed, 7 Mar 2018 14:55:05 -0800") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x [fuzzy] X-Received-From: 69.163.253.7 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:223521 Archived-At: >>> The isearch mode should be attached to the history item. C-M-s M-p and >>> C-s >>> M-p should have the same effect: the "mode" is only a default for a new >>> search. If the last search was a regex search, it'll put in you regex >>> search mode. >> >> But what about keeping current behavior where C-M-s M-p pulls only >> regexps from the regexp history. Should we break backward compatibility >> in how it used to work? > > I think that behavior is an artifact of the current implementation, not > something desirable. String and regexp searches are fundamentally different in nature. Regexps are useless in string-based modes, whereas strings in isearch are interpreted by different rules according to mode: word/case-fold/... e.g. it makes sense to switch from case-fold mode to word mode, but not from regexp mode to literal mode. But it you want to share string and regexp histories, it's easy to implement by another layer of indirection like for query-replace history variables: (defcustom query-replace-from-history-variable 'query-replace-history (defcustom query-replace-to-history-variable 'query-replace-history