GNU bug report logs -
#30429
27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working
Previous Next
Reported by: Live System User <nyc4bos <at> aol.com>
Date: Mon, 12 Feb 2018 02:11:02 UTC
Severity: minor
Found in version 27.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30429 in the body.
You can then email your comments to 30429 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30429
; Package
emacs
.
(Mon, 12 Feb 2018 02:11:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Live System User <nyc4bos <at> aol.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 12 Feb 2018 02:11:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
The example in the "efaq" Info file gives the following
TERM=xterm-direct emacs -nw
When I execute this, as stated, I get an Emacs session
WITHOUT any colors -- even "M-x list-colors-display"
does not show any colors.
However, if I change this to the following, I see colors
displayed:
TERM=xterm-direct2 emacs -nw
[Note the "2" in "xterm-drect2"]
Here is the definition for the setab/setaf parameters for
each:
xterm-direct2:
# Emacs 26.1 and later support direct color mode in terminals, using a
# combination of user-defined capabilities and ncurses-dependent function
# calls. We will not include that here.
#
# Here is a first revision, which (disregarding the reuse of colors 1-7 which
# is of interest only to the numerically illiterate), is compatible with other
# terminal descriptions written for curses. It relies upon the extended range
# for numeric capabilities provided in ncurses 6.1:
xterm+direct2|xterm with direct-color indexing,
[...]
xterm-direct2|xterm with direct-color indexing (old),
use=xterm+direct2, use=xterm+titlestack, use=xterm,
[...]
setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
xterm-direct:
# That in turn had a problem: in the original patch submitted for KDE konsole
# in 2006, the submitter and the developer alike overlooked a "color space
# identifier" parameter. This version provides for that parameter:
xterm+direct|xterm with direct-color indexing,
[...]
setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
Between the two ("xterm-direct"and "xerm-direct2"), I see
the diffeence in at least "\:2\:\:" and "\:2\:".
respectively -- "xterm-direct" has an additioal "\:"
So, should Emacs be changed to accommadate the missing
parameter ("\:" as in "xterm-direct")??
Or should the information in "efaq" be changed to specify
"xterm-direct2"?
Or...?
Can anyone else confirm that colors are not displayed
in Emacs TTY when using TERMINFO's 6.1 definition of
"xterm-direct" (setab/setaf)?
Thanks.
In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.20.10)
of 2018-02-11 built on localhost.localdomain
Windowing system distributor 'Fedora Project', version 11.0.11803000
System Description: Fedora 24 (Workstation Edition)
Recent messages:
nnimap read 152k from imap.aim.com
nnimap read 160k from imap.aim.com
nnimap read 168k from imap.aim.com
nnimap read 193k from imap.aim.com [2 times]
Fetching headers for nnimap+aol:INBOX...done
Scoring...done
Sorting threads...done
Generating summary...done
Auto-saving...
mwheel-scroll: Beginning of buffer
Configured using:
'configure --disable-dependency-tracking --prefix=/usr
--with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff
--with-xft --with-xpm --with-x-toolkit=gtk3 --with-gpm=yes
--with-modules --with-xwidgets 'CFLAGS=-DMAIL_USE_LOCKF -O0 -ggdb3
-pipe -Wall -Werror=format-security -fexceptions
-fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -m64 -mtune=generic' LDFLAGS=-Wl,-z,relro'
Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 MODULES THREADS XWIDGETS LCMS2
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Summary
Minor modes in effect:
gnus-desktop-notify-mode: t
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
buffer-read-only: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug sendmail qp gnus-ml disp-table
cursor-sensor nndraft nnmh nndoc mm-archive timezone url-http url-gw
url-cache url-auth url-handlers utf-7 rfc2104 nnfolder cl-extra
help-mode network-stream nsm gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-cache gnus-demon nntp gnus-desktop-notify
easy-mmode notifications dbus xml epa-file nnreddit mm-url url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs url-vars json map gnus-art mm-uu mml2015 mm-view
mml-smime smime dig mailcap cl sieve sieve-mode sieve-manage starttls
sasl sasl-anonymous sasl-login sasl-plain nnir gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc parse-time gnus-spec gnus-int gnus-range message rmc puny
dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec
password-cache epa derived epg epg-config mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader gnus-win gnus seq
byte-opt gv bytecomp byte-compile cconv wid-edit nnoo nnheader gnus-util
rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums mm-util mail-prsvr
mail-utils kmacro ediff-merg ediff-wind ediff-diff ediff-mult ediff-help
ediff-init cl-loaddefs cl-lib ediff-util ediff elec-pair time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting xwidget-internal
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)
Memory information:
((conses 16 313114 48068)
(symbols 48 126137 1)
(miscs 40 96 208)
(strings 32 120208 5249)
(string-bytes 1 3992565)
(vectors 16 29211)
(vector-slots 8 995291 64426)
(floats 8 223 446)
(intervals 56 5773 3)
(buffers 992 36)
(heap 1024 96591 16146))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30429
; Package
emacs
.
(Mon, 12 Feb 2018 15:52:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 30429 <at> debbugs.gnu.org (full text, mbox):
> From: Live System User <nyc4bos <at> aol.com>
> Date: Sun, 11 Feb 2018 21:09:40 -0500
>
> The example in the "efaq" Info file gives the following
>
> TERM=xterm-direct emacs -nw
>
> When I execute this, as stated, I get an Emacs session
> WITHOUT any colors -- even "M-x list-colors-display"
> does not show any colors.
>
> However, if I change this to the following, I see colors
> displayed:
>
> TERM=xterm-direct2 emacs -nw
>
> [Note the "2" in "xterm-drect2"]
>
> Here is the definition for the setab/setaf parameters for
> each:
>
>
>
> xterm-direct2:
>
> # Emacs 26.1 and later support direct color mode in terminals, using a
> # combination of user-defined capabilities and ncurses-dependent function
> # calls. We will not include that here.
> #
> # Here is a first revision, which (disregarding the reuse of colors 1-7 which
> # is of interest only to the numerically illiterate), is compatible with other
> # terminal descriptions written for curses. It relies upon the extended range
> # for numeric capabilities provided in ncurses 6.1:
> xterm+direct2|xterm with direct-color indexing,
> [...]
>
> xterm-direct2|xterm with direct-color indexing (old),
> use=xterm+direct2, use=xterm+titlestack, use=xterm,
> [...]
> setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
> setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
>
>
>
>
>
> xterm-direct:
>
> # That in turn had a problem: in the original patch submitted for KDE konsole
> # in 2006, the submitter and the developer alike overlooked a "color space
> # identifier" parameter. This version provides for that parameter:
> xterm+direct|xterm with direct-color indexing,
> [...]
> setab=\E[%?%p1%{8}%<%t4%p1%d%e48\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
> setaf=\E[%?%p1%{8}%<%t3%p1%d%e38\:2\:\:%p1%{65536}%/%d\:%p1%{256}%/%{255}%&%d\:%p1%{255}%&%d%;m,
>
>
>
>
>
>
> Between the two ("xterm-direct"and "xerm-direct2"), I see
> the diffeence in at least "\:2\:\:" and "\:2\:".
> respectively -- "xterm-direct" has an additioal "\:"
>
>
>
>
> So, should Emacs be changed to accommadate the missing
> parameter ("\:" as in "xterm-direct")??
>
> Or should the information in "efaq" be changed to specify
> "xterm-direct2"?
>
> Or...?
>
> Can anyone else confirm that colors are not displayed
> in Emacs TTY when using TERMINFO's 6.1 definition of
> "xterm-direct" (setab/setaf)?
Thanks for reporting this.
Rami, could you please take a look?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30429
; Package
emacs
.
(Mon, 12 Feb 2018 16:39:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 30429 <at> debbugs.gnu.org (full text, mbox):
On 12.02.2018 17:51, Eli Zaretskii wrote:
>> From: Live System User <nyc4bos <at> aol.com>
>> Date: Sun, 11 Feb 2018 21:09:40 -0500
>>
>> The example in the "efaq" Info file gives the following
>>
>> TERM=xterm-direct emacs -nw
>>
>> When I execute this, as stated, I get an Emacs session
>> WITHOUT any colors -- even "M-x list-colors-display"
>> does not show any colors.
>>
>> However, if I change this to the following, I see colors
>> displayed:
>>
>> TERM=xterm-direct2 emacs -nw
>>
This is expected. Each direct mode TERM specification uses slightly
different seta[bf] string to display the colors. For example, currently
Gnome Terminal supports xterm-direct2 and iTerm2/XTerm support
xterm-direct. It's the user's responsibility to set TERM to something
that is supported by their terminal.
Emacs happens to be mentioned in the comment for xterm+direct2 in
Terminfo source file. However, this is just a coincidence and doesn't
mean that Emacs would have any connection with xterm-direct2. The
comment simply states that the non-standard set[bf]24 strings supported
by Emacs (before Terminfo added the standard capabilities) aren't added
to Terminfo as standard capabilities.
I chose to use xterm-direct in the FAQ, because Terminfo suggests that
seta[bf] strings of xterm-direct are the preferred way to display colors
in direct mode.
The bug here is that the FAQ could explain this more thoroughly, but
there's no bug in software.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30429
; Package
emacs
.
(Mon, 12 Feb 2018 17:50:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 30429 <at> debbugs.gnu.org (full text, mbox):
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 30429 <at> debbugs.gnu.org
> From: Rami Ylimäki <rami.ylimaki <at> vincit.fi>
> Date: Mon, 12 Feb 2018 18:38:14 +0200
>
> The bug here is that the FAQ could explain this more thoroughly, but
> there's no bug in software.
Can you propose a more detailed text for the FAQ?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#30429
; Package
emacs
.
(Mon, 12 Feb 2018 19:39:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 30429 <at> debbugs.gnu.org (full text, mbox):
* doc/misc/efaq.texi (Colors on a TTY): Show how to list direct mode
TERM definitions. (Bug#30429)
---
doc/misc/efaq.texi | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index fef9b1051b..ffd833f832 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -1525,6 +1525,19 @@ Colors on a TTY
$ TERM=xterm-direct emacs -nw
@end example
+If your terminal is incompatible with XTerm, you may have to use
+another TERM definition.
+
+@example
+$ toe | grep '\-direct'
+
+konsole-direct konsole with direct-color indexing
+vte-direct vte with direct-color indexing
+st-direct st with direct-color indexing
+xterm-direct2 xterm with direct-color indexing (old)
+xterm-direct xterm with direct-color indexing
+@end example
+
Terminals with @samp{RGB} capability treat pixels #000001 - #000007 as
indexed colors to maintain backward compatibility with applications
that are unaware of direct color mode. Therefore the seven darkest
--
2.14.1
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Tue, 13 Feb 2018 05:36:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Live System User <nyc4bos <at> aol.com>
:
bug acknowledged by developer.
(Tue, 13 Feb 2018 05:36:03 GMT)
Full text and
rfc822 format available.
Message #22 received at 30429-done <at> debbugs.gnu.org (full text, mbox):
> From: Rami Ylimäki <rami.ylimaki <at> vincit.fi>
> Date: Mon, 12 Feb 2018 21:37:54 +0200
>
> * doc/misc/efaq.texi (Colors on a TTY): Show how to list direct mode
> TERM definitions. (Bug#30429)
Thanks, pushed to the master branch.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 13 Mar 2018 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 104 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.