summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-11-08 00:47:34 +0000
committerjao <jao@gnu.org>2021-11-08 00:48:11 +0000
commit66988068b79ca5677c4c7f4fed66a815a1b33d53 (patch)
tree2ef25a295f7cebf5f21bf82167b30510321e1d26 /lib
parent766c3a3b66f7af3f1d32306b8c494d2a6abe5662 (diff)
downloadelibs-66988068b79ca5677c4c7f4fed66a815a1b33d53.tar.gz
elibs-66988068b79ca5677c4c7f4fed66a815a1b33d53.tar.bz2
gnus + nnml + notmuch
Diffstat (limited to 'lib')
-rw-r--r--lib/net/jao-maildir.el28
-rw-r--r--lib/themes/jao-light-theme.el11
2 files changed, 26 insertions, 13 deletions
diff --git a/lib/net/jao-maildir.el b/lib/net/jao-maildir.el
index d7cd4d6..18a1725 100644
--- a/lib/net/jao-maildir.el
+++ b/lib/net/jao-maildir.el
@@ -35,6 +35,7 @@
(defvar jao-maildir-tracked-maildirs nil)
(defvar jao-maildir-info-string "")
(defvar jao-maildir-home (expand-file-name "~/var/mail"))
+(defvar jao-maildir-news-home (expand-file-name "~/var/news"))
(defgroup jao-maildir-faces nil "Faces"
:group 'faces)
@@ -152,32 +153,37 @@
(jao-maildir--setup-watches cb))
;;;###autoload
-(defun jao-maildir-file-to-group (file)
+(defun jao-maildir-file-to-group (file &optional maildir newsdir)
"Calculate the Gnus group name from the given file name.
Example:
IN: /home/jao/var/mail/jao/foo/cur/1259184569.M4818P3384.localhost,W=6921:2,S
- OUT: nnimap:jao/foo
+ OUT: nnml:jao.foo
+
+ IN: /home/jao/.emacs.d/gnus/Mail/jao.trove/32570, /home/jao/.emacs.d/gnus/Mail/
+ OUT: nnml:jao.trove
IN: /home/jao/var/mail/gmane/foo/bar/100
- OUT: nntp+localhost:gmane.foo.bar
+ OUT: nntp:gmane.foo.bar
IN: /home/jao/var/mail/bigml/cur/1259176906.M17483P24679.localhost,W=2488:2,S
OUT:nnimap:bigml/inbox"
(let* ((g (directory-file-name (file-name-directory file)))
- (g (replace-regexp-in-string (file-name-as-directory jao-maildir-home)
- "" g))
+ (g (replace-regexp-in-string
+ (file-name-as-directory (or maildir jao-maildir-home)) "" g))
+ (g (replace-regexp-in-string
+ (file-name-as-directory (or newsdir jao-maildir-news-home)) "" g))
(nntp (string-match-p "^\\(gmane\\|gwene\\)/" g))
- (g (if nntp
- (concat "nntp+localhost:" g)
- (replace-regexp-in-string "^\\([^/]+\\)/" "nnimap:\\1/"
- (file-name-directory g) t)))
- (g (if nntp (replace-regexp-in-string "/" "." g) g))
+ (g (cond (nntp (concat "nntp:" g))
+ ((file-name-directory g)
+ (replace-regexp-in-string "^\\([^/]+\\)/" "nnml:\\1/"
+ (file-name-directory g) t))
+ (t (concat "nnml:" g))))
+ (g (replace-regexp-in-string "/" "." g))
(g (replace-regexp-in-string "[/.]$" "" g)))
(cond ((string-match ":$" g) (concat g "inbox"))
(nntp g)
(t (replace-regexp-in-string ":\\." ":" g)))))
-
(provide 'jao-maildir)
;;; jao-maildir.el ends here
diff --git a/lib/themes/jao-light-theme.el b/lib/themes/jao-light-theme.el
index 98c3d40..2a6c82e 100644
--- a/lib/themes/jao-light-theme.el
+++ b/lib/themes/jao-light-theme.el
@@ -87,12 +87,19 @@
(diff-hl-delete (c "white" "wheat1"))
(fill-column-indicator (c "grey80"))
(fringe (c "grey70" nil))
+ (gnus-button (p dimm) nul)
+ (gnus-cite-1 (c "darkslategray" nil))
+ (gnus-cite-2 (c "slate gray" nil))
+ (gnus-cite-3 (c "slate gray" nil))
+ (gnus-cite-4 (c "slate gray" nil))
+ (gnus-summary-selected (c green) nbf)
+ (gnus-summary-cancelled (c "sienna3" nil) st)
(header-line (c nil "#efebe7"))
(magit-diff-context-highlight (c nil yellow) ex)
(magit-diff-hunk-heading-highlight (c nil yellow) it bf)
- (mode-line (c "grey30" dimm-background-3)
+ (mode-line (c "grey30" dimm-background-2)
:box (:line-width -1 :color "grey90"))
- (mode-line-inactive (c "grey40" dimm-background-4)
+ (mode-line-inactive (c "grey40" "white")
:box (:line-width -1 :color "grey90"))
(mode-line-buffer-id (~ default) (c dark-blue-2 nil) nit)
(mode-line-emphasis (c green nil))