Use Gnus to apply patch sent by `git send-email`
Send the latest commit
# send one commit git send-email -1 --annotate
Select that email, run command "M-x gnus-summary-save-article-email" whose short key is "O m" in summary buffer.
Emacs will prompt you where to save that email. Say I save it in ~/News/patch/hello.patch.
git am ~/News/patch/hello.patch
Syntax highlight of patch email
See fgeller's plugin.
Add following code to configure his plugin:
(require 'gnus-article-treat-patch) (setq gnus-article-patch-conditions '( "^@@ -[0-9]+,[0-9]+ \\+[0-9]+,[0-9]+ @@" ))