Skip to content

Commit

Permalink
"C-M-n" and "C-M-p" now also work for Helm
Browse files Browse the repository at this point in the history
* projectile.el (projectile-completing-read): Pass the `action' arg
  along to Helm.

Example use: "C-c p f", optionally narrow, and "C-M-n" to preview/cycle.
  • Loading branch information
abo-abo authored and bbatsov committed Oct 5, 2016
1 parent 298013e commit a77b4c8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -1501,11 +1501,12 @@ project-root for every file."
((eq projectile-completion-system 'default)
(completing-read prompt choices nil nil initial-input))
((eq projectile-completion-system 'helm)
(if (fboundp 'helm-comp-read)
(helm-comp-read prompt choices
:initial-input initial-input
:candidates-in-buffer t
:must-match 'confirm)
(if (fboundp 'helm)
(helm :sources
`((name . ,prompt)
(candidates . ,choices)
(action . ,(prog1 action
(setq action nil)))))
(user-error "Please install helm from \
https://github.com/emacs-helm/helm")))
((eq projectile-completion-system 'grizzl)
Expand Down

3 comments on commit a77b4c8

@kaushalmodi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abo-abo I hope this is not a bad sign for ivy :P

@featalion
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit break persp-projectile functionality, more precisely projectile-persp-switch-project function, happens on line 76. See Issue 5. Please, let me know how can I fix it on persp-projectile side and I will submit a pull request. Thanks in advance!

@abo-abo
Copy link
Contributor Author

@abo-abo abo-abo commented on a77b4c8 Oct 7, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.