unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
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: Wed, 29 May 2013 20:16:52 -0700 (PDT)	[thread overview]
Message-ID: <6dcc689e-53a8-4982-953c-1b21c11cec78@default> (raw)
In-Reply-To: <871u8pmmla.fsf@mail.jurta.org>

> > A major difference is that my code does not hesitate to use the
> > command to toggle the user option value.  I realize you consider
> > that a no-no.  I think that commands to toggle user options are
> > often a plus, not a minus.  (Think minor-mode variables, if that helps.
> > Or think of toggling an option via the options menu.)
> 
> Most togglable search variables should preferably have two versions
> anyway: the default value (persistent in case of `defcustom') used
> initially for every new search (and often consulted in toggling
> commands to get the initial default value) and a transient value
> used in the currently active search.
> 
> This is what `case-fold-search' and `isearch-case-fold-search'
> already do and this is a flexible approach.  I intend to
> implement the same approach for other search variables as well,
> e.g. adding `search-filter-predicates' to hold the default value
> for `isearch-filter-predicates'.  The prefix `search-' is more
> appropriate for such variables when they are used outside of isearch.
> So `isearch-filter-predicates' could be used to incrementally
> add/remove filters in isearch-mode, but to use `search-filter-predicates'
> in `query-replace', etc.

I understand that approach.  I disagree, that's all.

I believe it is good to be able to toggle the option value (what you call
the default value) on the fly (during a search) in this case, and thus
change the behavior for subsequent searches as well (until toggled again).
That is a more useful UI, IMO, in this case and in many others.

I am not sure what I think about case-fold-search.  Generally I think the
usual approach makes more sense for it.  But there is an argument to be
made for it too to "stay put" across searches.  Partly, such "sticky"
behavior requires clear feedback to the user so s?he is aware of the current
"mode" of behavior.

It is simple enough to toggle back again.  Even for a one-off search using
a different "mode" from usual, it just means two toggles instead of one.
And if you perform multiple searches in different modes (a mix: some
case-sensitive, some not),  then the sticky/modal behavior typically means
less toggling.

I still use the usual approach for case-fold-search, because (a) I am
used to it and (b) I use case-insensitive search rarely.  But in Icicles
I have a similar toggle for completion, and it is sticky/modal.  Again,
good feedback wrt the current behavior is more important for the sticky
behavior: you are not always thrown back into some default behavior.

Ideally perhaps the choice of behavior itself would be up to the user,
and perhaps even itself via a toggle.  No, I don't mean ojust a single
option value reflecting the choice, but the ability to toggle which
behavior to use for any behavior choice (toggle or cycle).

(No, I don't really expect others to agree.)





  reply	other threads:[~2013-05-30  3:16 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 [this message]
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

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=6dcc689e-53a8-4982-953c-1b21c11cec78@default \
    --to=drew.adams@oracle.com \
    --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).