From: Drew Adams <drew.adams@oracle.com>
To: "Stephen J. Turnbull" <stephen@xemacs.org>,
Jean-Christophe Helary <jean.christophe.helary@gmail.com>
Cc: emacs-devel@gnu.org
Subject: RE: char equivalence classes in search - why not symmetric?
Date: Tue, 8 Sep 2015 07:24:09 -0700 (PDT) [thread overview]
Message-ID: <8cf269bc-69d8-4752-8506-de8d992512e1@default> (raw)
In-Reply-To: <87oahd11i9.fsf@uwakimon.sk.tsukuba.ac.jp>
> The discussion here is entirely about the DWIM
> UI of isearch that allows requesting strict matching by having at
> least one uppercase or accented character, even though lax mode is
> enabled.
The proposal is explicitly *not* for the former, now. The weird
exception of an uppercase letter making the current search be
case-sensitive, even though you have toggled case sensitivity
OFF, is not under attack now.
Personally, yes, I would get rid of that anomaly too at some
point, but I'm not proposing that now. Likewise, for the
anomaly that whitespace folding is switched off by SPC SPC.
That too, I would like to see removed eventually, but I'm not
proposing that now either.
The point now is to DTRT wrt char folding - the new feature.
> Drew prefers a UI that enables/disables strict mode using a
> special isearch command bound to a key.
We already have that. What I'm proposing in this thread is
that when char folding is on, it work symmetrically: Folding
should let you use `é' in the search string to match any of
the accented or unaccented variants, just as it does for `e'
in the search string.
Nothing more. What's good for `e' should be good for `é' and
all the rest. It's about equivalence classes. There is no
reason to limit search strings to one privileged member of
an equivalence class when trying to match any members of the
class. That's all.
> That would be plausible, if the DWIM
> UI for case fold search in isearch weren't 3 decades old.
See above. I am *not* now proposing a change to case-fold
behavior. I've made that clear from the beginning, and
repeated it several times now.
But it seems that it is easier, for those not favorable to
what I (and Juri, apparently) propose, to harp on the age-old
anomaly of uppercase case-fold annulment as, somehow (?), an
argument against clean, symmetric char folding.
Please argue about the topic at hand (see Subject line),
not whether the 1980s decision to make an exception for
an uppercase letter in the search string was or is a
good idea.
> ut the DWIM UI *is* 3 decades old, and successful. Drew
> disputes that,
No, Drew does not. You cannot show one place where anything
Drew has written written suggests that he disputes that.
> but in the 25 years I've followed Emacs development this is
> the first time I've seen anybody complain about the DWIM-ish
> case folding feature.
Live and learn. ;-) That is not the topic of this thread,
in any case.
> Note that incremental case-folded search (usually with no escape for
> strict matching!) has been widely adopted in web and file browsers.
Uh, no. Case folding, yes. But not case folding that
switches off (becoming case-sensitive) just because you
include an uppercase letter in the search string. Not in any
browser I have, at least. Nor in Notepad or TextPad or other
simple editors that newbies or non-programmers might be used to.
But again, *not* the subject of this topic.
> I'm +1 on generalizing this UI to "diacritic folding" in isearch.
By "this UI", I guess you mean that if there is a char with
a diacritic in the search string then that should turn off
char folding, preventing you from matching text ignoring
diacritics.
That would be unfortunate - a strict loss (inability to
match `é' against `e'; only ability to match `e' against `é'),
and with no gain.
> The other question is that of Ulrich Müller, who points out that it's
> natural for him to type his name correctly, but he'd like to laxly
> match Mueller and Muller, too.[1]
Same as my resumé example, yes.
And the use case includes various quotation marks (e.g. curly)
in the search string and wanting to match various others in
the text. E.g., you copy some text from a web page, which
includes some curly quote marks, and you want to match text
in your buffer but ignoring the difference in quote-mark type.
Likewise, for any of the other equivalence classes. No reason
to privilege any particular member of a class, making it so
that only that member can be used in a search string to match
the other members. We've seen no argument supporting such
asymmetry.
(I can imagine an argument in terms of implementation, but
we have not heard that yet. And *no* argument has been
given in user terms - UI. Why should users be limited wrt
which class member they can use to match a class?)
> It's a valid use case, obviously,
> but based on an analogy to experience with DWIMish case-folding in
> Emacs, I believe most users will quickly adjust to typing "muller"
> when they want a poor man's version of full "orthographic
> equivalence". Individuals may not, but I believe the great majority
> will, since I'm sure it's anatomically easier to type "muller" than
> "Müller", even on a German keyboard.
It's not only about typing. That seems to be the main point
that those who repeat this mantra forget. Text can be pasted
into an Isearch string, including text copied from outside
Emacs. Text using any Unicode chars, from any languages.
> Footnotes:
> [1] Drew also argues this point, but from an abstract insistence on
> "symmetry", which doesn't really exist here for representational,
> anatomical, psychological reasons, and let's not forget personal
> historical reasons like "Müller is my name".
Nonsense. I gave concrete examples. It's not an academic
argument. It's about really having character folding, not
just a one-way character folding that requires you to type
(or edit a pasted string) _only_ the "canonical" chars that
are folded. It's a practical argument, not an abstract
insistence on symmetry.
Being _able_ to fold `é' to `e' or `è', and to fold one kind
of quote mark to others, is, yes, a normal use case. Nothing
odd, abstract, or academic about it. Herr Müller confirms
this with his own example. This should be a no-brainer, IMO.
next prev parent reply other threads:[~2015-09-08 14:24 UTC|newest]
Thread overview: 86+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 15:46 char equivalence classes in search - why not symmetric? Drew Adams
2015-09-01 15:52 ` Davis Herring
2015-09-01 16:51 ` Stefan Monnier
2015-09-01 17:51 ` Drew Adams
2015-09-01 18:40 ` Davis Herring
2015-09-01 19:09 ` Drew Adams
2015-09-01 22:45 ` Juri Linkov
2015-09-02 0:33 ` Drew Adams
2015-09-01 20:10 ` Stephen J. Turnbull
2015-09-01 16:16 ` Eli Zaretskii
[not found] ` <<38061f42-eaf1-47c6-b74d-f676ac952b18@default>
[not found] ` <<83r3miatvl.fsf@gnu.org>
[not found] ` <<21998.29683.916211.867479@a1i15.kph.uni-mainz.de>
[not found] ` <<9A972800-D8F0-4DA8-877E-07D5BDC2E1F9@gmail.com>
2015-09-01 17:50 ` Drew Adams
2015-09-01 18:15 ` Eli Zaretskii
2015-09-01 18:46 ` Drew Adams
2015-09-01 19:19 ` Eli Zaretskii
2015-09-01 20:15 ` Drew Adams
2015-09-08 5:36 ` Ulrich Mueller
2015-09-08 6:04 ` Jean-Christophe Helary
2015-09-08 13:31 ` Stephen J. Turnbull
2015-09-08 14:24 ` Drew Adams [this message]
2015-09-08 15:21 ` Stephen J. Turnbull
2015-09-08 16:58 ` Drew Adams
2015-09-08 17:38 ` Stephen J. Turnbull
2015-09-09 22:52 ` Drew Adams
2015-09-10 3:12 ` Drew Adams
2015-09-10 21:46 ` Drew Adams
2015-09-08 20:15 ` Richard Stallman
2015-09-08 20:15 ` Richard Stallman
2015-09-08 21:25 ` Drew Adams
2015-09-09 15:07 ` Richard Stallman
2015-09-09 15:21 ` Drew Adams
2015-09-10 2:03 ` Richard Stallman
2015-09-10 3:23 ` Drew Adams
2015-09-11 10:28 ` Richard Stallman
2015-09-11 13:28 ` Stefan Monnier
2015-09-11 16:33 ` Drew Adams
2015-09-11 20:59 ` Juri Linkov
2015-09-11 23:11 ` Drew Adams
2015-09-12 15:28 ` Richard Stallman
2015-09-11 16:31 ` Drew Adams
2015-09-11 10:28 ` Richard Stallman
2015-09-11 16:31 ` Drew Adams
2015-09-12 15:29 ` Richard Stallman
[not found] ` <<8cf269bc-69d8-4752-8506-de8d992512e1@default>
[not found] ` <<E1ZZPIS-0005rf-DJ@fencepost.gnu.org>
2015-09-08 21:46 ` Drew Adams
[not found] ` <<E1ZZPIT-0005s6-ST@fencepost.gnu.org>
[not found] ` <<da54a6cb-90eb-481d-aa20-acfad612e709@default>
[not found] ` <<E1ZZgxz-0006X2-Bg@fencepost.gnu.org>
[not found] ` <<cb107072-7f90-41fb-9aff-075d50eb65bb@default>
[not found] ` <<E1ZZrCm-0001x4-9a@fencepost.gnu.org>
[not found] ` <<4f3b1db3-d3d2-480f-8662-fbf7c74aa67f@default>
[not found] ` <<E1ZaLZR-0002Bf-8q@fencepost.gnu.org>
[not found] ` <<e77f8e7b-581f-436d-816a-c8daed734ff5@default>
[not found] ` <<E1ZamkM-0005d4-RN@fencepost.gnu.org>
2015-09-12 15:59 ` Drew Adams
2015-09-08 13:39 ` Drew Adams
2015-09-08 21:19 ` Juri Linkov
2015-09-09 15:07 ` Richard Stallman
2015-09-08 15:47 ` Eli Zaretskii
2015-09-08 16:57 ` Drew Adams
2015-09-08 21:20 ` Juri Linkov
2015-09-09 2:42 ` Eli Zaretskii
2015-09-09 11:23 ` Artur Malabarba
2015-09-09 13:32 ` Drew Adams
2015-09-09 15:12 ` Richard Stallman
2015-09-11 20:50 ` Juri Linkov
[not found] ` <<CAAdUY-JMQVsRFku8nwX8JcA9k6Y9sHWoVL6ZC60RHnjoj0cd+Q@mail.gmail.com>
[not found] ` <<E1ZZh2a-0003u6-Fj@fencepost.gnu.org>
2015-09-09 15:22 ` Drew Adams
2015-09-10 2:03 ` Richard Stallman
2015-09-10 3:15 ` Drew Adams
2015-09-10 6:57 ` David Kastrup
2015-09-10 15:02 ` Drew Adams
2015-09-10 15:50 ` Richard Stallman
2015-09-08 20:09 ` Richard Stallman
2015-09-08 21:00 ` Drew Adams
2015-09-09 15:06 ` Richard Stallman
2015-09-08 21:47 ` Ulrich Mueller
2015-09-02 15:34 ` Richard Stallman
2015-09-02 15:56 ` Drew Adams
2015-09-02 16:05 ` Eli Zaretskii
2015-09-02 21:51 ` Jean-Christophe Helary
2015-09-02 22:15 ` Drew Adams
2015-09-03 15:37 ` Richard Stallman
2015-09-03 2:41 ` Eli Zaretskii
2015-09-03 3:08 ` Jean-Christophe Helary
2015-09-03 7:28 ` Artur Malabarba
2015-09-03 17:15 ` Drew Adams
2015-09-07 13:52 ` Nix
2015-09-07 17:07 ` Drew Adams
2015-09-07 23:23 ` Nix
2015-09-08 2:17 ` Richard Stallman
2015-09-03 14:33 ` Eli Zaretskii
2015-09-03 15:00 ` Stefan Monnier
2015-09-03 16:15 ` Drew Adams
2015-09-03 16:23 ` Eli Zaretskii
2015-09-03 16:46 ` Drew Adams
2015-09-02 16:10 ` Artur Malabarba
2015-09-03 19:49 ` Pip Cet
[not found] <<2a7b9134-af2a-462d-af6c-d02bad60bbe8@default>
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=8cf269bc-69d8-4752-8506-de8d992512e1@default \
--to=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=jean.christophe.helary@gmail.com \
--cc=stephen@xemacs.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 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.