unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Sascha Wilde <wilde@sha-bang.de>
Cc: thomas@intevation.de, schwab@suse.de, emacs-devel@gnu.org
Subject: Re: Better language detection for tutorial
Date: Tue, 24 Jul 2007 02:18:13 -0400	[thread overview]
Message-ID: <E1IDDin-0007kU-EC@fencepost.gnu.org> (raw)
In-Reply-To: <m2tzrusw2r.fsf@kenny.sha-bang.de> (message from Sascha Wilde on Mon, 23 Jul 2007 22:29:16 +0200)

> Cc: thomas@intevation.de, schwab@suse.de, emacs-devel@gnu.org
> From: Sascha Wilde <wilde@sha-bang.de>
> Date: Mon, 23 Jul 2007 22:29:16 +0200
> 
> >> > 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 <m2k5sy2f3o.fsf@kenny.sha-bang.de> for a
> complete, real world example.

That's the message that started this discussion, right?  If so, it
just shows, AFAICT, that the way language environment is determined
might need fine-tuning.

Anyway, what you said (see above) seemed to indicate (``for all my
tests'', with ``tests'' in plural) that you have more than just a
single example, thus my request.  Apologies if I misunderstood you.

> > 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.

I'm obviously failing to explain myself: my point was _exactly_ that
universal settings might be applicable to Emacs needs not as well as
Emacs-specific defaults.  For example:

> 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.

It is not clear (at least to me, but it sounds like I'm not the only
one) that LC_MESSAGES is relevant to selecting the tutorial.  On a
GNU/Linux system, the locale(1) man page says:

	LC_MESSAGES
              Formats  of  informative and diagnostic messages and
              interactive responses.

and locale(7) says:

	LC_MESSAGES
              changes the language messages are displayed in and how
              an affirmative  or  negative  answer looks like. 

In other words, LC_MESSAGES talks about messages of the type Emacs
shows in the echo area.  It is not at all clear that the same setting
is good for the tutorial.

> 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.

Then perhaps we should modify the way the language environment is
determined, and leave the tutorial alone.

In any case, please keep in mind that the language environment can be
set from ~/.emacs or interactively, not only from environment
variables.  I hope you are not saying that LC_MESSAGES should override
that as well.

> Making the tutorial property higher priority than my
> `tutorial-get-language' would make my patch nearly useless...

It sounds like fixing the way the language environment is determined
is a better way to solve this problem.  My interpretation of your
original report is that in that particular case, Emacs wrongly decided
that the user's language environment is German.  I hope you agree
that, if the language environment is indeed German, the user should be
shown a German tutorial.

  parent reply	other threads:[~2007-07-24  6:18 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18 10:14 set-locale-environement: strange default detection Sascha Wilde
2007-07-18 10:19 ` David Kastrup
2007-07-18 10:40   ` Sascha Wilde
2007-07-18 10:50     ` David Kastrup
2007-07-18 11:04       ` Jan Djärv
2007-07-18 12:28       ` Sascha Wilde
2007-07-18 18:54 ` Reiner Steib
2007-07-18 21:24   ` David Kastrup
2007-07-19  8:21     ` Sascha Wilde
2007-07-19  9:16       ` David Kastrup
2007-07-22 14:59         ` Better language detection for tutorial (was: set-locale-environement: strange default detection) Sascha Wilde
2007-07-22 15:41           ` Andreas Schwab
2007-07-22 15:44             ` Better language detection for tutorial David Kastrup
2007-07-22 23:16               ` Andreas Schwab
2007-07-22 20:20             ` Sascha Wilde
2007-07-23  3:11               ` Eli Zaretskii
2007-07-23  9:25                 ` Sascha Wilde
2007-07-23 19:29                   ` Eli Zaretskii
2007-07-23 20:29                     ` Sascha Wilde
2007-07-23 20:38                       ` David Kastrup
2007-07-24  6:18                       ` Eli Zaretskii [this message]
2007-07-24  7:17                         ` Kenichi Handa
2007-07-24  7:36                           ` Eli Zaretskii
2007-07-24  7:53                             ` Kenichi Handa
2007-07-24 18:45                               ` Eli Zaretskii
2007-07-25  1:01                                 ` Kenichi Handa
2007-07-25  3:14                                   ` Eli Zaretskii
2007-07-25  4:48                                     ` Kenichi Handa
2007-07-25 19:24                                       ` Eli Zaretskii
2007-07-26  2:29                                         ` Kenichi Handa
2007-07-26 11:40                                           ` Eli Zaretskii
2007-07-26 12:19                                             ` Kenichi Handa
2007-07-26 12:25                                               ` Eli Zaretskii
2007-07-26 12:54                                                 ` Kenichi Handa
2007-07-20 17:42     ` set-locale-environement: strange default detection Reiner Steib

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1IDDin-0007kU-EC@fencepost.gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=schwab@suse.de \
    --cc=thomas@intevation.de \
    --cc=wilde@sha-bang.de \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).