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)

message-view-patch's People

Contributors

seanfarley avatar stsquad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

message-view-patch's Issues

Cannot load this module from spacemacs

I'm using this spacemacs snippet:

   dotspacemacs-additional-packages '(
				      (mu4e-patch
				       :location (recipe
				      		  :fetcher github
						  :branch "master"
				      		  :repo "seanfarley/mu4e-patch"))
				      )

which download and build the package, as I can see from these logs

(Spacemacs) --> refreshing package archive: melpa... [1/3]
Contacting host: melpa.org:443
Importing package-keyring.gpg...done
Contacting host: melpa.org:443 [2 times]
Package refresh done
(Spacemacs) --> refreshing package archive: org... [2/3]
Importing package-keyring.gpg...done
Contacting host: orgmode.org:443
Package refresh done
(Spacemacs) --> refreshing package archive: gnu... [3/3]
Importing package-keyring.gpg...done
Contacting host: elpa.gnu.org:443
Package refresh done
(Spacemacs) --> installing package: mu4e-patch@dotfile... [1/1]
Fetcher: github
Source: seanfarley/mu4e-patch

Updating /home/patbel01/.emacs.d/.cache/quelpa/build/mu4e-patch/
Saving file /home/patbel01/.emacs.d/.cache/quelpa/packages/mu4e-patch-20190510.145.el...
Wrote /home/patbel01/.emacs.d/.cache/quelpa/packages/mu4e-patch-20190510.145.el
Wrote /home/patbel01/.emacs.d/.cache/quelpa/packages/mu4e-patch-readme.txt
Generating autoloads for mu4e-patch.el...done
Wrote /home/patbel01/.emacs.d/elpa/26.2/develop/mu4e-patch-20190510.145/mu4e-patch-autoloads.el [2 times]
Checking /home/patbel01/.emacs.d/elpa/26.2/develop/mu4e-patch-20190510.145... [3 times]
Compiling /home/patbel01/.emacs.d/elpa/26.2/develop/mu4e-patch-20190510.145/mu4e-patch.el...done
Wrote /home/patbel01/.emacs.d/elpa/26.2/develop/mu4e-patch-20190510.145/mu4e-patch.elc
Checking /home/patbel01/.emacs.d/elpa/26.2/develop/mu4e-patch-20190510.145...
Done (Total of 1 file compiled, 2 skipped)
Loading /home/patbel01/.emacs.d/.cache/recentf...done
Saving file /home/patbel01/dotfiles/spacemacs/.emacs.d/.cache/.custom-settings...
Wrote /home/patbel01/dotfiles/spacemacs/.emacs.d/.cache/.custom-settings [2 times]
Spacemacs is ready.

I'm also adding the hook from my conf:

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

However, when I open a PATCH message I still get this error:

Auto-evilification could not remap these functions in map ‘mu4e-headers-mode-map’:
   - ‘mu4e-headers-query-prev’ originally mapped on ‘\’
[mu4e] Started mu4e with 42607 messages in store
[mu4e] Contacts updated: 8088; total 8088
[mu4e] Found 499 matching messages
error in process filter: run-hooks: Symbol’s function definition is void: mu4e-patch-highlight
error in process filter: Symbol’s function definition is void: mu4e-patch-highlight
[mu4e] Retrieving mail...done
[mu4e] Indexing... processed 30000, updated 7
[mu4e] Indexing completed; processed 30169, updated 7, cleaned-up 0
[mu4e] Contacts updated: 0; total 8088
[mu4e] Found 499 matching messages
evil-line-move: End of buffer

and the mail never gets loaded, the main issue being:

error in process filter: Symbol’s function definition is void: mu4e-patch-highlight

Do you have any idea what can be wrong?

Cheers,
Patrick

Melpa recipe

It would be nice if this package were available on Melpa.

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.