unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Juri Linkov <juri@jurta.org>
Cc: 11378@debbugs.gnu.org
Subject: bug#11378: 24.1.50; Suggestion: Let M-i in isearch cycle `search-invisible'
Date: Fri, 01 Nov 2019 19:50:43 +0100	[thread overview]
Message-ID: <874kznig70.fsf@skangas.se> (raw)
In-Reply-To: <87txlglu8v.fsf@mail.jurta.org> (Juri Linkov's message of "Sun, 02 Jun 2013 12:47:12 +0300")

Juri Linkov <juri@jurta.org> writes:

>> 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.

The below patch from 6 years ago was sent but never applied at the
time.  Is it still relevant?

Best regards,
Stefan Kangas


> === 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.





      reply	other threads:[~2019-11-01 18:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-29  6:10 bug#11378: 24.1.50; Suggestion: Let M-i in isearch cycle `search-invisible' Michael Heerdegen
2012-04-29 14:46 ` Stefan Monnier
2012-04-29 15:32   ` Drew Adams
2012-04-29 21:04   ` Lennart Borgman
2012-04-30  0:28   ` Juri Linkov
2012-05-01  9:15     ` Juri Linkov
2012-05-01 12:59       ` Stefan Monnier
2012-05-01 15:15         ` Juri Linkov
2012-05-01 13:14       ` Drew Adams
2012-05-29 16:40       ` Juri Linkov
2012-05-29 18:22         ` Stefan Monnier
2012-05-30  0:40           ` Juri Linkov
2012-05-30  4:32             ` Stefan Monnier
2012-05-31  0:55               ` Juri Linkov
2012-05-31 21:25                 ` Stefan Monnier
2018-04-24 19:50                   ` Juri Linkov
2019-11-01 18:54                     ` Stefan Kangas
2019-11-02 11:01                       ` Michael Heerdegen
2012-06-11 23:44             ` Juri Linkov
2013-02-15  9:22               ` Juri Linkov
2013-05-27 22:45               ` Juri Linkov
2013-05-28 21:47                 ` Juri Linkov
2013-05-28 22:45                   ` Drew Adams
2013-05-29 22:45                     ` Juri Linkov
2013-05-30  3:16                       ` Drew Adams
2013-05-30  8:12                         ` Juri Linkov
2013-05-30 13:34                           ` Drew Adams
2013-05-30 23:47                             ` Juri Linkov
2013-06-02  9:47                               ` Juri Linkov
2019-11-01 18:50                                 ` Stefan Kangas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874kznig70.fsf@skangas.se \
    --to=stefan@marxist.se \
    --cc=11378@debbugs.gnu.org \
    --cc=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).