From 0b2b984150aaa1db4d2d628e66fc7211df118ff3 Mon Sep 17 00:00:00 2001 From: djcb Date: Mon, 29 Oct 2012 12:26:17 +0200 Subject: [PATCH] * mu4e: add example mu4e-action-git-apply-patch --- mu4e/mu4e-actions.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index a1557a21..c111145a 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -167,5 +167,16 @@ store your org-contacts." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defun mu4e-action-git-apply-patch (msg) + "Apply the git [patch] message." + (let ((path (read-directory-name "Target directory: " nil "~/" t) )) + (shell-command + (format "cd %s; git apply %s" + path + (mu4e-message-field msg :path))))) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + (provide 'mu4e-actions)