First of all. Mutt doesn't suck a lot, only a little. Then the issue. Propably everybody knows the topic's lesson already. However, I did not. As a result I burned the whole morning to find it out the hard way.
A hook is a concept
borrowed to Mutt from the EMACS editor which allows user to execute
arbitrary commands before performing some operation. Mutt manual has the following note regarding hooks:
Note: if a hook changes configuration settings, these changes remain effective until the end of the current mutt session. As this is generally not desired, a default hook needs to be added before all other hooks to restore configuration defaults. Here is an example with send-hook and the my_hdr directive:
send-hook . 'unmy_hdr From:'
send-hook [email protected] my_hdr from: [email protected]
The save-hook
is "used to override the default filename used when saving messages". What is not
said is that overriding is done locally, not by changing the particular
configuration setting (as I expected it to behave). So, lo and behold,
the heavily emphasized note actually does not apply to hooks which do not run an arbitrary Mutt command (which could reset a configuration setting), for example save-hook
.
ps. Only about a half of the hooks are actually capable of executing an arbitrary command, which is somewhat contradictory to the definition of the concept of hook in Mutt.
Kommentit
Tämän blogin kommentit tarkistetaan ennen julkaisua.