mu4e-actions.el: better last dir handling for mu4e-action-git-apply-patch

add-to-list does pre-pend an element to a list by default, but only if
it isn't in there already. This change ensures the path we have just
added is always the first in the list. This makes sense when applying
a series of patches by hand.
This commit is contained in:
Alex Bennée 2013-10-25 12:08:00 +01:00
parent 162619f6c9
commit 64d348c07e
1 changed files with 2 additions and 1 deletions

View File

@ -174,7 +174,8 @@ store your org-contacts."
(let ((path (ido-read-directory-name "Target directory: "
(car ido-work-directory-list)
"~/" t)))
(add-to-list 'ido-work-directory-list path)
(setf ido-work-directory-list
(cons path (delete path ido-work-directory-list)))
(shell-command
(format "cd %s; git apply %s"
path