From 128a17b87ebf316c9927de1e754742b6035a21c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Thu, 3 Oct 2013 09:21:09 +0100 Subject: [PATCH] mu4e-actions.el: make git apply patch history aware As you are often applying a series of patches to a tree it doesn't make sense to move the user to default-directory every time. This changes read-directory-name to use ido-read-directory-name and populate the directory with the last one applied. Any path chosen is also added to the beginning of ido-work-directory-list for next time. --- mu4e/mu4e-actions.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-actions.el b/mu4e/mu4e-actions.el index cb7559ca..0ac0eb90 100644 --- a/mu4e/mu4e-actions.el +++ b/mu4e/mu4e-actions.el @@ -170,7 +170,10 @@ 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) )) + (let ((path (ido-read-directory-name "Target directory: " + (car ido-work-directory-list) + "~/" t))) + (add-to-list 'ido-work-directory-list path) (shell-command (format "cd %s; git apply %s" path