From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: On language-dependent defaults for character-folding Date: Tue, 9 Feb 2016 17:26:32 +0000 Message-ID: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1455038819 13717 80.91.229.3 (9 Feb 2016 17:26:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Feb 2016 17:26:59 +0000 (UTC) To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 09 18:26:58 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aTC42-0004gI-80 for ged-emacs-devel@m.gmane.org; Tue, 09 Feb 2016 18:26:58 +0100 Original-Received: from localhost ([::1]:58641 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTC41-0001GY-KK for ged-emacs-devel@m.gmane.org; Tue, 09 Feb 2016 12:26:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTC3x-0001G1-EP for emacs-devel@gnu.org; Tue, 09 Feb 2016 12:26:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aTC3w-0003QL-H1 for emacs-devel@gnu.org; Tue, 09 Feb 2016 12:26:53 -0500 Original-Received: from mail-yw0-x230.google.com ([2607:f8b0:4002:c05::230]:33010) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aTC3w-0003Pv-CQ for emacs-devel@gnu.org; Tue, 09 Feb 2016 12:26:52 -0500 Original-Received: by mail-yw0-x230.google.com with SMTP id u200so53299461ywf.0 for ; Tue, 09 Feb 2016 09:26:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=jCDXFkxJ+TPJwnQB3F2Wo90Md5XakeF++mQlGPL6F1g=; b=MmNmO3x5cPQoDXwsjr9H/r7yEgSXxr2SG2o8fCFies+O1KVuI1YQCEAagSa35hhXyd 4d5jGaqjrAKiXhNWcKp8D7FqYr6MjpTZfDc5pohVPsnmJMkV2Ab5DQ++RZ4MFBI26oOl CS8TS4rRWKSQ9O6DGqtDlAn+Aepklewy5MYFyalAQxzI9izB3pI/Pa69cCLOcaPeRe9T w+i9b3mwSrVZzYkqBkLog4qMVFdhFdV5T3k7BlhJ8FyfqqFWGjN64XJm+fl3sbJtx29I 2WtCKTmi5SPYYThyWaGYLFKm6Sb1UW8YmnwhyPWSkBverUmKhbz3Bi3YjwX0SKhPuuzK jG6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:sender:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=jCDXFkxJ+TPJwnQB3F2Wo90Md5XakeF++mQlGPL6F1g=; b=FehuZlXluT6HErwAflqew/xvFy8vhzwB+sGSah7EW9DqwUq/Ps1ZyN2YynuCZANr81 w34LjU8CD6VJc2iVPG4VbnBBZI3rXTgmRlBgjz5x/dBGh2WgenGZN35E9Lk1EROlHUg3 xnkypn5RF/EKHGcRn0fJZWvPgywpHnDx72t0ZCMZra0a7WUdZkGckVgTDfwTnqXBUevA 7+EQMOrHlfRq8dtEtiMijhQBPrki8iVQj2MwrCkTLT3Xt1n+Sl6wJH82InBStAFNdeeR k8tus44EU/SeeABRQVTk+PC5pwrmVB4ZnpmW9mPsujYh/uPAjehmFK607pkypwOiAhrI RbWQ== X-Gm-Message-State: AG10YOSk/rdxBVVfGG4E94PV6K01svSXZNx3EP3pNPmwTAn2wdwiu3koH1eMGJXowOdruON/CaR+YaOPNUPj4A== X-Received: by 10.129.129.70 with SMTP id r67mr17733554ywf.89.1455038811870; Tue, 09 Feb 2016 09:26:51 -0800 (PST) Original-Received: by 10.129.79.83 with HTTP; Tue, 9 Feb 2016 09:26:32 -0800 (PST) X-Google-Sender-Auth: kdatSTRyESUN3JeaIKP4D5TYgyE X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:199617 Archived-At: 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. =3D=3D Context =3D=3D A lot of people have raised concerns with the default behaviour of character folding. The argument usually goes like this: =E2=80=9Cas a Spanish user, n and =C3=B1 are different letters, and if sear= ching for n will find instances of =C3=B1, then that is a false positive. This folding should be disabled for Spanish users.=E2=80=9D (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. =3D=3D My Point =3D=3D 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 =C3=B1 without at least 4 keystrokes. As long as my keyboard layout is not Spanish, I want to be able to find =C3=B1 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 =C3=B1 in less than 4 keystrokes. =3D=3D Bottomline =3D=3D 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