mirror of https://github.com/djcb/mu.git
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:
parent
631e9c20f8
commit
128a17b87e
|
@ -170,7 +170,10 @@ store your org-contacts."
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
(defun mu4e-action-git-apply-patch (msg)
|
(defun mu4e-action-git-apply-patch (msg)
|
||||||
"Apply the git [patch] message."
|
"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
|
(shell-command
|
||||||
(format "cd %s; git apply %s"
|
(format "cd %s; git apply %s"
|
||||||
path
|
path
|
||||||
|
|
Loading…
Reference in New Issue