From c1a2f1ec99a5e902ee70444f89fead27f5e563e3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 19 Apr 2015 15:32:37 +0100 Subject: [PATCH] Custom settings for emacs when used with Mutt --- src/freedombone | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/freedombone b/src/freedombone index f57c07df..0a4f30f2 100755 --- a/src/freedombone +++ b/src/freedombone @@ -5821,7 +5821,7 @@ function email_client { echo 'set trash="+Trash"' >> /etc/Muttrc echo 'set spoolfile="~/Maildir"' >> /etc/Muttrc echo 'auto_view text/x-vcard text/html text/enriched' >> /etc/Muttrc - echo 'set editor="emacs"' >> /etc/Muttrc + echo 'set editor="emacs -q --load ~/.emacs-mutt"' >> /etc/Muttrc echo 'set header_cache="+.cache"' >> /etc/Muttrc echo '' >> /etc/Muttrc echo 'macro index S "=.learn-spam" "move to learn-spam"' >> /etc/Muttrc @@ -5895,8 +5895,29 @@ function email_client { echo 'set query_command= "abook --mutt-query \"%s\""' >> /etc/Muttrc echo 'macro index,pager A "abook --add-email-quiet" "add the sender address to abook"' >> /etc/Muttrc + # create an Emacs configuration specifically for use with Mutt, which + # has word wrap and spell checking on by default + echo "(add-hook 'before-save-hook 'delete-trailing-whitespace)" > /home/$MY_USERNAME/.emacs-mutt + echo '(setq org-support-shift-select t)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq standard-indent 4)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq-default tab-width 4)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq c-basic-offset 4)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(mouse-wheel-mode t)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq make-backup-files t)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq version-control t)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq backup-directory-alist (quote ((".*" . "~/.emacs_backups/"))))' >> /home/$MY_USERNAME/.emacs-mutt + echo "(setq default-major-mode 'text-mode)" >> /home/$MY_USERNAME/.emacs-mutt + echo "(dolist (hook '(text-mode-hook))" >> /home/$MY_USERNAME/.emacs-mutt + echo ' (add-hook hook (lambda () (flyspell-mode 1))))' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq-default fill-column 72)' >> /home/$MY_USERNAME/.emacs-mutt + echo '(setq auto-fill-mode 0)' >> /home/$MY_USERNAME/.emacs-mutt + echo "(add-hook 'text-mode-hook 'turn-on-auto-fill)" >> /home/$MY_USERNAME/.emacs-mutt + echo "(setq-default auto-fill-function 'do-auto-fill)" >> /home/$MY_USERNAME/.emacs-mutt + cp -f /etc/Muttrc /home/$MY_USERNAME/.muttrc touch /home/$MY_USERNAME/.mutt-alias + chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.emacs-mutt + cp /home/$MY_USERNAME/.emacs-mutt /etc/skel chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.muttrc chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/.mutt-alias