L'uso di questo sito
autorizza anche l'uso dei cookie
necessari al suo funzionamento.
(Altre informazioni)

Monday, October 7, 2013

Back to the ole tty

Perhaps to certify my incipient old fart status, I have set myself to the task of not needing a gui mail client anymore. So I strung together mutt, my old mainstay emacs, threw in the very good Google book script, spruced it up with the (dark) solarized color theme, added some mailcap bits to keep in check those pesky html messages, and churned it with the help of a ton google searches.

Now, I can read a message write the answer and send it email by using a total of two mouse clicks. I could do it with zero mouse clicks, if I had really gone teletype and occupied my entire workspace with a big, honkin' terminal window (I don't), or if I mastered the ever-shifting keystrokes that my current window manager uses to switch windows (I won't). Also I could (acrobatically) be running mutt within emacs (with term.el). I am afraid to go down that path, though, lest I meet madness there.

As things are, I am reading mail in a mutt terminal window in my left monitor, and write it in an emacs frame in my left monitor - so i need to move the mouse from one to the other (and click the frames - uhm, perhaps I'll go back to implicit focus, how's that for the good old times?).

Thunderbird keeps lurking in the bottom-most workspace for when I am not coding  or somehow busy with a terminal window, or for when I really need access to a non-text attachment, which is seldom. I'll keep the VGA viewers, text-only mode and no window manager for the time when old age will make me really grumpy.

In this spirit, I am not going to insert the mandatory desktop snapshot (also: how do you snap on two monitors?) , but you can see my config (minus the color theme, that is). For the inquiring minds, I am on a Linux Fedora core 18 desktop, the mail server runs a Linux CentOS6 OS, with dovecot as mail server.

File ~/.muttrc
set realname="Alessandro Forghieri"
my_hdr From: Alessandro Forghieri
set use_from = yes
set envelope_from = "yes"
set spoolfile="imaps://alf@my.nyfty-imap-host.it/"
set folder="imaps://my.nyfty-imap-host.it/"
#I like my answers copied to inbox
set record="="
set postponed="=Drafts"
bind index "^" imap-fetch-mail
set edit_hdrs
set mailcap_path=~/.mutt/mailcap
auto_view text/html
alternative_order text/plain text/html
set editor=emacsclient
set sort=threads
set narrow_tree
#----------------090address-book and aliases
set query_command="goobook query '%s'"
macro index,pager A "goobook add" "add sender to google contacts"
bind editor complete-query
alias alf Alessandro Forghieri ;

File ~/.mutt/mailcap
audio/*; /usr/bin/xdg-open %s
image/*; /usr/bin/xdg-open %s
application/msword; /usr/bin/xdg-open %s
application/pdf; /usr/bin/xdg-open %s
application/postscript ; /usr/bin/xdg-open %s
text/html; elinks -dump %s ; copiousoutput;

File ~/.emacs (excerpt)

  (add-to-list 'auto-mode-alist '("/mutt" . mail-mode))
  (defun my-mail-mode-hook ()
    (auto-fill-mode 1)
    (abbrev-mode 1)
    (local-set-key "\C-Xk" 'server-edit))
  (add-hook 'mail-mode-hook 'my-mail-mode-hook)

No comments: