unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [reingold@emr.cs.iit.edu: Re: Character problems]
@ 2002-03-25 12:02 Richard Stallman
  2002-03-25 19:58 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Stallman @ 2002-03-25 12:02 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

Can someone please work on this?

------- Start of forwarded message -------
To: rms@gnu.org
Subject: Re: Character problems 
In-reply-to: Your message of "Sun, 24 Mar 2002 08:53:14 MST."
             <200203241553.g2OFrEg02731@aztec.santafe.edu> 
Date: Sun, 24 Mar 2002 13:02:02 -0600
From: Ed Reingold <reingold@emr.cs.iit.edu>
X-MIME-Autoconverted: from quoted-printable to 8bit by pele.santafe.edu id g2OJ2Ba27315

I entered Emacs version 21.1 with the -q option over a simple telnet.  I then
evaluate (in succession):

     (setq junk '(("Ê" . "\\^{E}") ("Ë" . "\\\"{E}")))
      --> (("Ê" . "\\^{E}") ("Ë" . "\\\"{E}"))

     (assoc "Ë" junk) --> ("Ë" . "\\\"{E}")

     (standard-display-european nil) --> [39]

     (assoc "Ë" junk) --> nil

     (standard-display-european t) --> [39]

     (assoc "Ë" junk) --> nil

     (assoc "Ë" junk) --> nil

Notice that the assoc worked the first time, but then fails.  Why would the 
workings of assoc (which has nothing to do with the display be affected?!!!
------- End of forwarded message -------

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [reingold@emr.cs.iit.edu: Re: Character problems]
  2002-03-25 12:02 [reingold@emr.cs.iit.edu: Re: Character problems] Richard Stallman
@ 2002-03-25 19:58 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2002-03-25 19:58 UTC (permalink / raw)
  Cc: emacs-devel, rms

> From: Richard Stallman <rms@gnu.org>
> Date: Mon, 25 Mar 2002 05:02:06 -0700 (MST)
> 
> Can someone please work on this?

I don't see any problem; see below.

> Why would the workings of assoc (which has nothing to do with the
> display be affected?!!!

You may wish to look at the definition of standard-display-european
(on disp-table.el).  (``Use the source, Luke!'' is still the best
policy, even with Emacs 21 ;-) There you will see that it does all
kinds of non-trivial things: makes your Emacs session a unibyte
session, possibly switches to a different language environment,
changes your terminal encoding, etc.  These changes can easily modify
what the non-ASCII characters you type produce internally in Emacs.
So, the first time you type some character it is interpreted as a
multibyte Latin-1 character, but after you turn
standard-display-european on or off, the same character is interpreted
differently, e.g. as a single-byte unibyte code.  Or vice versa.  Thus
the failure in assoc: the list has some multibyte code, while you are
looking for a unibyte code in [0..255], or the other way around.

To see what is actually in the buffer, go to the offending character
and type "C-u C-x =".  Emacs will show you what it knows about that
character.  Do it for both a character in the list and the one you use
in assoc, and I'm sure you will see they are two different characters.

The moral? don't use standard-display-european.  It's confusing and
unnecessary.  There are better ways to do what it does.

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-03-25 19:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-25 12:02 [reingold@emr.cs.iit.edu: Re: Character problems] Richard Stallman
2002-03-25 19:58 ` Eli Zaretskii

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