unset folder-hook
Ed Blackman
ed at edgewood.to
Mon Jul 17 18:11:02 UTC 2023
On Mon, Jul 17, 2023 at 07:02:34AM -0500, Ranjan Maitra wrote:
> On Sun Jul16'23 10:03:01PM, Ed Blackman wrote:
> > In my .muttrc I have:
> >
> > # Set $strict_threads in large mailboxes (which are likely to have duplicated subjects)
> > folder-hook . set strict_threads=no
> > folder-hook =sent set strict_threads=yes
> > folder-hook =.archive* set strict_threads=yes
>
> Thanks very much for this, however, I get an error, when I do the following:
>
> folder-hook . 'unset smtp_url'; 'set strict_threads=no'
> folder-hook '(mutt|fedora|postfix|fetchmail|openbox)' 'set from =
> email at address.com; set smtp_url="something"; set smtp_pass="somethingelse"; set
> envelope_from_address="email at address.com"; set use_envelope_from=yes; set from = "email at address.com"; my_hdr Bcc:; set forward_format = "[FW frm %a:%s]";set realname = "Real Name"; set ssl_force_tls = yes; set ssl_starttls = yes'; 'set strict_threads=yes'
I think the syntax error you're getting is because the syntax is:
folder-hook [!]regexp command
but you have two things after the regex. Try:
folder-hook . 'unset smtp_url; set strict_threads=no'
See how the command is all one quoted string?
You also have a ton of settings on that one line. You might consider:
folder-hook . 'source ~/.mutt/folder_defaults.rc'
folder-hook '(mutt|fedora)' 'source ~/.mutt/folder_techlists.rc' # or whatever name
Then make sure that *every* setting is set (or unset) in each RC file. So if you set ssl_starttls in folder_techlists.rc, you'll need to set or unset it in folder_defaults.rc. Otherwise, you will have different settings depending on which folders you have visited.
--
Ed Blackman
More information about the Mutt-users
mailing list