On Sat, Nov 13, 2010 at 11:50:32AM -0900, Roger wrote:
I noticed when using GMail IMAP with Mutt, the Status line would show something
like "=INBOX" for the host name (ie. %f of status_format).
If multiple GMail IMAP accounts are accessed with one muttrc file (ie. mapping
accounts to F1, F2, F3, ...), it's rare the %f variable will show the full
hostname on the status line which includes the GMail username.
I figured-out I could redefine the status_format to include an account
identifier
on the status line so I know which GMail Account INBOX I'm looking at instead
of guessing:
account-hook 'imaps://[email protected]/' 'set imap_user="[email protected]"
imap_pass="xxx" \
smtp_url="smtps://[email protected]@smtp.gmail.com/" \
smtp_pass="xxx" \
status_format = "-%r-Mutt [email protected]: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o?
Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l?
%l?]---(%s/%S)-%>-(%P)---" '
account-hook 'imaps://[email protected]/' 'set imap_user="[email protected]"
imap_pass="xxx" \
smtp_url="smtps://[email protected]@smtp.gmail.com/" \
smtp_pass="xxx" \
status_format = "-%r-Mutt [email protected]: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o?
Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l?
%l?]---(%s/%S)-%>-(%P)---" '
From the hundred or so web pages detailing using Mutt with GMail IMAP, this
would have
detail, or did I screw-up someplace?
Looks pretty nice. You can simplify it a little by by simply using the value
of $imap_user directly when setting the $status_format:
account-hook 'imaps://[email protected]/' 'set imap_user="[email protected]"
imap_pass="xxx" \
smtp_url="smtps://[email protected]@smtp.gmail.com/" \
smtp_pass="xxx"
account-hook 'imaps://[email protected]/' 'set imap_user="[email protected]"
imap_pass="xxx" \
smtp_url="smtps://[email protected]@smtp.gmail.com/"
smtp_pass="xxx"
# note the use of single quotes here. it prevents $imap_user from being
# expanded until the hook is evaluated, instead of when parsed.
folder-hook . 'set status_format = "-%r-Mutt $imap_user: %f [Msgs:%?M?%M/?%m%?n?
New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l?
%l?]---(%s/%S)-%>-(%P)---" '
me