all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working
@ 2018-02-12  2:09 Live System User
  2018-02-12 15:51 ` Eli Zaretskii
  2018-02-12 19:37 ` bug#30429: [PATCH] Improve FAQ about direct mode terminals Rami Ylimäki
  0 siblings, 2 replies; 6+ messages in thread
From: Live System User @ 2018-02-12  2:09 UTC (permalink / raw
  To: 30429


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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working
  2018-02-12  2:09 bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working Live System User
@ 2018-02-12 15:51 ` Eli Zaretskii
  2018-02-12 16:38   ` Rami Ylimäki
  2018-02-12 19:37 ` bug#30429: [PATCH] Improve FAQ about direct mode terminals Rami Ylimäki
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2018-02-12 15:51 UTC (permalink / raw
  To: Live System User, Rami Ylimäki; +Cc: 30429

> From: Live System User <nyc4bos@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?





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working
  2018-02-12 15:51 ` Eli Zaretskii
@ 2018-02-12 16:38   ` Rami Ylimäki
  2018-02-12 17:48     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Rami Ylimäki @ 2018-02-12 16:38 UTC (permalink / raw
  To: Live System User; +Cc: 30429

On 12.02.2018 17:51, Eli Zaretskii wrote:

>> From: Live System User <nyc4bos@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.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working
  2018-02-12 16:38   ` Rami Ylimäki
@ 2018-02-12 17:48     ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2018-02-12 17:48 UTC (permalink / raw
  To: Rami Ylimäki; +Cc: 30429, nyc4bos

> Cc: Eli Zaretskii <eliz@gnu.org>, 30429@debbugs.gnu.org
> From: Rami Ylimäki <rami.ylimaki@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#30429: [PATCH] Improve FAQ about direct mode terminals.
  2018-02-12  2:09 bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working Live System User
  2018-02-12 15:51 ` Eli Zaretskii
@ 2018-02-12 19:37 ` Rami Ylimäki
  2018-02-13  5:35   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Rami Ylimäki @ 2018-02-12 19:37 UTC (permalink / raw
  To: 30429

* 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






^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#30429: [PATCH] Improve FAQ about direct mode terminals.
  2018-02-12 19:37 ` bug#30429: [PATCH] Improve FAQ about direct mode terminals Rami Ylimäki
@ 2018-02-13  5:35   ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2018-02-13  5:35 UTC (permalink / raw
  To: Rami Ylimäki; +Cc: 30429-done

> From: Rami Ylimäki <rami.ylimaki@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-13  5:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-12  2:09 bug#30429: 27.0.50; Emacs TERMINFO "xterm-direct" "efaq" example not working Live System User
2018-02-12 15:51 ` Eli Zaretskii
2018-02-12 16:38   ` Rami Ylimäki
2018-02-12 17:48     ` Eli Zaretskii
2018-02-12 19:37 ` bug#30429: [PATCH] Improve FAQ about direct mode terminals Rami Ylimäki
2018-02-13  5:35   ` Eli Zaretskii

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.