bbatsov / helm-projectile

Helm UI for Projectile
327 stars 71 forks source link

Helm-projectile doesn't respect `projectile-switch-project-action` (after update to Emacs 27.1) #153

Closed art-solopov closed 3 years ago

art-solopov commented 3 years ago

My Projectile-related config:

(require 'projectile)
(require 'projectile-rails)
(require 'helm-projectile)

(setq projectile-switch-project-action #'projectile-dired)

(add-hook 'projectile-after-switch-project-hook 'set-ruby)
(projectile-rails-global-mode)

(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(define-key projectile-rails-mode-map (kbd "C-c r") 'projectile-rails-command-map)

(projectile-mode +1)
(helm-projectile-on)

If I replace the last line with (helm-projectile-off), the problem disappears.

Expected behavior

After executing helm-projectile-switch-project, Emacs should open the project root in Dired.

Actual behavior

After executing helm-projectile-switch-project, Emacs starts the "find file" action.

Environment & version information

bbatsov commented 3 years ago

Might be related to this change https://github.com/bbatsov/helm-projectile/commit/c622e89f7a96c36ce8315f1b2a550d8d504b3273 To me it made sense to always show the projectile-helm interface after switching projects.

johannes-mueller commented 3 years ago

I also would like to have the old behavior back. People who prefer the projectile-helm interface can put

(defun switch-to-project-using-helm-projectile ()
    (helm-projectile))
(setq projectile-switch-project-action #'switch-to-project-using-helm-projectile)

into their .emacs.

bbatsov commented 3 years ago

I don't think you need this wrapper function. :-) I've stopped using Helm ages ago (these days I'm into ivy/selectrum), so I don't really think much about the changes that go into helm-projectile. Feel free to revert this change.

thermopyle commented 3 years ago

I also prefer the old behavior.

bbatsov commented 3 years ago

Behavior reverted.

thermopyle commented 3 years ago

Thanks!