all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Juri Linkov <juri@linkov.net>, Ken T Takusagawa <kenta@mit.edu>
Cc: 20351@debbugs.gnu.org
Subject: bug#20351: isearch-lax-whitespace should be customizable variable
Date: Mon, 29 Jun 2015 16:14:24 -0700 (PDT)	[thread overview]
Message-ID: <7acaf181-869b-4f07-a6c0-ac64d95a184d@default> (raw)
In-Reply-To: <87d20eyw78.fsf@mail.linkov.net>

> I believe both ‘isearch-lax-whitespace’ and ‘character-fold-search’
> should be customizable.  bug#11378 proposed a patch that adds a new
> user variable to customize all such search parameters:
> 
> (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).





  parent reply	other threads:[~2015-06-29 23:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 22:49 bug#20351: isearch-lax-whitespace should be customizable variable Ken T Takusagawa
2015-06-29 22:30 ` Juri Linkov
2015-06-29 23:10   ` Artur Malabarba
2015-06-30 20:52     ` Juri Linkov
2015-06-30 21:05       ` Artur Malabarba
2015-07-01 22:30         ` Juri Linkov
2015-07-02 10:15           ` Artur Malabarba
2015-07-04 21:09             ` Juri Linkov
2015-07-04 21:15               ` Artur Malabarba
2015-07-04 22:24               ` Stefan Monnier
2015-07-04 22:42                 ` Artur Malabarba
2015-07-05  8:00                   ` Andreas Schwab
2015-07-05 16:06                     ` Stefan Monnier
2015-07-05 16:27                       ` Eli Zaretskii
2015-07-05 18:12                         ` Stefan Monnier
2015-07-05 17:56                       ` Drew Adams
     [not found]                       ` <<83k2uewovx.fsf@gnu.org>
2015-07-05 17:59                         ` Drew Adams
2015-06-29 23:14   ` Drew Adams [this message]
2022-04-18 11:36 ` Lars Ingebrigtsen

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

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

  git send-email \
    --in-reply-to=7acaf181-869b-4f07-a6c0-ac64d95a184d@default \
    --to=drew.adams@oracle.com \
    --cc=20351@debbugs.gnu.org \
    --cc=juri@linkov.net \
    --cc=kenta@mit.edu \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.