X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/0c639fd6d6ff3b3b5dfb3efe6c60cafa4d16a2e4..d24eae26fe96001540a169eb467c4457e82f0b78:/dot/gnus.el diff --git a/dot/gnus.el b/dot/gnus.el index d3ca4f6..91d5d81 100644 --- a/dot/gnus.el +++ b/dot/gnus.el @@ -41,13 +41,14 @@ gnus-sum-thread-tree-false-root ">" gnus-sum-thread-tree-single-indent "=" gnus-sum-thread-tree-indent " ") -(if (eq (coding-system-get (terminal-coding-system) 'mime-charset) 'utf-8) +(if (memq (coding-system-get (terminal-coding-system) 'mime-charset) + '(nil utf-8)) (setq gnus-sum-thread-tree-leaf-with-other "├─>" gnus-sum-thread-tree-vertical "│ " gnus-sum-thread-tree-single-leaf "╰─>") (setq gnus-sum-thread-tree-leaf-with-other "|->" gnus-sum-thread-tree-vertical "| " - gnus-sum-thread-tree-single-leaf "'->")) + gnus-sum-thread-tree-single-leaf "`->")) ;; Sort threads in a useful way. (setq gnus-thread-sort-functions @@ -55,6 +56,17 @@ gnus-thread-sort-by-subject gnus-thread-sort-by-total-score)) +;; Configure the crypto. +(setq mm-verify-option 'known + mm-sign-option 'guided + mm-decrypt-option 'never) + +;; Tracking available groups. These should work for sane servers, but maybe +;; they'll need hacking in the local file. +(setq gnus-save-killed-list nil + gnus-check-bogus-newsgroups nil + gnus-read-active-file 'ask-server) + ;; Use one article buffer per group. (setq gnus-single-article-buffer nil) @@ -73,11 +85,33 @@ ;; We may have the misfortune to talk to an Exchange server. (setq imap-enable-exchange-bug-workaround t) +;; Save articles in mbox format by default, of course, and save an entire +;; batch with the same name. +(setq gnus-prompt-before-saving t + gnus-default-article-saver 'gnus-summary-save-in-mail) + +;; Clean up properly when closing the summary. +(defadvice gnus-summary-exit (before mdw-kill-debris compile activate) + (gnus-summary-expand-window)) + +;; Configure article display a bit. +(defun mdw-gnus-article-setup () + (setq truncate-lines nil + truncate-partial-width-windows nil + word-wrap t + wrap-prefix (concat (propertize "..." 'face 'mdw-ellipsis-face) + " "))) +(add-hook 'gnus-article-mode-hook #'mdw-gnus-article-setup) + ;;;-------------------------------------------------------------------------- ;;; Local configuration. ;; Fetching news from the local news server seems sensible. -(setq gnus-select-method `(nntp ,(mdw-config 'nntp-server))) +(setq gnus-select-method + (let ((server (mdw-config 'nntp-server))) + (if server + `(nntp ,server) + '(nnnil "")))) ;; Now load a local configuration file. (load "~/.gnus-local.el")