Skip to content

Commit

Permalink
* helm-mode.el: Issue #125 Fix *read-file-name
Browse files Browse the repository at this point in the history
(helm-c-read-file-name): Maybe append helm-pattern to list of candidates.
  • Loading branch information
thierryvolpiatto committed Sep 29, 2012
1 parent 3864533 commit f8da4df
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions helm-mode.el
Expand Up @@ -702,17 +702,19 @@ Keys description:
(setq helm-ff-auto-update-flag
helm-ff-auto-update-initial-value)))
(mode-line . helm-read-file-name-mode-line-string)
(match . helm-ff-match-function)
(candidates
. (lambda ()
(if test
(loop with hn = (helm-ff-tramp-hostnames)
for i in (helm-find-files-get-candidates
must-match)
when (or (member i hn) ; A tramp host
(funcall test i) ; Test ok
(not (file-exists-p i))) ; A new file.
collect i)
(helm-find-files-get-candidates must-match))))
(append (and (not (file-exists-p helm-pattern))
(list helm-pattern))
(if test
(loop with hn = (helm-ff-tramp-hostnames)
for i in (helm-find-files-get-candidates
must-match)
when (or (member i hn) ; A tramp host
(funcall test i)) ; Test ok
collect i)
(helm-find-files-get-candidates must-match)))))
(filtered-candidate-transformer
helm-c-find-files-transformer)
(persistent-action . ,persistent-action)
Expand Down

0 comments on commit f8da4df

Please sign in to comment.