Add actions to browse online archive for a mailing list message

* mu4e/mu4e-headers.el (defcustom mu4e-header-actions): Convert
from defvar.  Add action for browsing online archive.
* mu4e/mu4e-view.el (defcustom mu4e-view-actions): Change use of
`seq-filter' to `delq'.  Add action for browsing online archive.
This commit is contained in:
Ruijie Yu 2023-05-05 23:00:46 +08:00
parent da41f5060d
commit 3018ceeb86
2 changed files with 11 additions and 8 deletions

View File

@ -237,15 +237,18 @@ Must have the same length as `mu4e-headers-thread-connection-prefix'.")
;;;; Various
(defvar mu4e-headers-actions
(defcustom mu4e-headers-actions
'( ("capture message" . mu4e-action-capture-message)
("browse online archive" . mu4e-actions-browse-list-archive)
("show this thread" . mu4e-action-show-thread))
"List of actions to perform on messages in the headers list.
The actions are cons-cells of the form (NAME . FUNC) where:
* NAME is the name of the action (e.g. \"Count lines\")
* FUNC is a function which receives a message plist as an argument.
The first character of NAME is used as the shortcut.")
The first character of NAME is used as the shortcut."
:group 'mu4e-headers
:type '(alist :key-type string :value-type function))
(defvar mu4e-headers-custom-markers
'(("Older than"

View File

@ -73,12 +73,12 @@ etc., see the gnus documentation for details."
:group 'mu4e-view)
(defcustom mu4e-view-actions
(seq-filter #'identity
`( ("capture message" . mu4e-action-capture-message)
("view in browser" . mu4e-action-view-in-browser)
,(when (fboundp 'xwidget-webkit-browse-url)
'("xview in xwidget" . mu4e-action-view-in-xwidget))
("show this thread" . mu4e-action-show-thread)))
(delq nil `(("capture message" . mu4e-action-capture-message)
("view in browser" . mu4e-action-view-in-browser)
("browse online archive" . mu4e-actions-browse-list-archive)
,(when (fboundp 'xwidget-webkit-browse-url)
'("xview in xwidget" . mu4e-action-view-in-xwidget))
("show this thread" . mu4e-action-show-thread)))
"List of actions to perform on messages in view mode.
The actions are cons-cells of the form:
(NAME . FUNC)