syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

error: (void-variable counsel-projectile-switch-project-actions) #10177

Closed lsytj0413 closed 4 years ago

lsytj0413 commented 6 years ago

Description :octocat:

An error occurred while post-configuring swiper in layer spacemacs-layouts (error: (void-variable counsel-projectile-switch-project-actions))

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: <>

Expected behaviour: :heart: :smile: <>

System Info :computer:

Backtrace :paw_prints:

<<BACKTRACE IF RELEVANT>>
lsytj0413 commented 6 years ago

This commit 4b111f7701ffea8e724666471a64867fe0c7af22 broken.

nixmaniack commented 6 years ago

counsel-projectile has updated this mechanism a month back and counsel-projectile-switch-project-actions is no more defined. This needs to be fixed in Spacemacs.

MarcusE1W commented 6 years ago

Same problem here. Archlinux, emacs 25.3.1 develop branch

marienz commented 6 years ago

Same here. This is with the counsel-projectile from spacelpa-0.300 (counsel-projectile-20171001.641). It has counsel-projectile-switch-project-actions, but that isn't autoloaded. Sticking a (require 'counsel-projectile) in spacemacs-layouts/post-init-swiper makes the error go away (not saying that's the right fix, but seems to confirm the problem is a missing autoload or require).

robbyoconnor commented 6 years ago

Same problem -- rebase and remove https://github.com/syl20bnr/spacemacs/commit/4b111f7701ffea8e724666471a64867fe0c7af22 and everything should be good.

nilehmann commented 6 years ago

I confir the error. I tried @marienz fix but that didn't work for me. Still getting the error after adding (require 'counsel-projectile)

syl20bnr commented 6 years ago

Should be fixed in develop.

jsoo1 commented 6 years ago

I still have this on develop 9d540f8.

nixmaniack commented 6 years ago

@jsoo1 Have you updated packages? Could you describe the repro steps with your system info and if possible include the backtrace?

jsoo1 commented 6 years ago

I can include a backtrace tomorrow. I have updated packages. Reproduction is via SPC p l.

jsoo1 commented 6 years ago

@nixmaniack

Debugger entered--Lisp error: (void-variable counsel-projectile-switch-project-action)
  (ivy-read "Switch to Project Perspective: " (if (projectile-project-p) (cons (abbreviate-file-name (projectile-project-root)) (projectile-relevant-known-projects)) projectile-known-projects) :action counsel-projectile-switch-project-action :caller 'spacemacs/ivy-persp-switch-project)
  spacemacs/ivy-persp-switch-project(nil)
  funcall-interactively(spacemacs/ivy-persp-switch-project nil)
  call-interactively(spacemacs/ivy-persp-switch-project nil nil)
  command-execute(spacemacs/ivy-persp-switch-project)

System Info :computer:

jsoo1 commented 6 years ago

I notice in the diff the read syntax #' was removed from /layers/+spacemacs/spacemacs-layouts/funcs.el:425 which is the same as wrapping the function in (function ...) (which i just discovered here). Adding #' back fixes the issue. Should submit a PR?

nixmaniack commented 6 years ago

I don't fully understand why it should make such a difference. If you think that is the correct solution to your problem - you may open a PR.

Could you once try removing your compiled elisp files and see if it helps? If it doesn't - then you can open a PR with the fix you described.

jsoo1 commented 6 years ago

Neither do I. Deleting .elc files makes sense...

jsoo1 commented 6 years ago

Removing all compiled elisp did not solve the issue, but adding back the quote does. I am hesitant to PR because I am not sure why it helps and an ubuntu machine using emacs 27 does not have the same problem.

syl20bnr commented 6 years ago

Please verify in develop.

jsoo1 commented 6 years ago

I can verify tomorrow thanks so much!

jsoo1 commented 6 years ago

Working in develop.

github-actions[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!