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.
This commit is contained in:
Alex Bennée 2013-10-03 09:21:09 +01:00
parent 631e9c20f8
commit 128a17b87e
1 changed files with 4 additions and 1 deletions

View File

@ -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