diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index dc263b9f..53083ca2 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -180,6 +180,19 @@ store your org-contacts." (format "cd %s; git apply %s" path (mu4e-message-field msg :path))))) + +(defun mu4e-action-git-apply-mbox (msg) + "Apply and commit the git [patch] message." + (let ((path (ido-read-directory-name "Target directory: " + (car ido-work-directory-list) + "~/" t))) + (setf ido-work-directory-list + (cons path (delete path ido-work-directory-list))) + (shell-command + (format "cd %s; git am %s" + path + (mu4e-message-field msg :path))))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;