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
projectile-find-file-in-directory does not work in TRAMP projects #1275
Comments
Currently it attempts to open the file on the local FS, so /ssh:machine:/blah/blah ==> /blah/blah locally. |
projectile-indexing-method 'native solves this, but takes a super long time to index, so this may be a deeper issue with how the alien method returns remote projects' name. |
Yeah, so it seems the cached filenames need to be normalized when indexing between alien & native methods for tramp projects. The absolute paths the alien method produces shortcut the TRAMP default-directory. The |
@codemac Mind putting some PR together to tackle this.
Which cached filenames? Those in the project cache, right? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
Sorry, @bbatsov yes these are the cached project filenames. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
I stopped using TRAMP, and only use projectile locally due to other extensions issues with assuming local buffers. I don't have time to implement this, but I do think this is still an issue for projectile's file cache. |
Yes. Alien indexing method returned absolute file paths which in turn failed |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
I use TRAMP every day and am entirely unable to use Projectile on any remote project. I'd really like to and don't want this issue to be closed as stale. |
Got that working with some combination of:
|
I hadn't tried |
Does anyone have any other suggestions? Most of my work is done on remote servers, and I'd really love to use projectile. |
I don't know exactly where you're stuck but this works for me. You can use Occasionally, I have to sync the cache. It is slow only the first time you run If you're regularly deleting files, this probably won't work for you. |
@adithyaov your suggestion doesn't have any effect for me. Nothing has, I just can't get projectile to work with tramp at all. |
If it works for me and does not work for you, it's probably because we are using different versions of projectile or emacs. Maybe try again after updating emacs to 27.* and projectile to its latest commit. |
My Emacs is built from the However, this has been broken for me for a couple years, so I'm not sure any recent version changes will make a difference. |
If nothing works, you can always use |
TRAMP is significantly more performant than SSHFS, at least for my work; I'd rather have Projectile work properly than change my workflow to suit it |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding! |
Be gone, stale tag, this is still an issue |
FYI, I've stopped using TRAMP regularly, so this isn't so much of an issue for me anymore, but I never did get it working (now on Emacs 29, with the latest Projectile commit as of a couple months ago). Projectile continues to work well locally. |
Same problem here (projectile-20220828.1421 on Windows). Changing projectile-indexing-method to native fixes the problem, but besides taking 20x longer to index, I need to use hybrid because without it, projectile doesn't use .gitignore. |
Just to add a "what fixed it for me", my projectile projects over TRAMP were showing no files until I uninstalled fd-find on my desktop running emacs. I understand there is a |
Sadly there's no easy way to detect what tools are available remotely, that's why Projectile tries to use remotely whatever it found locally. You can open an issue about this - at the very least we can add something to the docs about this. |
projectile/projectile.el
Line 3569 in a4b447d
The resolution probably relates to expand-file-name being passed a tramp directory. I will post here any updates I find to fixing it.
The text was updated successfully, but these errors were encountered: