From: "Rami Ylimäki" <rami.ylimaki@vincit.fi>
To: emacs-devel@gnu.org
Subject: [PATCH v3 4/4] Update documentation regarding 24-bit TTY colors.
Date: Tue, 14 Feb 2017 17:58:22 +0200 [thread overview]
Message-ID: <1487087902-6661-5-git-send-email-rami.ylimaki@vincit.fi> (raw)
In-Reply-To: <1487087902-6661-1-git-send-email-rami.ylimaki@vincit.fi>
From: Rami Ylimäki <rjy@iki.fi>
* doc/misc/efaq.texi: Add instructions on how to enable direct color TTY
mode.
* etc/NEWS: Mention direct color TTY mode and point to FAQ.
---
doc/misc/efaq.texi | 33 +++++++++++++++++++++++++++++++++
etc/NEWS | 5 +++++
2 files changed, 38 insertions(+)
diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index f7a47f8..e9cfe7a 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -1491,6 +1491,39 @@ exhibits all the colors Emacs knows about on the current display.
Syntax highlighting is on by default since version 22.1.
+Emacs 26.1 and later support direct color mode in terminals. If Emacs
+finds Terminfo capabilities @samp{setb24} and @samp{setf24}, 24-bit
+direct color mode is used. The capability strings are expected to
+take one 24-bit pixel value as argument and transform the pixel to a
+string that can be used to send 24-bit colors to the terminal.
+
+There aren't yet any standard terminal type definitions that would
+support the capabilities, but Emacs can be invoked with a custom
+definition as shown below.
+
+@example
+$ cat terminfo-24bit.src
+
+# Use colon separators.
+xterm-24bit|xterm with 24-bit direct color mode,
+ use=xterm-256color,
+ setb24=\E[48:2:%p1%@{65536@}%/%d:%p1%@{256@}%/%@{255@}%&%d:%p1%@{255@}%&%dm,
+ setf24=\E[38:2:%p1%@{65536@}%/%d:%p1%@{256@}%/%@{255@}%&%d:%p1%@{255@}%&%dm,
+# Use semicolon separators.
+xterm-24bits|xterm with 24-bit direct color mode,
+ use=xterm-256color,
+ setb24=\E[48;2;%p1%@{65536@}%/%d;%p1%@{256@}%/%@{255@}%&%d;%p1%@{255@}%&%dm,
+ setf24=\E[38;2;%p1%@{65536@}%/%d;%p1%@{256@}%/%@{255@}%&%d;%p1%@{255@}%&%dm,
+
+$ tic -x -o ~/.terminfo terminfo-24bit.src
+
+$ TERM=xterm-24bit emacs -nw
+@end example
+
+Currently there's no standard way to determine whether a terminal
+supports direct color mode. If such standard arises later on, support
+for @samp{setb24} and @samp{setf24} may be removed.
+
@node Debugging a customization file
@section How do I debug a @file{.emacs} file?
@cindex Debugging @file{.emacs} file
diff --git a/etc/NEWS b/etc/NEWS
index 31b05dd..5cb4d02 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -77,6 +77,11 @@ modern init systems such as systemd, which manage many of the traditional
aspects of daemon behavior themselves. '--old-daemon' is now an alias
for '--daemon'.
++++
+** Terminal is initialized to use 24-bit colors if required
+capabilities are found from terminfo. See the FAQ node 'Colors on a
+TTY' for more information.
+
\f
* Changes in Emacs 26.1
--
2.7.4
next prev parent reply other threads:[~2017-02-14 15:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-14 15:58 [PATCH v3 0/4] Support 24-bit terminal colors Rami Ylimäki
2017-02-14 15:58 ` [PATCH v3 1/4] Remove unused terminal color pair count Rami Ylimäki
2017-02-14 15:58 ` [PATCH v3 2/4] Support 24-bit terminal colors Rami Ylimäki
2017-02-14 15:58 ` [PATCH v3 3/4] Let user turn 24-bit terminal colors on Rami Ylimäki
2017-02-14 15:58 ` Rami Ylimäki [this message]
2017-02-18 11:07 ` [PATCH v3 0/4] Support 24-bit terminal colors Eli Zaretskii
2017-02-19 2:22 ` Tino Calancha
2017-02-19 3:14 ` Black and white emacs -nw (WAS: Re: [PATCH v3 0/4] Support 24-bit terminal colors.) Kaushal Modi
2017-02-19 3:20 ` Kaushal Modi
2017-02-19 6:22 ` Tino Calancha
2017-02-19 7:33 ` Kaushal Modi
2017-02-19 12:43 ` Rami Ylimäki
2017-02-19 15:21 ` Kaushal Modi
2017-02-26 0:49 ` [PATCH v3 0/4] Support 24-bit terminal colors Charles Strahan
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487087902-6661-5-git-send-email-rami.ylimaki@vincit.fi \
--to=rami.ylimaki@vincit.fi \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).