<<< Date Index >>>     <<< Thread Index >>>

Re: Bug in send-hook? Offline mode for pop?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday, October 15 at 07:18 AM, quoth amscopub-blender@xxxxxxxxx:
> 1. Is there an offline mode for pop? Something similar to kmail -- 
> where it doesn't connect to the server unless you *explicitly* tell 
> it to? It seems that mutt always connects to the pop server even 
> after changing the pop_checkinterval to 10 minutes.

Not really. The way to think about mutt is that it's a mailbox viewer. 
If you want to see the contents of a POP3 mailbox, you have to 
connect. And then, once connected, there's no reason to *close* the 
connection if you're still looking at messages stored on the server. 
Mutt doesn't have an "offline mode" for *anything*. However, you can 
probably get what you want using multiple tools. For example, you 
could use something like fetchmail to periodically copy the contents 
of your pop3 server to a local folder, and then use mutt to view the 
contents of that folder.

> send-hook '^foo.*$' 'set content_type="text/plain"'

The reason this isn't doing what you want is that mutt is consulting 
the contents of the $content_type variable BEFORE running the 
send-hook. So the send-hook is changing the value of $content_type, 
but since mutt's already used the contents of that variable for 
something, the change isn't reflected in the message you're sending. 
(This is probably a bug - you can report it to http://bugs.mutt.org) 
Then, when you send a second message, the $content_type variable has 
already been changed, so it is applied to this second message.

You can work around this like so:

     send-hook '^foo' 'push <edit-type><kill-line>text/plain<enter>'

> I have no other send-hooks.

That's *probably* a mistake. Send-hooks do not set up a temporary 
environment that disappears as soon as the message is sent. Send-hooks 
execute commands whenever a message is sent that matches their 
pattern. Thus, if you want to change some setting for just some 
recipients, you have to change it back for all other recipients. The 
usual way to do this is with two send-hooks: one to change the 
setting, and one to change it back. Like so:

     send-hook .      'set setting=defaultvalue'
     send-hook '^foo' 'set setting=foovalue'

~Kyle
- -- 
The answers may be in The Book, but we're expected to show our work. 
That's the only way that we can enjoy the fruits of DOING the work.
                                                       -- Howard Tayler
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iEYEARECAAYFAkj2Bw8ACgkQBkIOoMqOI15KTACg3phnlhNka46QoL9etB1RZ3td
N8AAoLwVYkaDMa/FJCG8cfYPCKh8irRi
=oJ+1
-----END PGP SIGNATURE-----