rkd77 / elinks

Fork of elinks
Other
356 stars 38 forks source link

0.17.1.1 no longer displays color #339

Open calebhearth opened 3 weeks ago

calebhearth commented 3 weeks ago

In the linked HTML file, calling elinks -dump -dump-color-mode 3 would dump colors as defined in the style tag. It would also display those colors when that file was opened with elinks.

In both cases, there was no config and the TERM was set to xterm-kitty using the Kitty terminal, but it's the same behavior in macOS' Terminal.app with TERM=xterm-256color.

This was previously working in 0.17.0

rkd77 commented 3 weeks ago

Could you provide screenshots ? For 0.17.0 and 0.17.1.1

calebhearth commented 3 weeks ago

Yeah for sure. This is 0.17.0 with an HTML file identical or vastly similar to the linked one:

$ elinks --version
ELinks 0.17.0
Built on Dec 25 2023 11:28:25

Features:
Standard, IPv6, brotli(1.1.0), gzip(1.2.12), bzip2(1.0.8), zstd(1.5.6),
UTF-8, Periodic Saving, Viewer (Search History, Timer, Marks),
Cascading Style Sheets, Protocol (Authentication, BitTorrent, File,
CGI, Finger, FTP, Gemini, Gopher, HTTP, NNTP, URI rewrite, User
protocols), SSL (OpenSSL), MIME (Option system, Mailcap, Mimetypes
files), LED indicators, Bookmarks, Cookies, Form History, Global
History, Exmode, Goto URL History
$ elinks test.html -dump -dump-color-mode 4
Screenshot 2024-11-05 at 9 23 05 AM

And some other color modes:

Screenshot 2024-11-05 at 9 33 47 AM

And here's 0.17.1.1 with that same file:

$ elinks --version               
ELinks 0.17.1.1
Built on Oct  5 2024 06:29:15

Features:
Standard, IPv6, brotli(1.1.0), gzip(1.2.12), UTF-8, Periodic Saving,
Viewer (Search History, Timer, Marks), Cascading Style Sheets, Protocol
(Authentication, BitTorrent, File, CGI, Finger, FTP, FTPES, Gemini,
Gopher, HTTP, NNTP, SFTP, URI rewrite, User protocols), SSL (OpenSSL),
MIME (Option system, Mailcap, Mimetypes files), LED indicators,
Bookmarks, Cookies, Form History, Global History, Scripting (), Exmode,
Goto URL History
$ elinks test.html -dump -dump-color-mode 4
Screenshot 2024-11-05 at 9 25 44 AM

And some other color modes on 0.17.1.1:

Screenshot 2024-11-05 at 9 30 09 AM

Kitty version info for both:

$ kitty --version
kitty 0.36.1 created by Kovid Goyal
rkd77 commented 3 weeks ago

Weird, I checked elinks-0.17.0 and elinks-0.17.1.1. With -no-home both show white characters on konsole, but elinks-0.18.GIT show colors. Could you check git version?

calebhearth commented 2 weeks ago

Happy to try it if you can provide a binary or a macos build script, but after banging my head against your INSTALL docs, dependencies, autoconf, and meson for about 30 minutes I'm still getting various errors so I'm having trouble building it myself.

smemsh commented 2 weeks ago

@calebhearth you can try the script I use to build, it will populate netsurf/etc, maybe it works for you?

smemsh commented 2 weeks ago

@calebhearth oh I just noticed you said "macos," my script probably only works on linux

rkd77 commented 2 weeks ago

@calebhearth, how have you built elinks-0.17.0 and elinks-0.17.1.1, could you show build scripts? And errors for git version?

calebhearth commented 2 weeks ago

Both installed from homebrew

rkd77 commented 2 weeks ago

@calebhearth I have no MacOS, but If I had, I would try: brew install --HEAD felinks or similar, but with --HEAD

calebhearth commented 2 weeks ago

That worked great. Thanks for your patience.

❯ elinks --version
ELinks 0.18.GIT bb9f95876ea5df99e23ecfff5d276a71cfeb0fc1-dirty
Built on Nov  6 2024 14:27:21

Features:
Standard, IPv6, brotli(1.1.0), gzip(1.2.12), UTF-8, Periodic Saving,
Viewer (Search History, Timer, Marks), Cascading Style Sheets, Protocol
(Authentication, BitTorrent, File, CGI, Finger, FTP,
FTPES(libcurl/8.7.1 SecureTransport (LibreSSL/3.3.6) zlib/1.2.12
nghttp2/1.63.0), Gemini, Gopher, HTTP, NNTP, SFTP, URI rewrite, User
protocols), SSL (OpenSSL 3.4.0 22 Oct 2024), MIME (Option system,
Mailcap, Mimetypes files), LED indicators, Bookmarks, Cookies, Form
History, Global History, Scripting (), Exmode, Goto URL History

This behaves like 0.17.0 did, dumping colors as expected from those screen shots for color modes 1-4.

It looks like Homebrew switched from Make to Meson between 0.17.0 and 0.17.1.1, but used Meson to build the 0.18.GIT version. My thought is that there may have been some issue with that that was since resolved.

https://github.com/Homebrew/homebrew-core/commit/b61a9b6e119cefcd7e179c7912e18e4f78b14766

calebhearth commented 2 weeks ago

@rkd77 This may have been an issue with Homebrew for all I know. As things look good for the 0.18.GIT release, I'm happy to call this resolved if you agree. I'll stick with 0.17.0 until 0.18.0 is released so that I don't lose the color dumping. Feel free to close!

Just in case you're curious, I'm using felinks in combination with vim's TOhtml command and a git script to grab the content of a function and dump it to my terminal colored as if by my EDITOR. It's pretty nifty, and I appreciate that felinks enables it. Thanks!

rkd77 commented 2 weeks ago

Let's wait for 0.18.0 then.