diff options
Diffstat (limited to 'gnus-conf.el')
-rw-r--r-- | gnus-conf.el | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/gnus-conf.el b/gnus-conf.el new file mode 100644 index 0000000..1a5ff18 --- /dev/null +++ b/gnus-conf.el @@ -0,0 +1,142 @@ +;;; gnus-conf.el --- My Gnus configurations -*- lexical-binding: t; -*- + +(require 'gnus) + +(setq gnus-select-method '(nnnil "")) +(setq gnus-secondary-select-methods + '((nntp "news.gmane.io") + (nnmaildir "private" (directory "~/.nnmaildir")) + (nnmaildir "sent" (directory "~/.nnmaildir")))) + +(setq gnus-ignored-from-addresses "mmemmew@gmail.com") + +(set 'gnus-novice-user nil) + +(setq nnmail-expiry-wait 'immediate) + +(setq gnus-parameters + '((".*" + (posting-style + (gcc "nnmaildir+private:Sent") + (From (format "%s" user-full-name)))))) + +(require 'gnus-msg) + +(setf gnus-posting-styles + '((".*" + (signature "李俊緯") + (address "mmemmew@gmail.com") + (name "Durand")) + ((header "from" "protesilaos") + (signature "Sévère Durand")) + ((header "from" "tan\\|mlh\\|hsialc") + (name "李俊緯") + (signature "生 俊緯")))) + +(setq gnus-gcc-mark-as-read t) + +;;; Call me an expert. + +(setq gnus-expert-user t) + +(setq gnus-agent t) + +(setq gnus-check-new-newsgroups 'ask-server) +(setq gnus-read-active-file 'some) + +(setq gnus-use-dribble-file t) +(setq gnus-always-read-dribble-file nil) + +(setq gnus-treat-display-smileys nil) +(setq gnus-treat-emphasize t) +(setq gnus-treat-fill-article nil) +(setq gnus-summary-goto-unread 'never) + +(add-hook 'gnus-group-mode-hook 'gnus-topic-mode) + +(setq gnus-group-line-format "%M%S%p%P%5y:%B%(%g%)\n") + +;; (setq gnus-topic-alist +;; '(("devel" "gmane.emacs.devel") +;; ("orgmode" "gmane.emacs.orgmode") +;; ("bug" "gmane.emacs.bugs") +;; ("emacs") +;; ("Gnus" "nndraft:drafts"))) + +(setq gnus-thread-sort-functions + '(gnus-thread-sort-by-most-recent-date + gnus-thread-sort-by-most-recent-number)) +(setq gnus-activate-level 4) + +(setq gnus-subthread-sort-functions + 'gnus-thread-sort-by-date) + +(setq gnus-thread-hide-subtree nil) +(setq gnus-ignored-from-addresses "mmemmew\\.com") + +;;; move between topics + +(define-key gnus-group-mode-map [?\M-n] 'gnus-topic-goto-next-topic) +(define-key gnus-group-mode-map [?\M-p] 'gnus-topic-goto-previous-topic) + +(define-key gnus-group-mode-map (vector ?q) #'bury-buffer) + +;;; agent settings + +(require 'gnus-agent) + +(define-key gnus-agent-summary-mode-map (vector ?$) #'previous-line) +(define-key gnus-agent-summary-mode-map (vector ?ù) #'next-line) +(define-key gnus-agent-summary-mode-map (vector ?n) #'gnus-summary-next-article) +(define-key gnus-agent-summary-mode-map (vector ?p) #'gnus-summary-prev-article) +(define-key gnus-agent-summary-mode-map (vector ?N) #'gnus-summary-next-unread-article) +(define-key gnus-agent-summary-mode-map (vector ?P) #'gnus-summary-prev-unread-article) +(define-key gnus-agent-summary-mode-map (vector ?o) #'gnus-summary-save-article) +(define-key gnus-agent-summary-mode-map (vector ?y) #'gnus-summary-scroll-down) +(define-key gnus-agent-summary-mode-map (vector ?!) #'gnus-summary-mark-as-processable) +(define-key gnus-agent-summary-mode-map (vector ?\M-n) #'gnus-summary-next-thread) +(define-key gnus-agent-summary-mode-map (vector ?\M-p) #'gnus-summary-prev-thread) +(define-key gnus-agent-summary-mode-map (vector ?\C-\M-n) #'gnus-summary-next-group) +(define-key gnus-agent-summary-mode-map (vector ?\C-\M-p) #'gnus-summary-prev-group) +(define-key gnus-agent-summary-mode-map (vector ?z ?t) #'recenter-to-top) +(define-key gnus-agent-summary-mode-map (vector ?z ?b) #'recenter-to-bottom) +(define-key gnus-agent-summary-mode-map (vector ?z ?z) #'recenter-to-middle) + +(define-key gnus-agent-group-mode-map (vector ?n) #'gnus-group-next-group) +(define-key gnus-agent-group-mode-map (vector ?p) #'gnus-group-prev-group) +(define-key gnus-agent-group-mode-map (vector ?N) #'gnus-group-next-unread-group) +(define-key gnus-agent-group-mode-map (vector ?P) #'gnus-group-prev-unread-group) + +;;; article + +(require 'gnus-art) + +(define-key gnus-article-mode-map [?z ?t] 'recenter-to-top) +(define-key gnus-article-mode-map [?z ?b] 'recenter-to-bottom) +(define-key gnus-article-mode-map [?z ?z] 'recenter-to-middle) +(define-key gnus-article-mode-map [?o] 'gnus-mime-inline-part) + +(setq gnus-article-sort-functions + '((not gnus-article-sort-by-number) + (not gnus-article-sort-by-date))) +(setq gnus-html-frame-width 80) +(setq gnus-inhibit-images nil) +(setq gnus-max-image-proportion 0.7) + +;;; Summary + +(setq gnus-auto-select-first nil) +(setq gnus-summary-ignore-duplicates t) +(setq gnus-suppress-duplicates t) +(setq gnus-summary-goto-unread 'never) +(setq gnus-summary-to-prefix "To: ") +(setq gnus-summary-line-format "%U%R%z %-16,16&user-date; %4L:%-30,30f %B%s\n") +(setq gnus-summary-mode-line-format "%p") +(setq gnus-summary-make-false-root 'adopt) +(setq gnus-sum-thread-tree-false-root "─┬> ") +(setq gnus-sum-thread-tree-indent " ") +(setq gnus-sum-thread-tree-leaf-with-other "├─> ") +(setq gnus-sum-thread-tree-root "") +(setq gnus-sum-thread-tree-single-leaf "└─> ") +(setq gnus-sum-thread-tree-vertical "│") +(setq gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject) |