On 2022-01-14 14:30:40 -0600, Derek Martin wrote: > On Fri, Jan 14, 2022 at 03:19:39AM +0100, Vincent Lefevre wrote: > > On 2022-01-13 15:36:04 -0600, Derek Martin wrote: > > > So... The only difference between this and hdrdefault is that > > > hdrdefault's order does not matter. This is a very minor difference, > > > and the distinction disappears so long as you provide the "." rule > > > first, > > > > This would mean that it would not be possible to change the default > > header color from a running Mutt. > > No it doesn't; use uncolor, then enter the rules in the correct order.
This is really stupid: if one has a dozen on rules, one would have to reenter them. A waste of time, with possible errors. Or put them in their own file, sourced with "source", but this would mean that header color settings would have to be put in 2 different config files, which is ugly for maintenance. > I'm well aware doing that would be dumb, but it IS possible. Well, it is not possible *without size effects*. If I want to change the default header color (e.g. temporarily), I want just that, not to do other things that would need me to enter other commands. > It would be far more sensible to just restart Mutt with the updated > config, which is what any reasonable person would do, and which is > necessary in any case to make the change permanent. Again, this is a very silly suggestion. This means: 1. Modify Mutt's config. 2. Restart Mutt. 3. Modify Mutt's config again (so that the other instances still get the usual config). 4. Possibly find the way to get back the status before Mutt was restarted. > > Currently, my header color settings do not depend on any order as they > > are mutually exclusive > > That's possible, if your rules are very carefully crafted; I didn't have to be particularly careful. These are rules only based on the header names. > > > just as you must already do with send-hook and every other > > > > I don't use send-hook (and other hooks) on "color header". > > That's not what I'm saying. > > # apply a default folder hook > folder-hook . set x=foo > # other folders > folder-hook work set x=bar > folder-hook ice-cream set x=baz > ... > > The . rule must come first. There is no default folder-hook. The > necessity of ordering has precedence in Mutt and is inherent in any > case. OK, I now understand what you mean. However, one could argue whether there could be a "default" hook. The case of default (with ".") is very common and needing to have it first is probably error prone with long muttrc files, possibly with inclusions ("source" command). -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)