Vim fold key bindings for mutt threads

2010-01-04 Thread Horacio Sanson
Is it possible to create Vim fold like keybindings to expand/collapse threads in
mutt?

Example:
  zo  -   expand thread under the cursor
  zO  -   expand thread under the cursor and all subthreads recursively
  zc  -   close thread under the cursor
  zC  -   close thread under the cursor and all subthreads recursively
  za  -   toggle thread under the cursor
  zA  -   toggle thread under the cursor and all subthreads recursively

Being used to vim keybindings using ESC-v is rather uncomfortable for me.

-- 
regards,
Horacio Sanson


Re: Vim fold key bindings for mutt threads

2010-01-04 Thread Christian Ebert
* Horacio Sanson on Monday, January 04, 2010 at 19:22:52 +0900
> Is it possible to create Vim fold like keybindings to expand/collapse threads 
> in
> mutt?
>
> Example:
>  zo  -   expand thread under the cursor
>  zO  -   expand thread under the cursor and all subthreads recursively
>  zc  -   close thread under the cursor
>  zC  -   close thread under the cursor and all subthreads recursively
>  za  -   toggle thread under the cursor
>  zA  -   toggle thread under the cursor and all subthreads recursively
> 
> Being used to vim keybindings using ESC-v is rather uncomfortable for me.

bind index za collapse-thread

(un)collapses current thread.

Look for "bind" in man 5 muttrc. You probably need less bindings
as the functions toggle the thread state.

c
-- 
\black\trash movie_C O W B O Y_  _C A N O E_  _C O M A_
 Ein deutscher Western/A German Western

 --->> http://www.blacktrash.org/underdogma/ccc.php


Re: How to count new emails in mbox format mailbox?

2010-01-04 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

On Sunday, January  3 at 04:39 PM, quoth Ionel Mugurel Ciobica:
>You were told already...
>
>privmailnew=$(grep -c '^From ' ${private})
>inmailnew=$(grep -c '^From ' ${inbox})

That's only true if and only if the mbox file is NOT in mboxcl2 
format. Many mbox formats (mboxo, mboxrd, and mutt's favorite: mboxcl) 
transform internal lines that begin with From into >From, but mboxcl2 
does not (it uses Content-Length: headers to reliably determine where 
the next message is).

There's a good description of several of the common mbox formats here: 
http://homepages.tesco.net/J.deBoynePollard/FGA/mail-mbox-formats.html

~Kyle
- -- 
Important families are like potatoes. The best parts are underground.
   -- Francis Bacon
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iQIcBAEBCAAGBQJLQhbGAAoJECuveozR/AWerQAP/R+gajViBpTaPTREIPQCrwjP
szvTOmzKaKBkBmqJVk7etzdMRyAtre+Kzupwc8gHO370Saf0beee8e3MWA4hKXPB
EFhSDlrUTFquf0EvZe2kUfXgr2V2VeBpujX2lcXMY7rNDS8Z7jw67tgCKg+PYLp4
GkvgqDiSwH/WQrW81IPhRC86z3kBPsQqUuO2ghe+zQNl0i9tOpVF/3ygrEjYTkio
7IuXfTOF+mBpoEBH019TNMjVZxE5OBfT01X0curwEVimRgWUlU0DlXfW7YqrIUVY
AhfxH2SptkMZ+ttSmpzIcp2TI5FgpVFOOUu/sgov7iDjite+lgGYlIJWaDVBA20v
30DewWZXZ3WdDuiMWlRBIGgKnpqWNnx2weTAvkxtBp0SKb/8x9hm8uBPCHTSNvqZ
5XjJAUAsGvK4EzEWUKy2ni0KyVNkPgNOjcMTT8KYr8I5vPTfVKdLjTZ3zwDOrDlo
2g3NRoGkv7JgtNv+je45tXygO7nXAQ4ykAkID4/+Tj64Vk61WOx9Sn4fv5Wk0Kuk
JJXEvFwdxnYsVe5keugBVJDZlcz2oszMyi3p/Iqxrg22M4M7VojW1i8WMZ0ze0sv
s6PFEQfI2DGKF3/I5aoJYF97WLA//uJVT2OXEYrlPFRX1Blep1M6ar/xLYQVYqIf
CxlRmlDmsPQ7DRqyKIyU
=oLzI
-END PGP SIGNATURE-