all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: raw-byte and char-table
Date: Wed, 25 Aug 2010 13:05:43 +0900	[thread overview]
Message-ID: <tl7hbij49rc.fsf@m17n.org> (raw)
In-Reply-To: <8362z0ndke.fsf@gnu.org> (message from Eli Zaretskii on Tue, 24 Aug 2010 20:08:33 +0300)

In article <8362z0ndke.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > > >   (aref CHAR-TABLE (unibyte-char-to-multibyte #xA0))
> > > >   (aset CHAR-TABLE (unibyte-char-to-multibyte #xA0) VALUE)
> > 
> > > One could also use the codepoint of the corresponding eight-bit
> > > character directly, no?
> > 
> > Like #x3FFFA0?  It's possible but should not be recommended.

> Why not recommended?  We already document in the ELisp manual the
> codepoints to which we map eight-bit bytes.  It's not a secret, it's
> in the open.

Number like #x3FFFA0 is so criptic.  The function name
unibyte-char-to-multibyte is also not ideal, but I think
it's better than #x3FFFA0.

> > As for a display table, we have one more problem.  Currently
> > an element of a display table is nil or a vector of
> > characters.  To directly output the byte #xA0 to a terminal,
> > perhaps the correct way is to set (unibyte-char-to-multibyte
> > #xA0) in a vector.  That way, we can specify any byte(s) to
> > send to a terminal.
> > 
> > But, then, what is the semantics of the vector element
> > (unibyte-char-to-multibyte #xA0) for a graphic device?  What
> > should we display for CHAR if we setup
> > standard-display-table as this?
> > 
> >   (aset standard-display-table 
> >         CHAR (vector (unibyte-char-to-multibyte #xA0)))

> There's something I'm missing here: why text terminals and graphics
> terminals are different in this context?  It seems that you are saying
> that was is correct for a text terminal does not have a clear
> semantics for a GUI terminal,

Yes.

> but why?

What we can send to a terminal is a byte.  So, by having a
method of specifying any raw byte directly, we can send all
possible bytes to a terminal.  For a graphic device, the
natural interpretation corresponding to "directly sending a
raw byte" is, I think, "directly specifying a glyph code".
But, to specify all possible glyph codes, 0x80..0xFF is not
enough.

---
Kenichi Handa
handa@m17n.org



  reply	other threads:[~2010-08-25  4:05 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24  1:11 raw-byte and char-table Kenichi Handa
2010-08-24  3:06 ` Eli Zaretskii
2010-08-24  4:29   ` Kenichi Handa
2010-08-24 17:08     ` Eli Zaretskii
2010-08-25  4:05       ` Kenichi Handa [this message]
2010-08-26  0:01         ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2010-08-26  2:58 MON KEY
2010-08-26  3:34 ` Kenichi Handa
2010-08-26  5:30   ` MON KEY
2010-08-26  6:48     ` Kenichi Handa
2010-08-26  7:09       ` Miles Bader
2010-08-27  3:30         ` MON KEY
2010-08-27  3:45           ` Kenichi Handa

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=tl7hbij49rc.fsf@m17n.org \
    --to=handa@m17n.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@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.