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#11378: 24.1.50; Suggestion: Let M-i in isearch cycle `search-invisible' Date: Sun, 02 Jun 2013 12:47:12 +0300 Organization: JURTA Message-ID: <87txlglu8v.fsf@mail.jurta.org> References: <87haw32hly.fsf@web.de> <87397m6oxf.fsf@mail.jurta.org> <87y5pcdzxx.fsf@mail.jurta.org> <874nqzgcuk.fsf@mail.jurta.org> <87vcjesccy.fsf@mail.jurta.org> <87lijtcx8m.fsf@mail.jurta.org> <87sj1811tq.fsf@mail.jurta.org> <87vc6222vi.fsf@mail.jurta.org> <084871f7-9554-450a-863f-52a5b251d7d0@default> <871u8pmmla.fsf@mail.jurta.org> <6dcc689e-53a8-4982-953c-1b21c11cec78@default> <87k3mgevq2.fsf@mail.jurta.org> <87wqqghvy1.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1370166866 2842 80.91.229.3 (2 Jun 2013 09:54:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 2 Jun 2013 09:54:26 +0000 (UTC) Cc: 11378@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 02 11:54:26 2013 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 1Uj4zZ-0004WQ-AB for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Jun 2013 11:54:25 +0200 Original-Received: from localhost ([::1]:38396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj4zZ-0004yz-1F for geb-bug-gnu-emacs@m.gmane.org; Sun, 02 Jun 2013 05:54:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj4zU-0004uF-9X for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2013 05:54:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uj4zT-0002Wv-6l for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2013 05:54:20 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58988) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uj4zT-0002Wr-2m for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2013 05:54:19 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Uj517-0002Bl-RC for bug-gnu-emacs@gnu.org; Sun, 02 Jun 2013 05:56:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 02 Jun 2013 09:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11378 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11378-submit@debbugs.gnu.org id=B11378.13701669518336 (code B ref 11378); Sun, 02 Jun 2013 09:56:01 +0000 Original-Received: (at 11378) by debbugs.gnu.org; 2 Jun 2013 09:55:51 +0000 Original-Received: from localhost ([127.0.0.1]:47344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uj50w-0002AG-6b for submit@debbugs.gnu.org; Sun, 02 Jun 2013 05:55:51 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:36914 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Uj50s-00029l-Ie for 11378@debbugs.gnu.org; Sun, 02 Jun 2013 05:55:48 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 0050F258B9E91C; Sun, 2 Jun 2013 02:53:58 -0700 (PDT) In-Reply-To: <87wqqghvy1.fsf@mail.jurta.org> (Juri Linkov's message of "Fri, 31 May 2013 02:47:18 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:74746 Archived-At: > I'm preparing a patch that adds it to customize the behavior of > case-fold and invisible. This patch adds a new user option `isearch-keep-mode-variables' in parallel to another new option `isearch-keep-stack-variables' added in bug#12986. It supports `isearch-case-fold-search' and `isearch-invisible' variables, but `isearch-filter-predicates', `isearch-lax-whitespace' could be added in the same way later. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-05-30 23:50:36 +0000 +++ lisp/isearch.el 2013-06-02 09:45:01 +0000 @@ -153,6 +153,20 @@ (defcustom isearch-hide-immediately t :type 'boolean :group 'isearch) +(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)." + :type '(set (const :tag "Case folding" isearch-case-fold-search) + (const :tag "Invisible text" isearch-invisible) + (const :tag "Filters" isearch-filter-predicates) + (const :tag "Lax whitespace" isearch-lax-whitespace) + (const :tag "Regexp lax whitespace" isearch-regexp-lax-whitespace)) + :version "24.4" + :group 'isearch) + (defcustom isearch-resume-in-command-history nil "If non-nil, `isearch-resume' commands are added to the command history. This allows you to resume earlier Isearch sessions through the @@ -866,8 +895,6 @@ (defun isearch-mode (forward &optional r isearch-word word isearch-op-fun op-fun isearch-last-case-fold-search isearch-case-fold-search - isearch-case-fold-search case-fold-search - isearch-invisible search-invisible isearch-string "" isearch-message "" isearch-cmds nil @@ -898,6 +927,11 @@ (defun isearch-mode (forward &optional r isearch-original-minibuffer-message-timeout minibuffer-message-timeout minibuffer-message-timeout nil) + (unless (memq 'isearch-case-fold-search isearch-keep-mode-variables) + (setq isearch-case-fold-search case-fold-search)) + (unless (memq 'isearch-invisible isearch-keep-mode-variables) + (setq isearch-invisible search-invisible)) + ;; We must bypass input method while reading key. When a user type ;; printable character, appropriate input method is turned on in ;; minibuffer to read multibyte characters.