summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gnus.org61
1 files changed, 40 insertions, 21 deletions
diff --git a/gnus.org b/gnus.org
index acac7ec..d4ccd43 100644
--- a/gnus.org
+++ b/gnus.org
@@ -5,7 +5,7 @@
* Feature switching vars
#+begin_src emacs-lisp
(defvar jao-gnus-use-local-imap t)
- (defvar jao-gnus-use-leafnode t)
+ (defvar jao-gnus-use-leafnode nil)
(defvar jao-gnus-use-gandi-imap nil)
(defvar jao-gnus-use-pm-imap nil)
(defvar jao-gnus-use-gmane nil)
@@ -216,15 +216,19 @@
(setq gnus-check-new-newsgroups nil)
(defvar jao-gnus-tracked-groups
- '(("nnimap:bigml/inbox" "B" jao-themes-f00)
+ `(("nnimap:bigml/inbox" "B" jao-themes-f00)
("nnselect:bigml-bugs" "b" jao-themes-error)
("nnimap:bigml/support" "S" default)
("nnimap:jao/inbox" "I" jao-themes-f01)
("nnimap:bigml/[^ibs]" "W" jao-themes-dimm)
("nnimap:jao" "J" jao-themes-dimm)
("nnimap:local" "l" jao-themes-dimm)
- ("nnimap:feeds/[^e]" "F" jao-themes-dimm)
+ ("nnimap:feeds/papers" "P" jao-themes-dimm)
("^gmane\\.emacs\\|nnimap:feeds/emacs" "E" jao-themes-dimm)
+ (,(format "nnimap:feeds/%s"
+ (regexp-opt (seq-difference (directory-files "~/var/mail/feeds")
+ '("emacs" "papers" "trove" "." ".."))))
+ "F" jao-themes-dimm)
("^gmane\\.[^e]\\|^gwene" "N" jao-themes-dimm)))
(defun jao-gnus--unread-counts ()
@@ -437,7 +441,7 @@
(expiry-wait . 7)
(expiry-target . delete)
(jao-gnus--archiving-group "nnimap:feeds/trove"))
- ("^nnimap:feeds/\\(news\\|emacs\\)$" (expiry-wait . 1))
+ ("^nnimap:feeds/\\(news\\|emacs\\|prog\\)$" (expiry-wait . 1))
("^nnimap:feeds/trove"
(auto-expire . nil)
(total-expire . nil))
@@ -446,14 +450,9 @@
(posting-style (address "jao@gnu.org")))))
#+end_src
* Summary buffer
-*** Configuration, summary line
+*** Configuration
#+begin_src emacs-lisp
- (setq gnus-summary-ignore-duplicates t
- gnus-suppress-duplicates t
- gnus-summary-ignored-from-addresses jao-mails-regexp
- gnus-process-mark-toggle t
- gnus-refer-thread-use-search t
- gnus-auto-select-next 'almost-quietly)
+ (setq gnus-face-1 'jao-gnus-face-tree)
(setq gnus-show-threads t
gnus-thread-hide-subtree t
@@ -462,8 +461,23 @@
gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date
gnus-thread-sort-functions '(gnus-thread-sort-by-date))
- (setq gnus-face-1 'jao-gnus-face-tree)
+ (setq gnus-summary-ignore-duplicates t
+ gnus-suppress-duplicates t
+ gnus-summary-ignored-from-addresses jao-mails-regexp
+ gnus-process-mark-toggle t
+ gnus-refer-thread-use-search t
+ gnus-auto-select-next 'almost-quietly)
+ #+end_src
+*** Search
+ #+begin_src emacs-lisp
+ (defun jao-gnus--maybe-reselect (&rest _i)
+ (when (string-match-p "^nnselect" (or (gnus-group-name-at-point) ""))
+ (save-excursion (gnus-group-get-new-news-this-group))))
+ (advice-add 'gnus-group-select-group :before #'jao-gnus--maybe-reselect)
+ #+end_src
+*** Summary line
+ #+begin_src emacs-lisp
(setq gnus-not-empty-thread-mark ?·) ; ↓)
(setq jao-gnus--summary-line-fmt
(concat "%%U %%*%%R %%uj "
@@ -481,12 +495,6 @@
(add-hook 'gnus-select-group-hook 'jao-gnus--set-summary-line)
;; (jao-gnus--set-summary-line 187)
- (defun jao-gnus--maybe-reselect (&rest _i)
- (when (string-match-p "^nnselect" (or (gnus-group-name-at-point) ""))
- (save-excursion (gnus-group-get-new-news-this-group))))
-
- (advice-add 'gnus-group-select-group :before #'jao-gnus--maybe-reselect)
-
(add-to-list 'nnmail-extra-headers 'Cc)
(add-to-list 'nnmail-extra-headers 'BCc)
(add-to-list 'gnus-extra-headers 'Cc)
@@ -503,10 +511,19 @@
"¬" ;; "~"
" "))))
+ (defconst jao-gnus--news-rx
+ (regexp-opt '("ElDiaro.es " "The Guardian: ")))
+
(defun gnus-user-format-function-f (headers)
(let* ((from (gnus-header-from headers))
- (from (gnus-summary-extract-address-component from)))
- (replace-regexp-in-string "ElDiario\\.es *\\|The Guardian: *" "" from)))
+ (from (gnus-summary-extract-address-component from))
+ (shr-width 1000))
+ (if nil ;; (string-match-p ".* .+updates on arXiv.org: +\\(.+\\)" from)
+ (with-temp-buffer
+ (insert (match-string 1 from))
+ (shr-render-buffer (current-buffer))
+ (buffer-string))
+ (replace-regexp-in-string jao-gnus--news-rx "" from))))
(setq gnus-user-date-format-alist
'(((gnus-seconds-today) . "%H:%M")
@@ -652,7 +669,9 @@
(when (re-search-forward "^\\(To\\|Subject\\):" nil t)
(beginning-of-line)
(let ((shr-width 1000))
- (shr-render-region begin (1- (point)))))))))
+ ;; (shr-render-region begin (1- (point)))
+ (w3m-region begin (point))
+ ))))))
(add-hook 'gnus-part-display-hook 'jao-gnus-remove-anchors)