(setq load-path (cons "/home/adam/.emacs.d/lisp" load-path)) (setq load-path (cons "/home/adam/.emacs.d/lisp/vendor" load-path)) (require 'notmuch) (require 'notmuch-address) (setq inhibit-splash-screen t) ;; Colour files (C++ files and others) by syntax to make them more readable: (global-font-lock-mode t) ;; Highlight all syntax categories: (setq font-lock-maximum-decoration t) ;; The following key-binding quits emacs -- we disable it too: (global-unset-key "\C-x\C-c") ;; But we establish a longer sequence that is harder to hit by accident: (global-set-key "\C-x\C-c\C-v" 'save-buffers-kill-emacs) ;; ________________________________________________________________ ;; Font lock mode (colours) ;; ________________________________________________________________ (require 'color-theme-gruber-darker) (set-face-foreground (quote region) "LemonChiffon") (set-face-background (quote region) "DarkSlateGrey") (defvar backup-dir (concat "/tmp/emacs_" (user-login-name) "/")) (setq backup-directory-alist (list (cons "." backup-dir))) (setq notmuch-address-command "/home/adam/.local/bin/address-lookup") (notmuch-address-message-insinuate) (setq message-auto-save-directory "/tmp/maildrafts") ;; Custom keybindings (define-key notmuch-show-mode-map "e" 'notmuch-show-archive-thread-then-exit) (define-key notmuch-search-mode-map "e" 'notmuch-search-archive-thread) (define-key notmuch-search-mode-map "u" 'notmuch-search-quit) (define-key notmuch-show-mode-map "u" 'notmuch-kill-this-buffer) (define-key notmuch-search-mode-map "c" 'notmuch-mua-new-mail) (define-key notmuch-show-mode-map "c" 'notmuch-mua-new-mail) (define-key notmuch-hello-mode-map "c" 'notmuch-mua-new-mail) (define-key notmuch-show-mode-map "l" 'notmuch-show-add-tag) (define-key notmuch-search-mode-map "l" 'notmuch-search-add-tag) (global-set-key [f1] 'goto-line) ;; SMTP (require 'smtpmail) (setq starttls-use-gnutls t starttls-gnutls-program "gnutls-cli" starttls-extra-arguments '("--insecure")) ;;(setq smtpmail-debug-info t) (setq message-send-mail-function 'smtpmail-send-it) (setq smtpmail-smtp-server "smtp.example.com") (setq smtpmail-smtp-service 587) (setq smtpmail-starttls-credentials '(("smtp.example.com" 587 nil nil))) (setq my-username (substring (shell-command-to-string "python ~/.offlineimap.py u exchange.example.com 2>/dev/null") 0 -1)) (setq my-password (substring (shell-command-to-string "python ~/.offlineimap.py p exchange.example.com 2>/dev/null") 0 -1)) (setq smtpmail-auth-credentials (list (list "smtp.example.com" 587 my-username my-password))) (custom-set-variables '(notmuch-decimal-separator ".") '(notmuch-fcc-dirs "Sent Items") '(notmuch-saved-searches (quote (("unread" . "tag:unread") ("inbox" . "tag:inbox") ("sent" . "tag:sent") ("bugzilla" . "tag:bugzilla") ("all mail" . "*")))) '(notmuch-search-oldest-first nil) '(notmuch-show-all-tags-list t) '(split-height-threshold nil) '(split-width-threshold 0))