diff options
author | JSDurand <mmemmew@gmail.com> | 2021-08-11 08:56:01 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2021-08-11 08:56:01 +0800 |
commit | 32f58f09d0236f08f04b9c4e1b15313a0cd00eee (patch) | |
tree | 9072581f8ffba61a8683c21c948306e1bd12a414 /gnus-conf.el | |
parent | c7ddcfb446b45f3ae9bc1919eb351139c1734086 (diff) |
new: gnus disable auto-save for dribble file
* gnus-conf.el (gnus): add an advice to disable auto-save-mode for the
dribble file.
Diffstat (limited to 'gnus-conf.el')
-rw-r--r-- | gnus-conf.el | 46 |
1 files changed, 37 insertions, 9 deletions
diff --git a/gnus-conf.el b/gnus-conf.el index bbbd17a..7be8509 100644 --- a/gnus-conf.el +++ b/gnus-conf.el @@ -15,7 +15,7 @@ ;; (nnimap-server-port 143)) )) -;; repunctuate sentences +;;; repunctuate sentences (add-hook 'gnus-part-display-hook 'gnus-treat-repunctuate) @@ -27,15 +27,15 @@ (goto-char (point-min)) (repunctuate-sentences t))) -;; To be able to see the encrypted mails sent by me. +;;; To be able to see the encrypted mails sent by me. (setq mml-secure-openpgp-encrypt-to-self t) -;; mail aliases +;;; mail aliases (setq message-mail-alias-type 'abbrev) -;; Decryptions and signatures +;;; Decryptions and signatures (setq gnus-buttonized-mime-types '("multipart/signed" "multipart/alternative")) @@ -44,13 +44,15 @@ (setq mm-verify-option 'known) -;; Update by mu4e +;;; Update by mu4e (declare-function #'mu4e-update-mail-and-index "mu4e" (RUN-IN-BACKGROUND)) (define-key gnus-group-mode-map (vector 117) #'mu4e-update-mail-and-index) (define-key global-map (vector ?\C-c ?g) 'gnus) +;;; user settings + (setq gnus-ignored-from-addresses "mmemmew@gmail.com") (setq send-mail-function #'smtpmail-send-it) @@ -66,6 +68,8 @@ (setq nnmail-expiry-wait 'immediate) +;;; parameters + (setq gnus-parameters '((".*" (posting-style @@ -74,6 +78,8 @@ (require 'gnus-msg) +;;; posting style + (setf gnus-posting-styles '((".*" (signature "李俊緯") @@ -99,6 +105,8 @@ (setq gnus-use-dribble-file t) (setq gnus-always-read-dribble-file nil) +;;; treatings + (setq gnus-treat-display-smileys nil) (setq gnus-treat-emphasize t) (setq gnus-treat-fill-article nil) @@ -106,6 +114,8 @@ (add-hook 'gnus-group-mode-hook 'gnus-topic-mode) +;;; group line format + (setq gnus-group-line-format "%M%S%p%P%5y:%B%(%g%)\n") ;; (setq gnus-topic-alist @@ -115,27 +125,34 @@ ;; ("emacs") ;; ("Gnus" "nndraft:drafts"))) +;;; thread sorting + (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) + +;;; activate level + +(setq gnus-activate-level 4) + (setq gnus-ignored-from-addresses "mmemmew\\.com") -;; move between topics +;;; 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) -;; exiting +;;; exiting + (define-key gnus-group-mode-map (vector ?q) #'bury-buffer) (define-key gnus-group-mode-map (vector ?x) #'gnus-group-exit) -;;; agent settings +;;; agent key bindings (require 'gnus-agent) @@ -194,3 +211,14 @@ (setq gnus-sum-thread-tree-single-leaf "└─> ") (setq gnus-sum-thread-tree-vertical "│") (setq gnus-summary-thread-gathering-function 'gnus-gather-threads-by-subject) + +;;; disable auto-save for newrc file + +(defun durand-disable-auto-save-for-newsrc-ad (&rest _args) + "Disable auto-save for newsrc file." + (cond + ((get-buffer ".newsrc-dribble") + (with-current-buffer ".newsrc-dribble" + (setq-local buffer-auto-save-file-name nil))))) + +(advice-add #'gnus :after #'durand-disable-auto-save-for-newsrc-ad) |