diff options
author | 2016-10-19 21:04:23 +0200 | |
---|---|---|
committer | 2016-10-19 21:04:23 +0200 | |
commit | 5a665e317cbb191714fd6e778f9d223490fd6745 (patch) | |
tree | 061a8aa6783b2bb7e34e5908552e7df8027a5c51 /emacs/.emacs.d/init/oni-gnus-init.org | |
parent | a0b9627c7f3e13fa7dbf6d128ad03047572f9ad2 (diff) | |
download | new-dotfiles-5a665e317cbb191714fd6e778f9d223490fd6745.tar.gz new-dotfiles-5a665e317cbb191714fd6e778f9d223490fd6745.zip |
Move Gnus config to separate file
Diffstat (limited to 'emacs/.emacs.d/init/oni-gnus-init.org')
-rw-r--r-- | emacs/.emacs.d/init/oni-gnus-init.org | 128 |
1 files changed, 128 insertions, 0 deletions
diff --git a/emacs/.emacs.d/init/oni-gnus-init.org b/emacs/.emacs.d/init/oni-gnus-init.org new file mode 100644 index 0000000..780b845 --- /dev/null +++ b/emacs/.emacs.d/init/oni-gnus-init.org @@ -0,0 +1,128 @@ +Gnus is one of the most extensible Email programs on the +planet. And it's not even made for email but NNTP. + +#+BEGIN_SRC emacs-lisp + (require 'gnus) + (require 'gnus-msg) + (require 'mail-source) + (require 'message) + (require 'nnfolder) + (require 'sendmail) + + (require 'oni-helpers) +#+END_SRC + +Store all Gnus-related data in my data directory. + +#+BEGIN_SRC emacs-lisp + (setq gnus-directory (oni:data-location "News") + gnus-article-save-directory gnus-directory + gnus-cache-directory gnus-directory + gnus-kill-files-directory gnus-directory) +#+END_SRC + +Store all Mail source-related data in my data directory. + +#+BEGIN_SRC emacs-lisp + (setq mail-source-directory (oni:data-location "Mail")) +#+END_SRC + +Store all message-related data in the same place as the Mail source +data. + +#+BEGIN_SRC emacs-lisp + (setq message-directory (oni:data-location "Mail")) +#+END_SRC + +Store all nnfolder-related data in the same place as the Mail +source data. + +#+BEGIN_SRC emacs-lisp + (setq nnfolder-directory (oni:data-location "Mail")) +#+END_SRC + +Use msmtp to send mail. + +#+BEGIN_SRC emacs-lisp + (setq send-mail-function 'sendmail-send-it) + (setq sendmail-program "/usr/bin/msmtp") +#+END_SRC + +Tell Gnus I'm not a novice anymore. One of the features of Gnus I +use a lot is deleting messages and as long as Gnus thinks I'm a +novice it will ask me if I'm sure every single time. + +#+BEGIN_SRC emacs-lisp + (setq gnus-novice-user nil) +#+END_SRC + +Add a keybinding to the Gnus summary mode to easily delete +messages. + +#+BEGIN_SRC emacs-lisp + (define-key gnus-summary-mode-map (kbd "M-d") 'oni-gnus-delete-forward) +#+END_SRC + +* ryuslash.org + + Set my main email address as the primary select method for Gnus. + + #+BEGIN_SRC emacs-lisp + (setq gnus-select-method + '(nnmaildir "ryuslash" (directory "~/documents/mail/ryuslash/"))) + #+END_SRC + + When sending mail from the ryuslash inbox, use the ryuslash msmtp + account. + + #+BEGIN_SRC emacs-lisp + (add-to-list 'gnus-posting-styles + '(".*" + (address "tom@ryuslash.org") + (eval (setq message-sendmail-extra-arguments + '("-a" "ryuslash"))))) + #+END_SRC + +* picturefix + + Add my work email account as a secondary select method. + + #+BEGIN_SRC emacs-lisp + (add-to-list 'gnus-secondary-select-methods + '(nnmaildir "picturefix" + (directory "~/documents/mail/picturefix/"))) + #+END_SRC + + When sending mail from the picturefix account, use the picturefix + msmtp account and set the proper name and email address. + + #+BEGIN_SRC emacs-lisp + (add-to-list 'gnus-posting-styles + '("picturefix:" + (name "Tom Willemsen") + (address "tom@picturefix.nl") + (eval (setq message-sendmail-extra-arguments + '("-a" "picturefix"))))) + #+END_SRC + +* gmail + + Add my other personal email as a secondary select method. + + #+BEGIN_SRC emacs-lisp + (add-to-list 'gnus-secondary-select-methods + '(nnmaildir "gmail" + (directory "~/documents/mail/gmail/"))) + #+END_SRC + + When sending mail from the gmail account, use the gmail msmtp + accound and set the proper email address. + + #+BEGIN_SRC emacs-lisp + (add-to-list 'gnus-posting-styles + '("gmail:" + (name "Tom Willemse") + (address "ryuslash@gmail.com") + (eval (setq message-sendmail-extra-arguments + '("-a" "gmail"))))) + #+END_SRC |