Subject: bug#30429: closed (Re: bug#30429: [PATCH] Improve FAQ about direct mode terminals.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 13 Feb 2018 05:36:03 +0000

Your bug report

#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
30429: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30429
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#30429: [PATCH] Improve FAQ about direct mode terminals.
From: Eli Zaretskii <[email-masked]>
To: Rami Ylimäki <[email-masked]>
Cc: [email-masked]
Date: Tue, 13 Feb 2018 07:35:14 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Rami Ylimäki <[email-masked]>
> 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.

Subject: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working
From: Live System User <[email-masked]>
To: [email-masked]
Date: Sun, 11 Feb 2018 21:09:40 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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