Fix mu4e matching from field custom marker
This commit is contained in:
parent
86eb32a306
commit
4efd701fcc
@ -84,14 +84,18 @@
|
||||
(message-sendmail-extra-arguments
|
||||
. ("-a" "jdormitzer-spotify-com"))))))
|
||||
;; Custom mark function to mark messages matching the current message
|
||||
(defun mu4e-mark-matching-pred (msg from)
|
||||
(defun mu4e-mark-matching-from-pred (msg from)
|
||||
(mu4e-message-contact-field-matches msg :from from))
|
||||
|
||||
(defun mu4e-mark-matching-input ()
|
||||
(defun mu4e-mark-matching-from-input ()
|
||||
(let* ((msg (mu4e-message-at-point t)))
|
||||
(if (not msg)
|
||||
(error "No message at point")
|
||||
(cdr (mu4e-message-field msg :from)))))
|
||||
(-non-nil
|
||||
(funcall
|
||||
(-juxt (lambda (v) (plist-get v :name))
|
||||
(lambda (v) (plist-get v :email)))
|
||||
(car (mu4e-message-field msg :from)))))))
|
||||
|
||||
(setq mu4e-headers-custom-markers
|
||||
'(("Older than"
|
||||
@ -118,13 +122,8 @@
|
||||
(lambda nil
|
||||
(read-number "Match messages bigger than (Kbytes): ")))
|
||||
("Matching current message from: field"
|
||||
(lambda (msg from)
|
||||
(mu4e-message-contact-field-matches msg :from from))
|
||||
(lambda ()
|
||||
(let* ((msg (mu4e-message-at-point t)))
|
||||
(if (not msg)
|
||||
(error "No message at point")
|
||||
(cdar (mu4e-message-field msg :from))))))))
|
||||
mu4e-mark-matching-from-pred
|
||||
mu4e-mark-matching-from-input)))
|
||||
(add-hook 'mu4e-compose-pre-hook
|
||||
(lambda ()
|
||||
(set
|
||||
|
Loading…
Reference in New Issue
Block a user