From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sascha Wilde Newsgroups: gmane.emacs.devel Subject: Re: Better language detection for tutorial Date: Mon, 23 Jul 2007 22:29:16 +0200 Message-ID: References: <85ejj5xv4x.fsf@lola.goethe.zz> <86ejj4g3d4.fsf@lola.quinscape.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1185222745 14131 80.91.229.12 (23 Jul 2007 20:32:25 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Jul 2007 20:32:25 +0000 (UTC) Cc: thomas@intevation.de, schwab@suse.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 23 22:32:22 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ID4Zi-0004lF-05 for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2007 22:32:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ID4Zg-00059w-48 for ged-emacs-devel@m.gmane.org; Mon, 23 Jul 2007 16:32:12 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ID4Zc-00059c-BH for emacs-devel@gnu.org; Mon, 23 Jul 2007 16:32:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ID4ZV-00058Q-Nk for emacs-devel@gnu.org; Mon, 23 Jul 2007 16:32:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ID4ZV-00058M-IA for emacs-devel@gnu.org; Mon, 23 Jul 2007 16:32:01 -0400 Original-Received: from ns.km1136.keymachine.de ([62.141.58.119] helo=km1136.keymachine.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ID4Yt-000321-Cs; Mon, 23 Jul 2007 16:31:40 -0400 Original-Received: from kenny.sha-bang.de (xdslm152.osnanet.de [212.95.112.152]) (authenticated bits=0) by km1136.keymachine.de (8.12.11.20060308/8.12.10) with ESMTP id l6NKSivl017563; Mon, 23 Jul 2007 22:28:44 +0200 Original-Received: from wilde by kenny.sha-bang.de with local (Kenny MUA v.0409034.42) ID 1ID4Wq-0001fG-NT; Mon, 23 Jul 2007 22:29:16 +0200 In-Reply-To: (Eli Zaretskii's message of "Mon\, 23 Jul 2007 22\:29\:12 +0300") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75401 Archived-At: Eli Zaretskii wrote: >> From: Sascha Wilde >> Eli Zaretskii wrote: >> >> From: Sascha Wilde >> >> >> >> ! (or (tutorial-get-language) >> >> ! (if (get-language-info current-language-environment 'tutorial) >> >> ! current-language-environment >> >> ! "English")))) >> > >> > I think this is in wrong order: the `tutorial' property of the >> > language environment should have higher priority than what the new >> > function `tutorial-get-language' returns. >> >> I highly doubt that, for all my tests (more complex locale setups, >> that is) the tutorial property of the language environment yields >> an unexpected (IMO wrong) language. > > Please tell the details, then. It's hard to argue with unspecified > results of unnamed tests. Please read my initial mail for a complete, real world example. [...] > In general, the tutorial property of the language environment should > be more accurate, since it is specific to Emacs, and specific to the > situation (i.e., reading the tutorial). By contrast, the locale > environment variables are general and not limited to Emacs, so they > might be wrong for Emacs where general needs conflict with Emacs > tutorial needs. The opposite is true: the LC_* environment variables provide a universal way to define what i18n variant (language, data formatting etc.) the user wants for specific aspects of applications. A well behaved application should respect these settings. But currently Emacs potentially displays the tutorial in an language unrelated to LC_MESSAGES, which is not what a user familiar with locale settings would expect. >> I haven't checked where and how it is set, but it seems to >> ignore/misinterpret the LC environment, too. > > If by ``it'' you mean the tutorial property, I do... > then it does not depend on any environment variables, which is an bug IMO, unless the user has chosen to set the tutorial language explicit in Emacs. > it is set explicitly in the language data base used by Emacs. [...] So the tutorial language is set based on the current-language-environment, which is in turn determined (if not set explicitly) in a way, disregarding the users choice for ui messages language. This is no good. Making the tutorial property higher priority than my `tutorial-get-language' would make my patch nearly useless... cheers sascha -- Sascha Wilde A conclusion is simply the place where someone got tired of thinking.