unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33182: 26.1; Support for Suckless st(simple terminal)
@ 2018-10-27 23:15 D. Ebling
  2018-11-03  8:53 ` Eli Zaretskii
  2019-10-03  0:59 ` Stefan Kangas
  0 siblings, 2 replies; 9+ messages in thread
From: D. Ebling @ 2018-10-27 23:15 UTC (permalink / raw)
  To: 33182

[-- Attachment #1: Type: text/plain, Size: 3420 bytes --]

       Emacs on st detects 8 colors support, and st supports 256 and
24-bits colors. Opening a file with "TERM=xterm-256colors emacs -q -nw
foo.bar" or using "(add-to-list 'term-file-aliases '("st-256color"
. "xterm"))" resolves the colors issue but introduces a 5 seconds delay
to load the file, if i open like this and after use only "emacs -q -nw
foo.bar" the 256 colors work and there's no delay to load the file, but
this only works if i used "TERM=xterm-256color" before.  st version is
0.8.1.


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05 built on juergen
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
ESC M-x is undefined

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Fundamental

Minor modes in effect:
  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
  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 message rmc puny seq byte-opt gv
bytecomp byte-compile cconv cl-loaddefs cl-lib dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date elec-pair
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 move-toolbar gtk
x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 95003 8111)
 (symbols 48 20342 2)
 (miscs 40 78 93)
 (strings 32 28097 1136)
 (string-bytes 1 735046)
 (vectors 16 12230)
 (vector-slots 8 450577 9328)
 (floats 8 49 319)
 (intervals 56 204 11)
 (buffers 992 12))

[-- Attachment #2: Type: text/html, Size: 3833 bytes --]

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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2018-10-27 23:15 bug#33182: 26.1; Support for Suckless st(simple terminal) D. Ebling
@ 2018-11-03  8:53 ` Eli Zaretskii
  2019-10-03  0:59 ` Stefan Kangas
  1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2018-11-03  8:53 UTC (permalink / raw)
  To: D. Ebling; +Cc: 33182

> From: "D. Ebling" <d.ebling8@gmail.com>
> Date: Sat, 27 Oct 2018 20:15:26 -0300
> 
>        Emacs on st detects 8 colors support, and st supports 256 and
> 24-bits colors. Opening a file with "TERM=xterm-256colors emacs -q -nw
> foo.bar" or using "(add-to-list 'term-file-aliases '("st-256color"
> . "xterm"))" resolves the colors issue but introduces a 5 seconds delay
> to load the file, if i open like this and after use only "emacs -q -nw
> foo.bar" the 256 colors work and there's no delay to load the file, but
> this only works if i used "TERM=xterm-256color" before.  st version is 0.8.1.

I think this requires a new st.el file in the lisp/term/ directory,
which will tell Emacs that st handles 256 colors, but not the extended
xterm commands (whose queries I'm guessing are the reason for the
delay).

Patches welcome.





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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2018-10-27 23:15 bug#33182: 26.1; Support for Suckless st(simple terminal) D. Ebling
  2018-11-03  8:53 ` Eli Zaretskii
@ 2019-10-03  0:59 ` Stefan Kangas
  2020-08-10 12:10   ` Lars Ingebrigtsen
  1 sibling, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2019-10-03  0:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: D. Ebling, 33182

[-- Attachment #1: Type: text/plain, Size: 1368 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "D. Ebling" <d.ebling8@gmail.com>
>> Date: Sat, 27 Oct 2018 20:15:26 -0300
>>
>>        Emacs on st detects 8 colors support, and st supports 256 and
>> 24-bits colors. Opening a file with "TERM=xterm-256colors emacs -q -nw
>> foo.bar" or using "(add-to-list 'term-file-aliases '("st-256color"
>> . "xterm"))" resolves the colors issue but introduces a 5 seconds delay
>> to load the file, if i open like this and after use only "emacs -q -nw
>> foo.bar" the 256 colors work and there's no delay to load the file, but
>> this only works if i used "TERM=xterm-256color" before.  st version is 0.8.1.
>
> I think this requires a new st.el file in the lisp/term/ directory,
> which will tell Emacs that st handles 256 colors, but not the extended
> xterm commands (whose queries I'm guessing are the reason for the
> delay).
>
> Patches welcome.

I couldn't reproduce the issue with the delay neither on st version
0.8.1 or 0.8.2.

In any case, I took a simplistic stab at this.  I can now run
"emacs -Q -nw" without specifying term and I get 256 colors as shown
by M-x list-colors-display.

Could you test it and see if it works for you?  You didn't mention
which version of Emacs you're using, but I would recommend to test
this on the current master branch (the development version 27.0.50).

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Add-term-st.el.patch --]
[-- Type: text/x-patch, Size: 849 bytes --]

From dfb6f43b1746fb21dfe9a7feb60607cc54749a4e Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Thu, 3 Oct 2019 02:46:44 +0200
Subject: [PATCH] Add term/st.el

This is a copy of term/konsole.el with konsole -> st.
* lisp/term/st.el: New file.
---
 lisp/term/st.el | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 lisp/term/st.el

diff --git a/lisp/term/st.el b/lisp/term/st.el
new file mode 100644
index 0000000000..d51e363d69
--- /dev/null
+++ b/lisp/term/st.el
@@ -0,0 +1,12 @@
+;;; st.el --- terminal initialization for st
+;; Copyright (C) 2019 Free Software Foundation, Inc.
+
+(require 'term/xterm)
+
+(defun terminal-init-st ()
+  "Terminal initialization function for st."
+  (tty-run-terminal-initialization (selected-frame) "xterm"))
+
+(provide 'term/st)
+
+;; st.el ends here
-- 
2.20.1


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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2019-10-03  0:59 ` Stefan Kangas
@ 2020-08-10 12:10   ` Lars Ingebrigtsen
  2020-08-10 12:33     ` Stefan Kangas
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-10 12:10 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: D. Ebling, 33182

Stefan Kangas <stefan@marxist.se> writes:

> In any case, I took a simplistic stab at this.  I can now run
> "emacs -Q -nw" without specifying term and I get 256 colors as shown
> by M-x list-colors-display.
>
> Could you test it and see if it works for you?  You didn't mention
> which version of Emacs you're using, but I would recommend to test
> this on the current master branch (the development version 27.0.50).

This was almost a year ago, so I think you should just go ahead and
apply the patch:

> This is a copy of term/konsole.el with konsole -> st.
> * lisp/term/st.el: New file.
> ---
>  lisp/term/st.el | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>  create mode 100644 lisp/term/st.el

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2020-08-10 12:10   ` Lars Ingebrigtsen
@ 2020-08-10 12:33     ` Stefan Kangas
  2020-08-10 12:35       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2020-08-10 12:33 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: D. Ebling, 33182

close 33182 28.1
thanks

Lars Ingebrigtsen <larsi@gnus.org> writes:

> This was almost a year ago, so I think you should just go ahead and
> apply the patch:

Done, and closing.  Thanks for taking a look.

Best regards,
Stefan Kangas





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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2020-08-10 12:33     ` Stefan Kangas
@ 2020-08-10 12:35       ` Lars Ingebrigtsen
  2020-08-10 12:45         ` Stefan Kangas
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-10 12:35 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: D. Ebling, 33182

Stefan Kangas <stefan@marxist.se> writes:

>> This was almost a year ago, so I think you should just go ahead and
>> apply the patch:
>
> Done, and closing.  Thanks for taking a look.

Perhaps this is NEWS-worthy?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2020-08-10 12:35       ` Lars Ingebrigtsen
@ 2020-08-10 12:45         ` Stefan Kangas
  2020-08-10 13:04           ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Kangas @ 2020-08-10 12:45 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: D. Ebling, 33182

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Perhaps this is NEWS-worthy?

Sure, I didn't consider that.  How about this?

diff --git a/etc/NEWS b/etc/NEWS
index e3d7ff0bef..a10d9f9dd5 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -98,6 +98,10 @@ dimension.
 Added a new Mozhi scheme.  The inapplicable ITRANS scheme is now
 deprecated.  Errors in the Inscript method were corrected.

+---
+** Rudimentary support for the 'st' terminal emulator.
+Emacs now supports 256 color display on the 'st' terminal emulator.
+





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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2020-08-10 12:45         ` Stefan Kangas
@ 2020-08-10 13:04           ` Lars Ingebrigtsen
  2020-08-10 13:28             ` Stefan Kangas
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-10 13:04 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: D. Ebling, 33182

Stefan Kangas <stefan@marxist.se> writes:

> Sure, I didn't consider that.  How about this?

Looks good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33182: 26.1; Support for Suckless st(simple terminal)
  2020-08-10 13:04           ` Lars Ingebrigtsen
@ 2020-08-10 13:28             ` Stefan Kangas
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Kangas @ 2020-08-10 13:28 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: D. Ebling, 33182

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Looks good to me.

Thanks; pushed.





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

end of thread, other threads:[~2020-08-10 13:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-27 23:15 bug#33182: 26.1; Support for Suckless st(simple terminal) D. Ebling
2018-11-03  8:53 ` Eli Zaretskii
2019-10-03  0:59 ` Stefan Kangas
2020-08-10 12:10   ` Lars Ingebrigtsen
2020-08-10 12:33     ` Stefan Kangas
2020-08-10 12:35       ` Lars Ingebrigtsen
2020-08-10 12:45         ` Stefan Kangas
2020-08-10 13:04           ` Lars Ingebrigtsen
2020-08-10 13:28             ` Stefan Kangas

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