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: Usage of standard-display-table in MSDOS
Date: Sat, 28 Aug 2010 13:18:02 +0900	[thread overview]
Message-ID: <tl7pqx32ww5.fsf@m17n.org> (raw)
In-Reply-To: <837hjcm9cw.fsf@gnu.org> (message from Eli Zaretskii on Fri, 27 Aug 2010 17:13:51 +0300)

In article <837hjcm9cw.fsf@gnu.org>, Eli Zaretskii <eliz@gnu.org> writes:

> > >     "Display characters in the range L to H literally."
> > 
> > > The "literally" part is no longer true, is it?
> > 
> > What's the meaning of "literally" when a display table
> > element is [#xA0]?

> It means that a literal byte 0xA0 is sent to the terminal.

From which document, can we get that interpretation?  The
docstring of buffer-display-table says:

Each element should be a vector of
characters or nil.  The value nil means display the character in the
default fashion; otherwise, the characters from the vector are delivered
to the screen instead of the original character.

It only says about "character".  Although it doesn't say how
to deliver a character to a terminal, the natural way is to
encode that character by the terminal coding system, or
display that character by the corresponding glyph of a font.

> > Before Emacs 23, the character #xA0 represents the byte
> > 0xA0.  But now it is a character representing a Unicode
> > character U+00A0, and #x3FFFA0 is the character representing
> > the byte 0xA0.
> > 
> > And, to "display characters literally", we have been encoded
> > characters by the terminal coding system.  Before Emacs 23,
> > the encoded result of #xA0 is always the byte 0xA0, but now
> > it depends on the terminal coding system.

> Which means, AFAIU, that "literally" is no longer possible.  At least
> in the case of a multibyte buffer.

> What about a unibyte buffer, though?  How do we display the characters
> there?

This is the way to display the character #xA0 (in
multibyte-buffer) and the chararacter representing the byte
#xA0 (in both multibyte-buffer and unibyte-buffer) by
sending the byte #xA0 to the terminal .

;; For NBSP (U+00A0)
(aset standard-display-table #xA0
      (vector (unibyte-char-to-multibyte #xA0)))
;; For byte #xA0.
(aset standard-display-table (unibyte-char-to-multibyte #xA0)
      (vector (unibyte-char-to-multibyte #xA0)))
(set-terminal-coding-sytem 'no-conversion)
(set-safe-terminal-coding-system-internal 'no-conversion)

The last two lines are currently necessary because of a bug
in term.c.  I'm going to fix it.

---
Kenichi Handa
handa@m17n.org



  reply	other threads:[~2010-08-28  4:18 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 12:44 Usage of standard-display-table in MSDOS Kenichi Handa
2010-08-24  5:34 ` Stephen J. Turnbull
2010-08-24 11:13   ` Ehud Karni
2010-08-24 16:51     ` Eli Zaretskii
2010-08-25 13:04       ` Ehud Karni
2010-08-25 18:09         ` Eli Zaretskii
2010-08-26 15:26           ` Ehud Karni
2010-08-26 16:43             ` Eli Zaretskii
2010-08-27 13:35               ` Ehud Karni
2010-08-27 16:30                 ` Eli Zaretskii
2010-08-27 10:24 ` Eli Zaretskii
2010-08-27 11:44   ` Kenichi Handa
2010-08-27 14:13     ` Eli Zaretskii
2010-08-28  4:18       ` Kenichi Handa [this message]
2010-08-28  7:22         ` Eli Zaretskii
2010-08-30  2:24           ` Kenichi Handa
2010-08-30  3:02             ` Eli Zaretskii
2010-09-01  3:21             ` Kenichi Handa
2010-09-01  9:20               ` Ehud Karni
2010-09-01 23:33               ` Ehud Karni
2010-09-02  5:19                 ` Eli Zaretskii
2010-09-02  5:20                 ` Kenichi Handa
2010-09-04 22:54                   ` Ehud Karni
2010-09-06  1:30                     ` Kenichi Handa
2010-09-02 12:32                 ` Kenichi Handa
2010-09-04 23:32                   ` Ehud Karni
2010-09-05  5:30                     ` Eli Zaretskii
2010-09-06  5:14                     ` Kenichi Handa
2010-08-29 10:16         ` Ehud Karni
2010-08-29 11:21           ` Eli Zaretskii
2010-08-29 11:49             ` Ehud Karni
2010-08-29 13:06               ` Ehud Karni
2010-08-29 13:50                 ` Eli Zaretskii
2010-08-29 14:04               ` Eli Zaretskii
2010-09-07 21:11                 ` Ehud Karni
2010-09-09 11:57                   ` 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=tl7pqx32ww5.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.