Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot switch project to one using TRAMP #152

Open
chy-causer opened this issue Dec 4, 2020 · 3 comments
Open

Cannot switch project to one using TRAMP #152

chy-causer opened this issue Dec 4, 2020 · 3 comments

Comments

@chy-causer
Copy link

Expected behavior

Switching project to a TRAMP one should switch the project

Actual behavior

I get the error "You're not in a project". I believe there was a recent fix to projectile to fix TRAMP issues. Projectile now works great but I think there's something here too that needs something changed. Forgive my vagueness as I am very new to Emacs.

Steps to reproduce the problem

C-p p => select a project that is using TRAMP. Disabling helm-projectile allows projectile to select the project fine using the minibuffer.

Backtraces if necessary (M-x toggle-debug-on-error)

Debugger entered--Lisp error: (error "You’re not in a project")
  signal(error ("You’re not in a project"))
  error("You're not in a project")
  helm-projectile-find-file()
  projectile-switch-project-by-name("/ssh:cas:/home/mert/.emacs.d/")
  #f(compiled-function (project) #<bytecode 0x177eb6d>)("/ssh:cas:/home/mert/.emacs.d/")
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  helm-internal(helm-source-projectile-projects nil "[-] Switch to project: " nil nil "*helm projectile: -*" nil nil nil)
  apply(helm-internal (helm-source-projectile-projects nil "[-] Switch to project: " nil nil "*helm projectile: -*" nil nil nil))
  helm(helm-source-projectile-projects nil "[-] Switch to project: " nil nil "*helm projectile: -*" nil nil nil)
  apply(helm (helm-source-projectile-projects nil "[-] Switch to project: " nil nil "*helm projectile: -*" nil nil nil))
  helm(:sources helm-source-projectile-projects :buffer "*helm projectile: -*" :truncate-lines nil :prompt "[-] Switch to project: ")
  helm-projectile-switch-project(nil)
  funcall-interactively(helm-projectile-switch-project nil)
  call-interactively(helm-projectile-switch-project nil nil)
  command-execute(helm-projectile-switch-project)

Environment & version information

  • helm-projectile version: 20200625.443
  • helm version (in helm-pkg.el): 20201117.815
  • projectile version (M-x projectile-version): 20201203.2220
  • Emacs version (M-x emacs-version): GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian
  • OS: Ubuntu 20.10
@chy-causer chy-causer changed the title Cannot switch project to one using TRAMP unless opened already Cannot switch project to one using TRAMP Dec 4, 2020
@bbatsov
Copy link
Owner

bbatsov commented Dec 4, 2020

It seems to me that this error is coming from help-projectile, as there's no such check in Projectile itself. I'll check if it's an easy fix.

@chy-causer
Copy link
Author

Thanks. I believe the line is https://github.com/bbatsov/helm-projectile/blob/master/helm-projectile.el#L754

There is a tantalizing not-require-root variable in that macro, but I don't know enough about the project to comment any further on it.

@bbatsov
Copy link
Owner

bbatsov commented Dec 4, 2020

I think the project check fails for TRAMP, unless you're already connected, so probably it needs something like bbatsov/projectile@c8b7163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants