Giter Club home page Giter Club logo

message-view-patch's Introduction

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.