From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#20351: isearch-lax-whitespace should be customizable variable Date: Mon, 29 Jun 2015 16:14:24 -0700 (PDT) Message-ID: <7acaf181-869b-4f07-a6c0-ac64d95a184d@default> References: <87d20eyw78.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1435619730 350 80.91.229.3 (29 Jun 2015 23:15:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jun 2015 23:15:30 +0000 (UTC) Cc: 20351@debbugs.gnu.org To: Juri Linkov , Ken T Takusagawa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 30 01:15:17 2015 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 1Z9iGi-0006NS-RK for geb-bug-gnu-emacs@m.gmane.org; Tue, 30 Jun 2015 01:15:16 +0200 Original-Received: from localhost ([::1]:44360 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9iGi-0000mq-8h for geb-bug-gnu-emacs@m.gmane.org; Mon, 29 Jun 2015 19:15:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9iGa-0000lF-4R for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 19:15:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z9iGV-0004HT-S5 for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 19:15:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z9iGV-0004HB-OS for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 19:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Z9iGV-0005hB-9J for bug-gnu-emacs@gnu.org; Mon, 29 Jun 2015 19:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 29 Jun 2015 23:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20351 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20351-submit@debbugs.gnu.org id=B20351.143561967321848 (code B ref 20351); Mon, 29 Jun 2015 23:15:03 +0000 Original-Received: (at 20351) by debbugs.gnu.org; 29 Jun 2015 23:14:33 +0000 Original-Received: from localhost ([127.0.0.1]:33424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9iG0-0005gJ-W3 for submit@debbugs.gnu.org; Mon, 29 Jun 2015 19:14:33 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:49967) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Z9iFy-0005g5-SF for 20351@debbugs.gnu.org; Mon, 29 Jun 2015 19:14:31 -0400 Original-Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t5TNEOSl032721 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 29 Jun 2015 23:14:24 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t5TNEOG1025750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 29 Jun 2015 23:14:24 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t5TNEOPL002854; Mon, 29 Jun 2015 23:14:24 GMT In-Reply-To: <87d20eyw78.fsf@mail.linkov.net> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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:104517 Archived-At: > I believe both =E2=80=98isearch-lax-whitespace=E2=80=99 and =E2=80=98char= acter-fold-search=E2=80=99 > should be customizable. bug#11378 proposed a patch that adds a new > user variable to customize all such search parameters: >=20 > (defcustom isearch-keep-mode-variables nil > "A set of search variables to keep between different searches. > When a search variable is customized to exist in this set, then > starting a new search doesn't reset the corresponding isearch > variable to its default value, thus keeping the value from the > previous search (changed using toggling commands)." ... FWIW, I agree (strongly) that some such feature is desirable. I think you and I have discussed this a bit before. Isearch+ has this feature, in a different form. There is option `isearchp-toggle-option-flag' and its associated toggle command. Non-nil means Isearch toggling commands can affect option values. If nil, the option value remains unchanged - the effect is temporary. Applies to toggle commands for behavior that has an associated user option. Currently this means `M-s i' (`isearch-toggle-invisible') and `M-c' (`isearch-toggle-case-fold'). The option determines whether commands that toggle behavior also toggle an associated user option. For such commands, a prefix arg flips the behavior, as if `isearchp-toggle-option-flag' were toggled temporarily. You can toggle this option itself, using `M-s v' (`isearchp-toggle-option-toggle'). I mention this approach, but your suggestion sounds good too. The point is to let users decide whether toggling the state (for any given state attribute) also toggles the option value - so that the effect remains after Isearch is finished. And to let them override their preference temporarily (e.g., with a prefix arg). What you have added is the ability for users to pick which options to put under the sway of something like `isearchp-toggle-option-flag', IOW, you have in effect, provided a `isearchp-toggle-option-flag' for each togglable option separately. And that sounds like a good thing, a priori. I'd propose combining your suggestion with the temporary-flipping behavior I describe: a prefix arg (or whatever) lets a user temporarily change her mind about the `isearch-keep-mode-variables' setting for that toggle: if the option is not listed in `i-s-k-m-v' then `C-u' toggles the option; if the option is listed there then `C-u' does not toggle the option (it toggles the state/behavior only for the current Isearch duration).