Gnus configuration
Here is the configuration for Gnus.
(load-library "smtpmail")
(load-library "nnimap")
(load-library "starttls")
(setq gnus-select-method '(nntp "news.gmane.org"))
(setq gnus-secondary-select-methods
'((nnml "")
(nnimap "imap.gmail.com"
(nnimap-address "imap.gmail.com")
(nnimap-server-port 993)
(nnimap-authinfo-file "~/.imap-authinfo")
(nnimap-expunge-on-close 'never)
(nnimap-stream ssl))))
(setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil))
smtpmail-smtp-server "smtp.gmail.com"
smtpmail-default-smtp-server "smtp.gmail.com"
send-mail-function 'smtpmail-send-it
message-send-mail-function 'smtpmail-send-it
smtpmail-smtp-service 587
smtpmail-auth-credentials
'(("smtp.gmail.com" 587 "ykabhinav@gmail.com" nil)))
(add-hook 'gnus-topic-mode-hook 'gnus-topic-mode)
;(setq gnus-summary-rescan-group 'all)
;(setq gnus-permanently-visible-groups ".*INBOX")
(setq gnus-thread-sort-functions
'(gnus-thread-sort-by-most-recent-date
(not gnus-thread-sort-by-total-score)))
(gnus-demon-add-handler 'gnus-group-get-new-news 5 nil)
(cond (window-system
(setq custom-background-mode 'light)
(defface my-group-face-1
'((t (:foreground "Red" :bold t))) "First group face")
(defface my-group-face-2
'((t (:foreground "DarkSeaGreen4" :bold t)))
"Second group face")
(defface my-group-face-3
'((t (:foreground "Green4" :bold t))) "Third group face")
(defface my-group-face-4
'((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
(defface my-group-face-5
'((t (:foreground "Blue" :bold t))) "Fifth group face")))
(setq gnus-group-highlight
'(((> unread 200) . my-group-face-1)
((and (< level 3) (zerop unread)) . my-group-face-2)
((< level 3) . my-group-face-3)
((zerop unread) . my-group-face-4)
(t . my-group-face-5)))
(setq-default
gnus-summary-line-format "%U%R%z %(%&user-date; %-15,15f %* %B%s%)\n"
gnus-user-date-format-alist '((t . "%Y-%m-%d %H:%M"))
gnus-summary-thread-gathering-function 'gnus-gather-threads-by-references
gnus-thread-sort-functions '(gnus-thread-sort-by-date)
gnus-sum-thread-tree-false-root ""
gnus-sum-thread-tree-indent " "
gnus-sum-thread-tree-leaf-with-other "|-> "
gnus-sum-thread-tree-root ""
gnus-sum-thread-tree-single-leaf "\-> "
gnus-sum-thread-tree-vertical "│")
(setq gnus-use-cache t)