emacs-devel
[Top][All Lists]
Advanced

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

On language-dependent defaults for character-folding


From: Artur Malabarba
Subject: On language-dependent defaults for character-folding
Date: Tue, 9 Feb 2016 17:26:32 +0000

Hi everyone,

Firstly, let me say that character folding will be more easily
configurable soon. The current message is not about that, it's about
the default behaviour. It's important that the default be helpful,
without appearing to be "buggy" to unsuspecting users.

== Context ==
A lot of people have raised concerns with the default behaviour of
character folding. The argument usually goes like this:
“as a Spanish user, n and ñ are different letters, and if searching
for n will find instances of ñ, then that is a false positive. This
folding should be disabled for Spanish users.” (and so on).

One of the solutions suggested is that the set of foldings used by
default should depend on some buffer-local notion of current language.

== My Point ==
I agree that the default behaviour should be a little smarter (i.e., I
agree with the argument), but I disagree that the **buffer's**
language has anything to do with that.

Char folding is primarily about being able to easily search for
characters that you can't easily type. It also has secondary uses,
like searching when you're not even sure which character you want to
search for, but I'm focusing on the first.

The set of characters that I can easily type is defined by 3 things:
1. My keyboard layout.
2. The input method in the current Emacs buffer.
3. Any special commands/keybinds that I have specifically set up.

Note how the language of the text in the buffer does not show up
there. It does not matter whether the current buffer is in English,
Portuguese, or Spanish, I simply cannot type ñ without at least 4
keystrokes.
As long as my keyboard layout is not Spanish, I want to be able to
find ñ when searching for n. The language of the text is irrelevant.
(I'm using Spanish as the example here, obviously this holds for most
languages).

That's why the default set of char foldings should depend on item 1
above. (It might eventually be nice to take item 2 into account too,
and it's simply impossible to account for item 3).

Note that it also doesn't matter whether or not I'm proficient in
Spanish. I still can't type ñ in less than 4 keystrokes.

== Bottomline ==
I don't know if it's possible to figure out the language of the user's
keyboard layout. But the point is that we should care about the
language that the user can _type_ in, NOT the language that they
happen to be _reading_ now nor the language that they happen to
_know_.


Cheers everyone,
Artur



reply via email to

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