Skip to content

Instantly share code, notes, and snippets.



Created Oct 10, 2020
What would you like to do?
Find a message in a mailing list
(defun mu4e-action-find-in-mailing-list (msg)
"Find message in mailing-list archives"
(let* ((mlist (mu4e-message-field msg :mailing-list))
(msg-id (mu4e-message-field msg :message-id))
(pcase mlist
((pred (lambda (x) (string-suffix-p "" x)))
"&submit=" (url-hexify-string "Search!")
(replace-regexp-in-string "\.gnu\.org" "" mlist))))
;; google.groups
((pred (lambda (x) (string-suffix-p "" x)))
(replace-regexp-in-string "\.googlegroups\.com" "" mlist)
(url-hexify-string (concat "\"" msg-id "\"")))))))
(when url
(message "opening url: " url)
(browse-url url))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment