From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Questions about isearch Date: Thu, 26 Nov 2015 18:22:48 +0200 Message-ID: <83h9k8vig7.fsf@gnu.org> References: <83lh9lx6oi.fsf@gnu.org> <87egfdant7.fsf@gmx.us> Reply-To: Eli Zaretskii 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 1448555013 18027 80.91.229.3 (26 Nov 2015 16:23:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Nov 2015 16:23:33 +0000 (UTC) Cc: sb@dod.no, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 26 17:23:22 2015 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 1a1zKL-0007Dt-OA for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 17:23:21 +0100 Original-Received: from localhost ([::1]:52065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1zKN-0007SG-Tw for ged-emacs-devel@m.gmane.org; Thu, 26 Nov 2015 11:23:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46333) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1zKA-0007SB-2v for emacs-devel@gnu.org; Thu, 26 Nov 2015 11:23:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1zK6-0001In-4m for emacs-devel@gnu.org; Thu, 26 Nov 2015 11:23:10 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:40563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1zK5-0001Ih-Sj; Thu, 26 Nov 2015 11:23:06 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NYF00800JX3M000@a-mtaout20.012.net.il>; Thu, 26 Nov 2015 18:23:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NYF008VXK6F8X90@a-mtaout20.012.net.il>; Thu, 26 Nov 2015 18:23:04 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 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:195295 Archived-At: > From: Richard Stallman > Date: Thu, 26 Nov 2015 09:46:09 -0500 > Cc: emacs-devel@gnu.org >=20 > It seems that perhaps we need these correspondences to depend > on the language in use. >=20 > That's true for case conversion as well. For instance the way > to upcase 'i' is 'I' in most languages, but in Turkish it's a > character I can't find a way to enter in Emacs. (That character is, =C4=B0, U+0130 LATIN CAPITAL LETTER I WITH DOT AB= OVE.) IMO, it is more important to have language-independent matching in Emacs. Language-specific rules are also needed in some situations, but they are secondary for Emacs. > It seems to me that we want to introduce a concept of current langu= age It's a problematic concept for Emacs, which is a multi-lingual environment. For example, what is the "current language" of the buffer showing this message? It cannot be US English, since it includes characters not in that language, and can easily include Turkish words. Or consider the etc/HELLO file. We could probably have a text property which will specify the language, but we don't have good means to set such a property. IOW, where that information would come from? > which would control these things, and also the language for spell c= hecking, > and maybe some other things. Actually, modern spell-checkers can support multiple languages in the same spell-checking job (in a nutshell, they check dictionaries for each language they were told to use). In any case, a spell-checker has a simpler job in this respect: it checks one word at a time, so all it needs is the language for that one word. Conceptually, this is much simpler than what Emacs needs. > In some cases, the current language is determined by which characte= rs > appear. That would work fine for scripts that are used for just on= e > language. It would be hard to do that for Latin scripts, though. > For latin scripts one might always have to specify it explicitly, > but it could be specified by a file local variable or other such > per-file customization mechanism. We already know which script each character belongs to: (aref char-script-table ?a) =3D> latin But, as you say, this only rarely helps to deduce the language. > The language environment, which already exists, is something > different. It controls how to recognize character codings, and > therefore has to be global. The current language should be per-buf= fer > and perhaps should vary between parts of a buffer. So they can't > be the same thing. Indeed. But defining the current language of a buffer isn't sufficient, either, for Emacs. For that reason, we generally provide language-agnostic sorting, searching, etc.