branch: elpa/helm commit be0372856b799dcd8eead2e31591f37d5a574e0e Author: Thierry Volpiatto <[email protected]> Commit: Thierry Volpiatto <[email protected]>
Specify default-directory as default in hff-do-action
otherwise we get thing-at-point from the
*helm marked* buffer.
---
helm-files.el | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/helm-files.el b/helm-files.el
index a15ce4b6129..f836ccf372a 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -1366,18 +1366,22 @@ ACTION can be `rsync' or any action supported by
`helm-dired-action'."
(regexp-quote
(if helm-ff-transformer-show-only-basename
(helm-basename cand) cand))))
- :default (when cdir
- (mapcar (lambda (x)
- (let ((ext
(replace-regexp-in-string
- "[\\']" "" (car x))))
- (expand-file-name
- (format "%s%s"
- (if cand
- (helm-basename
cand)
- "new_archive")
- ext)
- cdir)))
- dired-compress-files-alist))
+ :default (if cdir
+ (mapcar (lambda (x)
+ (let ((ext
(replace-regexp-in-string
+ "[\\']" "" (car
x))))
+ (expand-file-name
+ (format "%s%s"
+ (if cand
+ (helm-basename
cand)
+ "new_archive")
+ ext)
+ cdir)))
+ dired-compress-files-alist)
+ ;; Specify default-directory as default
+ ;; otherwise we get thing-at-point from the
+ ;; *helm marked* buffer.
+ default-directory)
:must-match (and cdir (lambda (f) (not
(file-directory-p f))))
:initial-input (or cdir (helm-dwim-target-directory))
:history (helm-find-files-history nil :comp-read
nil))))))
