unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* lax matching is not a great default behavior
@ 2015-11-28  5:04 Drew Adams
  2015-11-28  8:29 ` Andreas Schwab
                   ` (2 more replies)
  0 siblings, 3 replies; 57+ messages in thread
From: Drew Adams @ 2015-11-28  5:04 UTC (permalink / raw)
  To: emacs-devel

This has been discussed somewhat, but I don't think there was
any actual proposal to change the behavior.  So here goes.

Does it still make sense to make search and replacement
use lax matching, i.e., fold stuff, by default?

I don't think it does.  I think that users, especially
new users, would be less confused if Emacs defaulted to
literal searching - no whitespace, case, "character",
or other folding by default.

Folding features and their combinations and customizations
will only increase in the future (at least I hope so -
that's a good thing).  The starting point that is the
least ambiguous, least surprising, and least difficult for
a user to discover and understand is zero folding: literal
search.

I realize that this would change the longstanding practice
of having letter-case folding be default.  I think that
choice made sense back when most programming languages and
OS's did not have a letter-case difference.  But I don't
think it is the best choice for the default behavior now.

Same for whitespace folding, though that is not longstanding.

Even more so for "character" folding, i.e., ignoring
diacriticals and differences among quote marks etc. (and
some other ad hoc equivalences).  Such classes might be
clear to those who are familiar with them, and this folding
feature can certainly be useful.  But I don't think it is
the right choice for the default behavior.

Literal search is dead simple, plain, obvious, boring, clear.

Anyone who wants to go further, and fold whitespace, for
instance, can easily ask Emacs how to do that and find out
that there is a simple toggle key for it.  Starting with
whitespace folding turned on, on the other hand, can be
confusing, particularly for programmers, who often care
about which whitespace chars, and how many, they are
searching for.

Similarly for case fold.  Let's start with WYTIWYSF: what
you type is what you search for.  Anyone who wants to
abstract from letter case can easily ask Emacs how to do
that and find out that a simple toggle key suffices.

(Yes, there is also the "clever" complication of automatic
case-fold-search change when an upper-case char is present.
I don't propose any change in that regard now, but I do
think that its time is also soon up.  Not so useful as a
default behavior, IMO.  And I don't think it was a great
idea to copy the same cleverness for "character" folding.
But this is a different story.)

It's likely I won't have more to say about this.  I think
the pros & cons are pretty straightforward.  It's more a
question of choosing than arguing reasons at this point,
I expect.



^ permalink raw reply	[flat|nested] 57+ messages in thread
[parent not found: <<d77851fd-da55-4020-82e8-abbd13f9b048@default>]
[parent not found: <<c9f3197f-b5f3-42f3-817c-bf560842b4d7@default>]

end of thread, other threads:[~2015-12-06  1:37 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-28  5:04 lax matching is not a great default behavior Drew Adams
2015-11-28  8:29 ` Andreas Schwab
2015-11-28 14:50   ` Drew Adams
2015-12-01  9:23   ` Andreas Röhler
2015-12-01 10:38     ` Andreas Schwab
2015-12-01 10:42       ` Yuri Khan
2015-12-01 15:38         ` Eli Zaretskii
2015-12-01 15:36     ` Eli Zaretskii
2015-11-28  8:44 ` Eli Zaretskii
     [not found]   ` <<m2mvtv1ldi.fsf@newartisans.com>
2015-11-30 16:51   ` John Wiegley
2015-12-01 14:40     ` Richard Stallman
2015-12-01 15:55       ` Eli Zaretskii
2015-12-01 18:49         ` Mark Oteiza
2015-12-01 18:56           ` Eli Zaretskii
2015-12-01 19:32             ` David Kastrup
2015-12-01 19:36               ` Eli Zaretskii
2015-12-01 19:38             ` Mark Oteiza
2015-12-01 19:36           ` Artur Malabarba
2015-12-01 19:51             ` Mark Oteiza
2015-12-01 20:01               ` Eli Zaretskii
2015-12-01 20:04                 ` Eli Zaretskii
2015-12-01 23:31                   ` Artur Malabarba
2015-12-01 23:45                     ` Drew Adams
2015-12-02  3:37                     ` Eli Zaretskii
2015-12-02  8:23                       ` martin rudalics
2015-12-02 13:45                         ` Eli Zaretskii
2015-12-02 13:06                       ` Artur Malabarba
2015-12-02 13:44                         ` Eli Zaretskii
2015-12-02 17:25                           ` Artur Malabarba
     [not found]               ` <<83r3j6j5vj.fsf@gnu.org>
     [not found]                 ` <<83poyqj5qb.fsf@gnu.org>
2015-12-01 21:17                   ` Drew Adams
2015-12-02 17:52         ` Richard Stallman
2015-12-03 22:27         ` Per Starbäck
2015-12-03 23:00           ` Drew Adams
2015-12-04  0:09             ` Artur Malabarba
2015-12-04  8:28           ` Eli Zaretskii
2015-12-04  9:33             ` Per Starbäck
2015-12-04 10:10               ` Eli Zaretskii
2015-12-04 10:57                 ` David Kastrup
2015-12-04 11:19                   ` Eli Zaretskii
2015-12-04 12:04                 ` Per Starbäck
2015-12-04 14:42                   ` Eli Zaretskii
2015-12-04 17:47                     ` John Wiegley
2015-12-05  8:02                       ` Eli Zaretskii
2015-12-04 15:55             ` Drew Adams
2015-12-04 19:05               ` Eli Zaretskii
     [not found]       ` <<83610ikvto.fsf@gnu.org>
     [not found]         ` <<CADkQgvs-WvPX=qZ0B_un9j53RF6S4V5OmDTATSW1ZwTY50o2Rg@mail.gmail.com>
     [not found]           ` <<83bna6ipn7.fsf@gnu.org>
     [not found]             ` <<45e1580a-863c-4bd7-82ec-38c27a0d930e@default>
     [not found]               ` <<831tb2ghkf.fsf@gnu.org>
2015-12-04 21:30                 ` Drew Adams
2015-12-04 22:16                   ` David Kastrup
2015-12-04 22:37                     ` Artur Malabarba
2015-12-04 23:08                       ` David Kastrup
2015-12-04 23:57                     ` Drew Adams
2015-12-05  7:53                   ` Eli Zaretskii
2015-12-01  3:54   ` Discussions that led to changes in the defaults, was: " Dmitry Gutov
2015-11-28  8:49 ` David Kastrup
     [not found] <<d77851fd-da55-4020-82e8-abbd13f9b048@default>
     [not found] ` <<83twnxfi0h.fsf@gnu.org>
2015-12-05  9:27   ` Drew Adams
2015-12-05 11:15     ` Eli Zaretskii
     [not found]   ` <<6741424b-fb48-48d1-a2fe-a5b755373c46@default>
     [not found]     ` <<83fuzhf8op.fsf@gnu.org>
2015-12-05 15:59       ` Drew Adams
2015-12-06  1:37         ` John Wiegley
     [not found] <<c9f3197f-b5f3-42f3-817c-bf560842b4d7@default>

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