aboutsummaryrefslogtreecommitdiff
path: root/dot.local-bin-sm
diff options
context:
space:
mode:
authorThomas Schneider <qsx@chaotikum.eu>2026-07-27 18:55:49 +0200
committerThomas Schneider <qsx@chaotikum.eu>2026-07-27 18:55:49 +0200
commit6925cfd43f3445848e9f13269a1240be0ca7a44b (patch)
treecfb43e2079582f871a154151759fdb2f5062a08c /dot.local-bin-sm
parent6dcec5a2eb41f1569fc60f4ea4cd8171a99f6f8d (diff)
sm: Rework old `query:new` handling using tags
Diffstat (limited to 'dot.local-bin-sm')
-rwxr-xr-xdot.local-bin-sm8
1 files changed, 4 insertions, 4 deletions
diff --git a/dot.local-bin-sm b/dot.local-bin-sm
index 95a5c87..6ac1983 100755
--- a/dot.local-bin-sm
+++ b/dot.local-bin-sm
@@ -11,13 +11,13 @@ esac
set -x
mbsync -a || true
notmuch new
+notmuch tag -new_cache -- tag:new_cache
[ -d ~/.maildir/GMail ] && (cd ~/.maildir/GMail && gmi sync || true)
-new=$(notmuch search --output=messages tag:new | xargs)
-[ -z "$new" ] && exit
-notmuch config set query.new "$new"
+notmuch tag +new_cache -- tag:new
+[ "$(notmuch count tag:new)" -eq 0 ] && exit
notmuch tag -new -- tag:new and folder:GMail/mail
nm-tagger
export MAILSEQ="${MBLAZE:-$HOME/.mblaze}/seq.sm"
export MBLAZE_PAGER=""
-msearch -- --exclude=false query:new | mthread | mseq -S | mscan -f "$format"
+msearch -- --exclude=false tag:new_cache | mthread | mseq -S | mscan -f "$format"
type mu > /dev/null && mu index || true