emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Emacs Survey: Toolbars


From: Drew Adams
Subject: RE: Emacs Survey: Toolbars
Date: Fri, 18 Dec 2020 09:43:24 -0800 (PST)

> The only disagreement is whether such an option should be
> enabled by default for changes made via the menus, I think.

There's not even any real disagreement there, I think.

My reflex is to not change default behavior willy
nilly, but case-by-case is the right approach to take
when considering such changes.
___

My opinion about this general question is that both
behaviors can be useful.  And each is typically more
useful for some kinds of option changing/setting.

A behavior that I'm likely to toggle often within a
given Emacs session is one whose last state I
typically do not want to save for the next Emacs
session.

A behavior that I'm not likely to change often is one
whose last state I might well want to save for the
next browser session.  (Or I might not.)

For the latter, think of web browser settings.  When
I change such a setting I don't need to explicitly
"save" settings - and that's "natural" behavior.
That's the kind of thing I think you were thinking of
when saying that users are used to such behavior and
expect it.

[You can see that not only do I think this applies
to _some_ users.  I think it can apply to the _same_
user _some_ of the time.]

For the former, think of, say, toggling option
`case-fold-search'.  I might do that many times in
the same Emacs session.  I generally want its saved
value to reflect my preference for the _default_
behavior (which in my case is case-sensitive search).
I don't want it to reflect the last case-fold state
of my last search in my last session.

Note that vanilla Emacs goes out of its way to have
most of its commands that toggle behavior such as case
folding NOT change the option value.  To toggle the
option value you use a specific command for that.
E.g., when you toggle case folding during Isearch that
doesn't change the option value.
___

Personally, I think that for some commands it can
make sense to let users toggle _either_ the option
value or a temporary state.  (Note: toggling an
option value is different from doing that and also
saving the value.  That too can be a user preference
for this or that option.)

For example, in Isearch+ there's even an option,
`isearchp-toggle-option-flag', that controls this:

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

If that option is nil then toggling case folding is
temporary, i.e., for the current Isearch invocation
only.  If non-nil then the change persists for future
invocations in the same session.

Similarly, `isearchp-auto-keep-filter-predicate-flag':

 Non-nil means automatically apply `C-z s'.
 Changes to `isearch-filter-predicate' are automatically kept for
 subsequent searches in this Emacs session when you exit Isearch'.
 You can toggle this option using `C-z S during Isearch.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]