# -*-muttrc-*- ------------ =+- MUTT config -+= --------------------------
#  $RCSfile: muttrc,v $
#  $Source: /home/cvs/yoh/.mutt/muttrc,v $
#  Commited: $Date: 2004/05/06 21:24:06 $
#  Revision: $Revision: 1.10 $
#
#  Yaroslav Halchenko                                      CS@UNM, CS@NJIT
#  web:     http://www.onerussian.com                      & PSYCH@RUTGERS
#  e-mail:  yoh@onerussian.com                              ICQ#: 60653192
#
#  You're welcome to use provided config and send your notes regarding it,
#  but there is no warranty that you don't damage any of your valuable
#  information or grey matter by using it for your own needs
#-----------------\____________________________________/------------------

#
# System configuration file for Mutt
#

#------------------{ Personal information


# default list of header fields to weed when displaying
#
ignore *
unignore date: from:  to cc subject
# x-spam-status date

hdr_order  Date: From: To: Cc: Subject: X-Spam-Status:


# emacs-like bindings
bind editor    "\e<delete>"    kill-word
bind editor    "\e<backspace>" kill-word

# map delete-char to a sane value
bind editor     <delete>  delete-char

# some people actually like these settings
#set pager_stop
#bind pager <up> previous-line
#bind pager <down> next-line

unset wait_key

## Reply and Forward
# don't add the hostname to the From header
unset use_domain
# don't generate a From header
unset use_from
# include orig in reply
set include
# Forward attachments
# This is possibly mutt's only obvious weak area. Forwarding attachments
# isn't particularly good.
set mime_forward=ask-no
set mime_forward_decode
set index_format="%4C %Z %{%b %d} %-15.15F (%4l) %s"
# Specifies how to sort messages in the index menu.
set sort=reverse-threads
set sort_aux=last-date-received

# Exim does not remove Bcc headers
unset write_bcc
# Postfix and qmail use Delivered-To for detecting loops
unset bounce_delivered

# weed out binary-only announcements to -devel-changes
#macro index \CW T!~s\(.*source.*\)\nWn^T~A\n "Weed out binary-only announcements"

# imitate the old search-body function
macro index \eb '/~b ' 'search in message bodies'

# simulate the old url menu
macro index \cb |urlview\n 'call urlview to extract URLs out of a message'
macro pager \cb |urlview\n 'call urlview to extract URLs out of a message'
set pipe_decode

# Show documentation when pressing F1
macro generic <f1> "!zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager\n" "Show Mutt documentation"
macro index   <f1> "!zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager\n" "Show Mutt documentation"
macro pager   <f1> "!zcat /usr/share/doc/mutt/manual.txt.gz | sensible-pager\n" "Show Mutt documentation"

# Use folders which match on \\.gz$ as gzipped folders:
open-hook \\.gz$ "gzip -cd %f > %t"
close-hook \\.gz$ "gzip -c %t > %f"
append-hook \\.gz$ "gzip -c %t >> %f"

# If Mutt is unable to determine your site's domain name correctly, you can
# set the default here.
#
# set hostname=cs.hmc.edu

# If your sendmail supports the -B8BITMIME flag, enable the following
#
# set use_8bitmime

##
## More settings
##

set read_inc=2000	# How often to update the mailbox reading counter
set write_inc=500	# How often to update the mailbox writing counter

# ispell
set ispell="/usr/bin/aspell --mode=email check"

## Address book - lbdb for now
## from http://lists.slug.org.au/archives/slug/2000/October/msg00251.html
set query_command = "lbdbq %s"

#set fast_reply
#set autoedit
#set askcc = no
#set askbcc = no
#set edit_headers = yes
#macro   index   m       "<query>"       "Mail via Query"

##--------------{ Actions
# Prevent asking about moving ! to mbox
set move="no"
set copy="yes"          # Always save a copy of outgoing mails
#set delete="yes"        # Don't ask for mails flagged 'deleted' when exiting
set fcc_attach="yes"    # Save attachments for outgoing messages

set confirmappend="no"  # Don't ask to append a mail
set confirmcreate="yes" # Ask before creating a new folder
set save_empty="no"	# Delete empty folders

## Aliases
set alias_file=~/.mutt/alias
source ~/.mutt/alias

## GNUPG config
source ~/.mutt/gnupg


## Cyrillic and oth
source ~/.mutt/cyrill

## Folders
source ~/.mutt/folders

## Different Emails
source ~/.mutt/emails

source ~/.mutt/mutt.color

source ~/.mutt/lists

# to view html http://www.fefe.de/muttfaq/faq.html
set implicit_autoview


## Spam Reporting
macro index S "|/usr/bin/razor-report"

## Mailcap
# great mutt configuration example http://www.spinnaker.de/mutt/
set mailcap_path='~/.mailcap:~/.mutt/mailcap'	# Use local mailcap only for mutt

# this binds 'z' as toggle zoom
macro pager <ESC>z \
    ":set pager_index_lines=0\n:macro pager z <ESC>Z \"toggle zoom\"\n"
macro pager <ESC>Z \
    ":set pager_index_lines=10\n:macro pager z <ESC>z \"toggle zoom\"\n"
macro pager z  <ESC>z  "toggle zoom"
macro pager "\e1"    "<enter-command>set pager_index_lines=1<enter>"
 # Change PIL size
macro pager "\e2"    "<enter-command>set pager_index_lines=2<enter>"
 # Change PIL size
macro pager "\e3"    "<enter-command>set pager_index_lines=3<enter>"
 # Change PIL size
macro pager "\e4"    "<enter-command>set pager_index_lines=4<enter>"
 # Change PIL size
macro pager "\e5"    "<enter-command>set pager_index_lines=5<enter>"
 # Change PIL size
macro pager "\e6"    "<enter-command>set pager_index_lines=6<enter>"
 # Change PIL size
macro pager "\e7"    "<enter-command>set pager_index_lines=7<enter>"
 # Change PIL size
macro pager "\e8"    "<enter-command>set pager_index_lines=8<enter>"
 # Change PIL size
macro pager "\e9"    "<enter-command>set pager_index_lines=9<enter>"
 # Change PIL size
macro pager "\e0"    "<enter-command>set pager_index_lines=0<enter>"
 # Change PIL size


##---------- Local Configuration
## attempt to make computer specific configuration parts by using
## CVS branching capabilities

source ~/.mutt/localrc


# view urls
macro index \cb |urlview\n
macro pager \cb |urlview\n
