* buff-menu header wrong char
@ 2004-12-02 18:23 Robert J. Chassell
0 siblings, 0 replies; 3+ messages in thread
From: Robert J. Chassell @ 2004-12-02 18:23 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 3433 bytes --]
Today's GNU Emacs CVS snapshot, Thu, 2004 Dec 2 16:54 UTC
GNU Emacs 21.3.50.19 (i686-pc-linux-gnu, GTK+ Version 2.4.13)
started with
emacs/src/emacs -Q --eval '(setq Buffer-menu-use-header-line nil)'
A *Buffer List* looks like this:
CRM Buffer Size Mode File
ôôô ôôôôôô ôôôô ôôôô ôôôô
. *scratch* 0 Lisp Interaction
* *Messages* 150 Fundamental
instead of like this:
CRM Buffer Size Mode File
--- ------ ---- ---- ----
. *scratch* 0 Lisp Interaction
* *Messages* 150 Fundamental
[i.e., the hyphens, ---, are replaced by the sequences of \364\364\364 ]
This comes from revision 1.75 to emacs/lisp/buff-menu.el of 2004/11/22
15:12:09, which includes a change to `list-buffers-noselect' that
tests
(if (char-displayable-p ?â) ?â ?-)))
However, the documentation for `char-displayable-p' says
On a multi-font display, the test is only whether there is an
appropriate font from the selected frame's fontset to display
char's charset in general. Since fonts may be specified on a
per-character basis, this may not be accurate.
When
(let ((underline (if (char-displayable-p ?â) ?â ?-)))
is replaced by
(let ((underline ?-))
the *Buffer List* displays correctly.
Here is the info on character: ô
character: ô (0364, 244, 0xf4)
charset: eight-bit-graphic (8-bit graphic char (0xA0..0xFF))
code point: 244
syntax: which means: whitespace
buffer code: 0xF4
file code: 0xF4 (encoded by coding system raw-text-unix)
display: by this font (glyph code)
-ETL-Fixed-Medium-R-Normal--16-160-72-72-C-80-ISO8859-1 (0xF4)
In GNU Emacs 21.3.50.19 (i686-pc-linux-gnu, GTK+ Version 2.4.13)
of 2004-12-02 on benthic
Distributor `The XFree86 Project, Inc', version 11.0.40300001
configured using `configure '--with-type1' '--with-x-toolkit=gtk' '--with-pop' '--prefix=/usr/local' '--with-sound=yes''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: nil
locale-coding-system: nil
default-enable-multibyte-characters: nil
Major mode: Lisp Interaction
Minor modes in effect:
mouse-wheel-mode: t
unify-8859-on-encoding-mode: t
utf-translate-cjk-mode: t
line-number-mode: t
Recent input:
d / u s r / . l o c M-b C-b C-d C-e a l / s r c / e
m a c s <return> C-n C-n C-n C-n C-n C-b C-b C-b C-b
C-b C-b C-SPC C-e C-b C-b C-b C-b C-b C-b C-b C-b C-b
C-b C-b C-b C-b C-b C-b C-b C-SPC C-e M-w C-x b <return>
C-n C-n <return> <return> C-y C-x o C-p C-u C-x = C-x
h M-w C-x b <return> C-x o C-x o C-n C-n C-n C-n <return>
<return> <return> C-y M-x r e <tab> p o r <tab> <r
eturn>
Recent messages:
Loading dired...done
Mark set [3 times]
Loading descr-text...done
Loading composite...done
Loading help-mode...done
Loading wid-edit...done
Char: ô (0364, 244, 0xf4) point=56 of 203 (27%) column 0
Mark set [3 times]
Making completion list...
Loading emacsbug...done
--
Robert J. Chassell
bob@rattlesnake.com GnuPG Key ID: 004B4AC8
http://www.rattlesnake.com http://www.teak.cc
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: buff-menu header wrong char
@ 2004-12-03 19:57 Stefan Monnier
2004-12-04 0:44 ` Kim F. Storm
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2004-12-03 19:57 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=utf-8, Size: 1889 bytes --]
> A *Buffer List* looks like this:
>
> CRM Buffer Size Mode File
> ôôô ôôôôôô ôôôô ôôôô ôôôô
> . *scratch* 0 Lisp Interaction
> * *Messages* 150 Fundamental
Hmm... my crystal ball tells me you're running in unibyte mode.
I'd *strongly* advise you don't do that.
> (if (char-displayable-p ?â) ?â ?-)))
So it seems the problem is that in unibyte mode, char-displayable-p on the
non-ASCII char above returns non-nil (because you do have the font to
display such a char) even though the char will actually not be properly
displayed after it's inserted in the buffer because the insertion into the
unibyte buffer changes the char (I really think it should signal an error
instead, but that's another fight).
Does anyone object to the patch below?
Stefan
--- mule-util.el 12 oct 2004 12:05:54 -0400 1.56
+++ mule-util.el 03 déc 2004 14:52:41 -0500
@@ -2,7 +2,7 @@
;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
;; Licensed to the Free Software Foundation.
-;; Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
;; Keywords: mule, multilingual
@@ -356,6 +356,9 @@
(cond ((< char 256)
;; Single byte characters are always displayable.
t)
+ ((not enable-multibyte-characters)
+ ;; Maybe there's a font for it, but we can't put it in the buffer.
+ nil)
((display-multi-font-p)
;; On a window system, a character is displayable if we have
;; a font for that character in the default face of the
@@ -377,5 +380,5 @@
;; coding: iso-2022-7bit
;; End:
-;;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b
+;; arch-tag: 5bdb52b6-a3a5-4529-b7a0-37d01b0e570b
;;; mule-util.el ends here
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-12-04 0:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-02 18:23 buff-menu header wrong char Robert J. Chassell
-- strict thread matches above, loose matches on Subject: below --
2004-12-03 19:57 Stefan Monnier
2004-12-04 0:44 ` Kim F. Storm
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.