From a0a34f6a95e1f2e124c5b9714283d9c3eb443f5f Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 5 Feb 2024 23:09:35 +0000 Subject: notmuch: arxiv emails don't have html in From anymore --- custom/jao-custom-notmuch.el | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el index 03d7e63..6f47364 100644 --- a/custom/jao-custom-notmuch.el +++ b/custom/jao-custom-notmuch.el @@ -357,17 +357,14 @@ (defconst jao-mail-clean-rx (regexp-opt '("ElDiario.es - ElDiario.es: " "The Guardian: " - "The Conversation – Articles (UK): "))) + "The Conversation – Articles (UK): " + "gr-qc updates on arXiv.org: " + "quant-ph updates on arXiv.org: "))) (defun jao-mail-clean-address (args) (when-let ((address (car args))) - (list (if (string-match ".+ updates on arXiv.org: \\(.+\\)" address) - (with-temp-buffer - (insert (match-string 1 address)) - (let ((shr-width 1000)) - (shr-render-region (point-min) (point-max))) - (replace-regexp-in-string "\"" "" (buffer-string))) - (replace-regexp-in-string jao-mail-clean-rx "" address))))) + (list (thread-last (replace-regexp-in-string jao-mail-clean-rx "" address) + (replace-regexp-in-string " " ", "))))) (use-package notmuch-show :init @@ -619,6 +616,7 @@ ;;; consult (jao-load-path "consult-notmuch") (require 'consult-notmuch) +(setq consult-notmuch-newest-first t) (consult-customize consult-notmuch :preview-key 'any) (defvar jao-consult-notmuch-history nil) -- cgit v1.2.3