summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-05-12 04:19:52 +0100
committerjao <jao@gnu.org>2021-05-12 04:19:52 +0100
commit36039c39dce9a1dabfd6f0237dedcea475455229 (patch)
treebb288d124d3fa05ce49e389486e8fd9627af2787
parent40676b71815cf8e31f74373c4d34523ca46d1918 (diff)
downloadelibs-36039c39dce9a1dabfd6f0237dedcea475455229.tar.gz
elibs-36039c39dce9a1dabfd6f0237dedcea475455229.tar.bz2
wee gnus tweaks
-rw-r--r--gnus.org26
1 files changed, 11 insertions, 15 deletions
diff --git a/gnus.org b/gnus.org
index 86c71eb..7ab954e 100644
--- a/gnus.org
+++ b/gnus.org
@@ -1,5 +1,5 @@
#+title: Gnus
-#+PROPERTY: header-args :tangle yes :comments yes :results silent
+#+PROPERTY: header-args :tangle ~/.emacs.d/gnus.el :comments yes :results silent
#+auto_tangle: t
* Feature switching vars
@@ -132,10 +132,6 @@
(jao-gnus-use-gmane '(nntp "news.gmane.io"))
(t '(nnnil ""))))
(setq gnus-secondary-select-methods '())
-
- (setq gnus-ignored-newsgroups
- "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]]\"[#'()]")
-
;; nntp options
(setq nnheader-read-timeout 0.02)
#+end_src
@@ -147,9 +143,7 @@
;; imap
(when jao-gnus-use-local-imap
(add-to-list 'gnus-secondary-select-methods
- `(nnimap ""
- (nnimap-expunge immediately)
- (nnimap-address "localhost"))))
+ `(nnimap "" (nnimap-address "localhost"))))
(when jao-gnus-use-pm-imap
(add-to-list 'gnus-secondary-select-methods
@@ -221,7 +215,7 @@
(defun jao-gnus--unread-counts ()
(seq-reduce (lambda (r g)
(let ((n (gnus-group-unread (car g))))
- (if (and n (> n 0)) (cons (cons (car g) n) r) r)))
+ (if (and (numberp n) (> n 0)) (cons (cons (car g) n) r) r)))
gnus-newsrc-alist
()))
@@ -310,6 +304,9 @@
(if (and group message-id)
(org-gnus-follow-link group message-id)
(message "Couldn't get relevant infos for switching to Gnus."))))
+
+ (defalias 'jao-open-gnus-frame 'jao-afio--goto-mail)
+
(eval-after-load "notmuch-show"
'(define-key notmuch-show-mode-map (kbd "C-c C-c")
#'jao-notmuch-goto-message-in-gnus))
@@ -332,7 +329,7 @@
(setq gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n")
(setq gnus-group-uncollapsed-levels 2)
(setq gnus-auto-select-subject 'unread)
- (setq-default gnus-large-newsgroup nil)
+ (setq-default gnus-large-newsgroup 2000)
(add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
@@ -631,14 +628,13 @@
(defun jao-gnus-remove-anchors ()
(save-excursion
(goto-char (point-min))
- (when (re-search-forward "updates on arXiv.org: <a" nil t)
- (let ((begin (- (point) 3)))
+ (when (re-search-forward " .+updates on arXiv.org: +" nil t)
+ (replace-match " ")
+ (let ((begin (point)))
(when (re-search-forward "^\\(To\\|Subject\\):" nil t)
(beginning-of-line)
(let ((shr-width 1000))
- (shr-render-region begin (- (point) 1))
- (goto-char begin)
- (insert " ")))))))
+ (shr-render-region begin (- (point) 1))))))))
(add-hook 'gnus-part-display-hook 'jao-gnus-remove-anchors)