[neomutt-devel] Slang - Not fit for purpose

Richard Russon rich at flatcap.org
Mon Sep 27 15:06:02 CEST 2021

I'm planning to remove the Slang support from NeoMutt.
It doesn't work; it isn't understood; it's seldom used.


NeoMutt can be built against either of Ncurses or Slang library.
They provide low-level graphics support.
Theoretically they should work the same, but it's never quite been true.

Most devs and most packagers use Ncurses.  We recommend that.
As Slang is seldom used, it's seldom tested.


Recently, I've been busy trying to refactor the colour handling code.
(I think I now understand it well enough to explain to others)

Whilst testing, I checked the behaviour against Slang.
Everything looked wrong:
- In my development branch
- In master
- In our last release 2021-02-05
- In upstream Mutt!

After using about 16 colours, everything in Slang went wrong.

Here's a simple config file:

color quoted0 color196 default
color quoted1 color208 default
color quoted2 color226 default
color quoted3 color46  default
color quoted4 color75  default
color quoted5 color21  default
color quoted6 color207 default
color quoted7 color63  default
color quoted8 color15  default

color signature red     green
color status    blue    yellow
color search    black   red
color body      yellow  magenta "3[0-9]"

color prompt    default default
color tilde     default default
color tree      yellow  default
color indicator default blue

    neomutt -n -F test.rc

The last colour is the indicator -- the current email in the index.

In NeoMutt and Mutt, built with Ncurses, the indicator is blue.
In NeoMutt and Mutt, built with Slang, the indicator is bold white.

If you remove any `color` command from the config, then the Slang versions show
a blue indicator.  Add any more colours and things get much worse.


The Slang library isn't well documented and I couldn't find the reason for
colour problems.   If upstream Mutt worked correctly, then I'd spend the time
trying to fix the problems.  But it doesn't.

So, I want to get rid of Slang.

Unless... someone steps forward to fix and maintain the Slang code.

Branch [devel/kill-slang] contains the changes I'd like to make.

Let me know what you think.
    Rich / FlatCap
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-devel-neomutt.org/attachments/20210927/cd774c25/attachment.sig>

More information about the neomutt-devel mailing list