Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (61 sloc) 2.55 KB
;;; Gnus Setup For GMail imap: -*- lexical-binding: nil; -*-
;;{{{ News Source etc
;;; Example:
(eval-after-load "gnus"
(setq gnus-auto-subscribed-groups nil
gnus-auto-subscribed-categories nil)
;;; Set all nnimap options through the select method.
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-user "")
(nnimap-fetch-partial-articles "text/")
;(nnimap-record-commands t) ;for debugging
(nnimap-expunge-on-close always)
(nnimap-stream ssl)))
;;; See for mult-account setup
;;; Use the user as the hostname in your .authinfo file
(defun gm-user-to-nnimap (user)
"Return nnimap select method for sspecified user."
(nnimap-user ,(format "" user))
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-fetch-partial-articles "text/")
(nnimap-expunge-on-close always)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg")))
(setq gnus-secondary-select-methods
(mapcar #'gm-user-to-nnimap
'( "" "emacspeak")))
;;; Fetch news when emacs is idle.
;(gnus-demon-add-handler 'gnus-demon-scan-news 2 t)
;;; use sendmail-send-it if you can send email out directly
send-mail-function 'smtpmail-send-it
smtpmail-smtp-server ""
smtpmail-smtp-service 587
gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
(setq gnus-agent nil)
;;{{{ gnus mode hooks
(setq gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date)
(setq gnus-summary-line-format "%t%U%R%-20,20a %s \n")
(setq gnus-group-line-format "%M%S%p%P%5y: %(%g%)%l \n")
(defun gmail-report-spam ()
"Report the current or marked mails as spam.
This moves them into the Spam folder."
(gnus-summary-move-article nil "[Gmail]/Spam")
(emacspeak-auditory-icon 'task-done))
(define-key gnus-summary-mode-map "$" 'gmail-report-spam)
(provide 'gnus-prepare)