all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Is it possible to use new Emacsen with non-ASCII?
Date: Fri, 16 May 2008 11:48:56 +0300	[thread overview]
Message-ID: <ubq36k51j.fsf@gnu.org> (raw)
In-Reply-To: <g0jcs1$2vi3$1@agate.berkeley.edu>

> From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
> Date: Fri, 16 May 2008 07:24:49 +0000 (UTC)
> Bcc: ilya@gnu.org
> Originator: ilya@powdermilk.math.berkeley.edu
> 
> > > When?  After (set-language-environment "Cyrillic-KOI8")?  nil
> > 
> > Then set it to whatever your terminal supports (koi8-r, I presume, but
> > that's a guess).  "M-x set-terminal-coding-system RET koi8-r RET".
> 
> And why set-language-environment did not do it?  

It isn't supposed to.  set-language-environment sets things up for
using a given language inside Emacs, but it does not assume your
terminal and keyboard necessarily support that language.  So it leaves
the job of specifying the terminal's and keyboard's encoding to you.

> > Alternatively, try "(set-locale-environment koi8-r)", and see if that
> > does what you want.  This will also set your keyboard encoding to
> > koi8-r, and I'm not sure you want that.  (Maybe you should consider
> > describing more about what you want: what files do you want to edit,
> > how would you like your keyboard to be set, and what characters can
> > your terminal display.  There are probably a couple of lines you need
> > to add to your .emacs to get what you want, but it's hard to give
> > advice without knowing the conditions.)
> 
> I did describe what I want (but maybe in a different place in the
> thread): Be as smart as cat is.  Allow characters which are input from
> keyboard (TTY), and allow them to be written a file.

Well, that is impossible, as I wrote elsewhere in this thread, not
with Emacs, anyway.

But what you say here is a solution, not the problem.  By ``what you
want'' I meant the description of your system setup as far as
non-ASCII support by its keyboard and display devices is considered.
I asked a few specific questions (see the citation above).  I'm quite
sure that if you describe that, an easy solution can be found in no
time.  I'm talking from experience: I'm using Cyrillic scripts all the
time in an environment that has nothing to do with Cyrillic languages
and doesn't support them natively.

> > > > If your LANG or LC_ALL environment variables are set appropriately,
> > > > Emacs should automatically use the correct terminal-coding-system,
> > > > language-environment etc.
> > > 
> > > Irrelevant.  I can't set LANG.
> 
> > That's quite understandable, but set-locale-environment from within
> > Emacs has the same effect on Emacs, and doesn't affect anything but
> > Emacs.
> 
> I do not follow.  Do you say that set-locale-environment is going to
> be useless anyway if the locale is not supported by the CRTL?

No, I'm saying that set-locale-environment does the same for Emacs as
setting LANG outside Emacs, with the crucial difference that the
former does not affect anything outside Emacs.  I assumed, perhaps
mistakenly, that you cannot set LANG because that would disrupt
operation of other programs on that machine.  If this assumption is
wrong, then please tell why you cannot set LANG; perhaps I
misunderstood the nature of your situation.

> [Suppose for a moment that I do not care which 8-bit chars are word
>  chars, which are whitespace etc.  All I need Emacs is to read bytes
>  from TTY, and write them down to a file.]

This cannot be done, not with Emacs.  Its current design simply
doesn't support such a paradigm, because the design assumes that
editing multilingual text is an important first-class goal of the
user.  It might be possible to tweak Emacs into behaving like what you
want, but I personally wouldn't bother to waste my time looking for
such a tweak, not the least because I don't need it: Emacs works well
for me, on text-mode and GUI terminals alike, with scripts that are
utterly alien to the underlying locale.  I'm quite sure it will work
well for you as well, once the nature of your system setup is
understood and accounted for in your .emacs.





  reply	other threads:[~2008-05-16  8:48 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-15  0:37 Is it possible to use new Emacsen with non-ASCII? Ilya Zakharevich
2008-05-15  9:24 ` Jason Rumney
2008-05-15 18:02   ` Ilya Zakharevich
2008-05-15 19:06     ` Eli Zaretskii
2008-05-15 19:18       ` Eli Zaretskii
2008-05-15 19:33         ` Eli Zaretskii
     [not found]         ` <mailman.11649.1210880089.18990.help-gnu-emacs@gnu.org>
2008-05-16  7:29           ` Ilya Zakharevich
2008-05-16  8:58             ` Eli Zaretskii
     [not found]             ` <mailman.11665.1210928327.18990.help-gnu-emacs@gnu.org>
2008-05-16 11:20               ` Ilya Zakharevich
     [not found]     ` <mailman.11643.1210878436.18990.help-gnu-emacs@gnu.org>
2008-05-16  7:24       ` Ilya Zakharevich
2008-05-16  8:48         ` Eli Zaretskii [this message]
2008-05-15 11:14 ` Peter Dyballa
2008-05-15 13:44 ` Joel J. Adamson
     [not found] ` <mailman.11617.1210850110.18990.help-gnu-emacs@gnu.org>
2008-05-15 18:10   ` Ilya Zakharevich
2008-05-15 19:11     ` Eli Zaretskii
     [not found]     ` <mailman.11644.1210878709.18990.help-gnu-emacs@gnu.org>
2008-05-16  7:28       ` Ilya Zakharevich
2008-05-16  8:55         ` Eli Zaretskii
2008-05-16  9:27           ` Eli Zaretskii
     [not found]           ` <mailman.11667.1210930077.18990.help-gnu-emacs@gnu.org>
2008-05-16 11:16             ` Ilya Zakharevich
2008-05-16 11:56               ` Eli Zaretskii
2008-05-16 12:03                 ` Eli Zaretskii
     [not found]                 ` <mailman.11687.1210939428.18990.help-gnu-emacs@gnu.org>
2008-05-17  0:24                   ` Ilya Zakharevich
2008-05-17  7:26                     ` Eli Zaretskii
2008-05-19 13:40                     ` Chris McMahan
2008-05-19 18:57                       ` Eli Zaretskii
     [not found]                       ` <mailman.11853.1211223527.18990.help-gnu-emacs@gnu.org>
2008-05-20  2:33                         ` Ilya Zakharevich
2008-05-22 20:26                   ` Ilya Zakharevich
2008-05-22 22:09                     ` David Kastrup
2008-05-22 23:07                     ` Jason Rumney
2008-05-23  9:55                       ` Ilya Zakharevich
2008-05-23 10:59                         ` Jason Rumney
2008-05-24  6:58                           ` Ilya Zakharevich
2008-05-24 11:10                             ` Eli Zaretskii
     [not found]               ` <mailman.11686.1210938990.18990.help-gnu-emacs@gnu.org>
2008-05-17  0:21                 ` Ilya Zakharevich
2008-05-17  7:22                   ` Eli Zaretskii
     [not found]                   ` <mailman.11744.1211008926.18990.help-gnu-emacs@gnu.org>
2008-05-22 20:23                     ` Ilya Zakharevich
2008-05-23  8:59                       ` Eli Zaretskii
     [not found]                       ` <mailman.12090.1211533232.18990.help-gnu-emacs@gnu.org>
2008-05-23 10:00                         ` Ilya Zakharevich
     [not found]         ` <mailman.11664.1210928215.18990.help-gnu-emacs@gnu.org>
2008-05-16 11:15           ` Ilya Zakharevich
2008-05-16 11:50             ` Eli Zaretskii
     [not found]             ` <mailman.11681.1210938659.18990.help-gnu-emacs@gnu.org>
2008-05-17  0:17               ` Ilya Zakharevich

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

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

  git send-email \
    --in-reply-to=ubq36k51j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.