From 5f686253a15d910d7c3223cc8662e06d032d3554 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 18 Sep 2025 22:03:50 +0100 Subject: mail and indexing tweaks --- bin/notmuch-tags.sh | 10 +++++----- custom/jao-custom-browse.el | 2 +- custom/jao-custom-email.el | 2 +- custom/jao-custom-gnus.el | 2 +- custom/jao-custom-notmuch.el | 2 +- init.el | 1 + 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bin/notmuch-tags.sh b/bin/notmuch-tags.sh index 3a6cbef..03afc82 100755 --- a/bin/notmuch-tags.sh +++ b/bin/notmuch-tags.sh @@ -92,11 +92,11 @@ killfile "subject:prefclean from:apt-listbugs" killfile "subject:open-thread AND Rss:astralcodexten" +1d killfile "subject:hidden-thread AND Rss:astralcodexten" +deleted -# gfeeds="grep -o -e feeds.*@localhost $HOME/.config/rss2email.cfg" -# for f in $($gfeeds | sort | uniq); do -# ftag=$(echo $f | sed 's/feeds.\(.*\)@localhost/\1/'); -# notmuch tag +rss +feeds +$ftag -- tag:new AND folder:feeds AND to:$f -# done +gfeeds="grep -o -e feeds.*@localhost $HOME/.config/rss2email.cfg" +for f in $($gfeeds | sort | uniq); do + ftag=$(echo $f | sed 's/feeds.\(.*\)@localhost/\1/'); + notmuch tag +rss +feeds +$ftag -- tag:new AND folder:feeds AND to:$f +done notmuch tag +write +jao -words -drivel -feeds \ -- "tag:new AND from:/campusdee?scrip?tura/" diff --git a/custom/jao-custom-browse.el b/custom/jao-custom-browse.el index 2787518..5c75f7f 100644 --- a/custom/jao-custom-browse.el +++ b/custom/jao-custom-browse.el @@ -108,7 +108,7 @@ ;;;; browse-url (require 'browse-url) -(setq browse-url-generic-program "firefox") +(setq browse-url-generic-program (jao-d-l "open" "firefox")) (defun jao-browse-with-external-browser (&rest url) "Browse with external hogging" diff --git a/custom/jao-custom-email.el b/custom/jao-custom-email.el index 534b342..b9e4ba9 100644 --- a/custom/jao-custom-email.el +++ b/custom/jao-custom-email.el @@ -11,7 +11,7 @@ (defvar jao-mails) (defvar jao-extra-mails nil) (defvar jao-mails-regexp (regexp-opt jao-mails)) - +(defvar jao-maildir (jao-d-l "~/Documents/mail" "~/var/mail")) ;;; gnus (setq gnus-init-file "~/.emacs.d/gnus.el" gnus-home-directory "~/.emacs.d/gnus" diff --git a/custom/jao-custom-gnus.el b/custom/jao-custom-gnus.el index 3165372..4e88d59 100644 --- a/custom/jao-custom-gnus.el +++ b/custom/jao-custom-gnus.el @@ -185,7 +185,7 @@ (setq mail-sources (let* ((pwd (auth-source-pick-first-password :host "proton-bridge")) (mds (mapcar (lambda (f) - `(maildir :path ,(expand-file-name f "~/var/mail/"))) + `(maildir :path ,(expand-file-name f jao-maildir))) '("local/" "feeds/"))) (ims (mapcar (lambda (b) `(imap :server "127.0.0.1" :port 1143 diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 30b0976..85150fa 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -245,7 +245,7 @@ (when jao-notmuch-enabled (define-key message-mode-map (kbd "C-c C-d") #'notmuch-draft-postpone) - (setq message-directory "~/var/mail/" + (setq message-directory (file-name-as-directory jao-maildir) message-auto-save-directory "/tmp" mail-user-agent 'message-user-agent)) diff --git a/init.el b/init.el index 245a33b..8eb3b8f 100644 --- a/init.el +++ b/init.el @@ -1665,6 +1665,7 @@ (jao-when-linux (jao-shell-running-p "river"))) (jao-when-darwin + (defvar jao-sway-enabled nil) (defun jao-wayland-enabled-p () nil) (defun jao-river-enabled-p () nil)) -- cgit v1.2.3