Skip to content

seanfarley/message-view-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 

Repository files navigation

README

https://melpa.org/packages/message-view-patch-badge.svg

message-view-patch

mu4e and gnus extension to colorize patch-like emails. Based on gnus-article-treat-patch.el and adapted to work with mu4e. It also continues to work with gnus.

This package was renamed from mu4e-patch to message-view-patch to reflect that it works with both mu4e and gnus (and maybe others?).

Installation

The package message-view-patch may be installed directly from MELPA or with other tools like straight.el.

After installation, add the hook,

;; colorize patch-based emails
(add-hook 'gnus-part-display-hook 'message-view-patch-highlight)

Using the old mu4e-view

For users that set mu4e-view-use-old to non-nil, they might also want to get the mu4e faces, too. For that, the following code might be helpful,

(require 'mu4e)
(require 'message-view-patch)

(add-hook 'mu4e-view-mode-hook #'message-view-patch-highlight)

(setq mu4e-view-use-old t
      message-view-patch-pseudo-headers
      '(("^Acked-by: "      'mu4e-header-key-face 'mu4e-header-value-face)
        ("^C\\(c\\|C\\): "  'mu4e-header-key-face 'mu4e-header-value-face)
        ("^From: "          'mu4e-header-key-face 'mu4e-header-value-face)
        ("^Link: "          'mu4e-header-key-face 'mu4e-header-value-face)
        ("^Reported-by: "   'mu4e-header-key-face 'mu4e-header-value-face)
        ("^Reviewed-by: "   'mu4e-header-key-face 'mu4e-header-value-face)
        ("^Signed-off-by: " 'mu4e-header-key-face 'mu4e-header-value-face)
        ("^Subject: "       'mu4e-header-key-face 'mu4e-header-value-face)
        ("^Tested-by: "     'mu4e-header-key-face 'mu4e-header-value-face)))

(set-face-attribute 'message-view-patch-cite-1 nil :inherit 'mu4e-cited-1-face)
(set-face-attribute 'message-view-patch-cite-2 nil :inherit 'mu4e-cited-2-face)
(set-face-attribute 'message-view-patch-cite-3 nil :inherit 'mu4e-cited-3-face)
(set-face-attribute 'message-view-patch-cite-4 nil :inherit 'mu4e-cited-4-face)
(set-face-attribute 'message-view-patch-cite-5 nil :inherit 'mu4e-cited-5-face)
(set-face-attribute 'message-view-patch-cite-6 nil :inherit 'mu4e-cited-6-face)
(set-face-attribute 'message-view-patch-cite-7 nil :inherit 'mu4e-cited-7-face)

About

Colorize patch emails in mu4e and gnus

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published