summaryrefslogtreecommitdiffhomepage
path: root/gnus.org
diff options
context:
space:
mode:
Diffstat (limited to 'gnus.org')
-rw-r--r--gnus.org76
1 files changed, 35 insertions, 41 deletions
diff --git a/gnus.org b/gnus.org
index 3185891..faadeec 100644
--- a/gnus.org
+++ b/gnus.org
@@ -138,7 +138,7 @@
(remove-prefix ,prefix)
(config-file ,config))))
- (add-to-list 'gnus-parameters '("^nnselect:.*" (nnselect-rescan t)))
+ (add-to-list 'gnus-parameters '("^nnselect:.*" (nnselect-rescan . t)))
#+end_src
* News server
@@ -172,10 +172,11 @@
#+end_src
*** nnml
#+begin_src emacs-lisp
- (setq mail-sources (when jao-gnus-use-nnml
- '((file :path "/var/mail/jao")
- (maildir :path "~/tmp/mail/spam/")
- (maildir :path "~/tmp/mail/trash/")))
+ (setq mail-sources
+ (when jao-gnus-use-nnml
+ (cons '(file :path "/var/mail/jao")
+ (mapcar (lambda (d) `(maildir :path ,(concat d "/")))
+ (directory-files "~/var/mail" t "[^\\.]"))))
gnus-message-archive-group nil
nnml-get-new-mail t
nnml-directory message-directory)
@@ -185,16 +186,6 @@
'gnus-secondary-select-methods
`(nnml "" ,(jao-gnus--notmuch-engine nnml-directory "notmuch.config"))))
- (defun jao-gnus-nnml--add-maildirs (dir)
- (dolist (f (directory-files (concat "~/tmp/mail/" dir) t "[^\\.]"))
- (add-to-list 'mail-sources `(maildir :path ,(concat f "/")))))
-
- (when jao-gnus-use-nnml
- (dolist (dir '("jao" "bigml" "feeds"))
- (jao-gnus-nnml--add-maildirs dir)))
-
- (defvar jao-gnus-image-groups '("xkcd"))
-
(defvar jao-gnus-nnml-group-params
`(("nnml:\\(local\\|trash\\|spam\\)"
(auto-expire . t)
@@ -207,19 +198,17 @@
(jao-gnus--trash-group "nnml:trash")
(jao-gnus--spam-group "nnml:spam")
(jao-gnus--archiving-group "nnml:jao.trove"))
- ("nnml:\\(jao\\|bigml\\)\\.\\(trash\\|spam\\)"
+ ("nnml:bigml\\..*"
(gcc-self . nil)
(auto-expire . t)
(total-expire . t)
- (expiry-wait . 1)
- (jao-gnus--trash-group nil)
- (expiry-target . delete))
- ("nnml:bigml\\..*"
+ (expiry-wait . 3)
+ (expiry-target . delete)
(posting-style (address "jao@bigml.com"))
(jao-gnus--trash-group "nnml:trash")
(jao-gnus--spam-group "nnml:spam")
(jao-gnus--archiving-group "nnml:bigml.trove"))
- ("nnml:bigml\\.inbox"
+ ("nnml:bigml\\.\\(inbox\\|support\\)"
(gcc-self . t)
(auto-expire . t)
(total-expire . t)
@@ -230,15 +219,6 @@
(total-expire . t)
(expiry-target . delete)
(expiry-wait . 365))
- (,(format "^nnml:bigml\\.%s" (regexp-opt '("support" "reports"
- "deploys" "lists"
- "drivel" "bugs")))
- (jao-gnus--trash-group nil)
- (gcc-self . nil)
- (auto-expire . t)
- (total-expire . t)
- (expiry-wait . 3)
- (expiry-target . delete))
("nnml:jao\\.drivel"
(auto-expire . t)
(total-expire . t)
@@ -252,20 +232,32 @@
(comment . "feeds.\\1")
(jao-gnus--archiving-group "nnml:feeds.trove"))
("^nnml:feeds\\.\\(news\\)$" (expiry-wait . 2))
- ("^nnml:feeds\\.erlang" (gnus-list-identifiers "Erlang Forums"))
- ("nnml:feeds\\.trove"
+ ("nnml:feeds\\.\\(trove\\|lobsters\\)"
(auto-expire . nil)
(total-expire . nil))
- (,(format "nnml:feeds\\.fun\\|gwene\\..*%s.*"
- (regexp-opt jao-gnus-image-groups))
+ ("nnml:feeds\\.fun"
+ (mm-html-inhibit-images nil)
+ (mm-html-blocked-images nil))))
+
+ (when jao-gnus-use-nnml
+ (dolist (p jao-gnus-nnml-group-params)
+ (add-to-list 'gnus-parameters p t)))
+
+ #+end_src
+*** leafnode
+ #+begin_src emacs-lisp
+ (defvar jao-gnus-image-groups '("xkcd"))
+
+ (defvar jao-gnus-leafnode-group-params
+ `((,(format "gwene\\..*%s.*" (regexp-opt jao-gnus-image-groups))
(mm-html-inhibit-images nil)
(mm-html-blocked-images nil))
("\\(gmane\\|gwene\\)\\..*"
(jao-gnus--archiving-group "nnml:feeds.trove")
(posting-style (address "jao@gnu.org")))))
- (when jao-gnus-use-nnml
- (dolist (p jao-gnus-nnml-group-params)
+ (when jao-gnus-use-leafnode
+ (dolist (p jao-gnus-leafnode-group-params)
(add-to-list 'gnus-parameters p t)))
#+end_src
@@ -304,8 +296,8 @@
(setq mail-user-agent 'gnus-user-agent)
(require 'gnus-demon)
- (gnus-demon-add-handler 'jao-gnus-notify 5 1)
- ;; (gnus-demon-remove-handler 'jao-gnus-notify)
+ (gnus-demon-add-handler 'gnus-demon-scan-news 5 1)
+ ;; (gnus-demon-remove-handler 'gnus-demon-scan-news)
;; synchronicity
(setq gnus-asynchronous t)
@@ -356,8 +348,10 @@
jao-gnus-tracked-groups))))
(defun jao-gnus--notify ()
- (setq jao-gnus--notify-strs (jao-gnus--notify-strs))
- (save-window-excursion (jao-minibuffer-refresh)))
+ (let ((inhibit-message t))
+ (shell-command-to-string "index-mail.sh")
+ (setq jao-gnus--notify-strs (jao-gnus--notify-strs))
+ (save-window-excursion (jao-minibuffer-refresh))))
(add-hook 'gnus-after-getting-new-news-hook #'jao-gnus--notify)
(add-hook 'gnus-started-hook #'jao-gnus--notify)
@@ -416,7 +410,7 @@
#+begin_src emacs-lisp
;; (setq gnus-group-line-format " %m%S%p%P:%~(pad-right 35)c %3y %B\n")
;; (setq gnus-group-line-format " %m%S%p%3y%P%* %~(pad-right 30)C %B\n")
- (setq gnus-group-line-format " %m%S%p%3y%P%* %~(pad-right 30)c %B\n")
+ (setq gnus-group-line-format " %m%S%p%3y%P%* %~(pad-right 30)G %B\n")
(setq gnus-topic-line-format "%i[ %(%{%n%}%) -- %A ]%v\n")
(setq gnus-group-uncollapsed-levels 2)
(setq gnus-auto-select-subject 'unread)