[neomutt-devel] [PATCH 1/2] Fix $reply_regex

Richard Russon rich at flatcap.org
Sun Dec 24 13:39:55 CET 2023


Hi наб,

> > ... flags ...

> a single 32-bit(!) bitfield is has clearly overstayed its welcome

Probably

> What follows ...

PLEASE no more 80kb emails.
The list automatically moderates emails over 10kb, which means I have to manually OK them.

It's the 21st century; we've got git now.
You have privs to create branches on the `neomutt` repo
(preferably of the form `devel/SHORT-NAME`)

> is a diff that partly builds (41 files don't,

I *love* your enthusiasm, but this might have been better as snippets of code.

I can see a couple of problems, immediately.

The biggest problem is dependencies.

The config system was carefully designed (it didn't come from Mutt ;-).
The machinery is self-contained and free of dependencies.

Each config *type* is self-contained.
It implements the Config API and can defines its own subtypes, validators, etc.
(see address/config_type.c)

Fitting all the type/subtypes/flags into a single field is a bit fiddly,
but it means that `struct ConfigDef` doesn't need to know about the details of the types.

> The declaration machinery is slightly more DSLy than it used to be,

Yeah, that's not pretty

> Do notice just /how much/ shit there is,

Yes.
Unfortunately, there are higher-priority things (****-er things) that I need to fix first.

> but this is mostly hidden by being strewn around and inconsistent nomenclature.

Suggestions welcome

> (cs_register_variables() is always called with DT_NO_FLAGS (0)
>  #define DT_DISABLED      (1 << 30) ///< Config item is disabled

Yes.  I _had_ plans for that, but I haven't got around to them.

Instead of #ifdef'ing config out, I thought of a plan to mark it as 'disabled'.
This would mean that we could distribute config files, but any config that wasn't
configured-in, could be silently recognised and ignored.

> so I mechanically just deleted that argument.

> #define DT_INHERIT_ACC   (1 << 12) ///< Config item can be Account-specific
> #define DT_INHERIT_MBOX  (1 << 13) ///< Config item can be Mailbox-specific
> are all unused (first two never checked, latter never set)

These are for config inheritance.
The config system supports subsets of config.
The (distant) plan was to support Account- and Mailbox-specific config.
This would mean we wouldn't need account- and folder-hooks any more.

Here's a sample config file

  https://github.com/neomutt/sample-mail/blob/main/base.rc

See my favourite (mind-bending) diagram *ever* :-)

  https://github.com/neomutt/gfx/blob/main/arch/README.md#config-and-inheritance

There's a LOT still wrong with NeoMutt, but the config system is relatively sane.

So, please keep your ideas and improvements coming.

Cheers,
    FlatCap / Rich

P.S. I won't have much time to think about NeoMutt for the next week
     (Merry Christmas / Happy Holidays)
-------------- 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/20231224/8ffd74d6/attachment.sig>


More information about the neomutt-devel mailing list