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

Fix tramp alien index find file with relative paths. #1477

Closed
wants to merge 2 commits into from
Closed

Fix tramp alien index find file with relative paths. #1477

wants to merge 2 commits into from

Conversation

TrunovS
Copy link

@TrunovS TrunovS commented Dec 7, 2019

Alien indexing method returned absolute file paths which in turn failed projectile-find-file in Tramp session for me. Got that working with fix in the way projectile-dir-files-alien create list of files with relative paths instead of absolute paths. And I believe its solves the way projectile-find-file-in-dir works with alien indexing with tramp.

Closes: #1275

@TrunovS
Copy link
Author

TrunovS commented Dec 7, 2019

@bbatsov It seams something wrong with test concerning projectile-project-root and its cache? But I cant understand why.

projectile.el Outdated
;; getting directory name without ":" for tramp connections
(c_directory (car (last (split-string directory ":")))))

(mapcar (lambda (f)
Copy link
Owner

Choose a reason for hiding this comment

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

I haven't looked at the test failure, but I can tell you that walking over all the files and applying an extra transformation is going to have a terrible performance impact on any non-trivial project.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks!) Ok, that's was kind of hack to make file list more compact without long prefix /home/user/<proj_root>/ for hg repos. It's seams better place for that was projectile-hg-command (change hg locate to hg files). By chance hg files also returns project file list in more compact way without long prefix.

replace deprecated hg locate to hg files. Replace tramp remote names with local names when create project list files in alien mode.
@TrunovS
Copy link
Author

TrunovS commented Feb 8, 2020

@bbatsov Last commit likely fixed some test failures for Travis emacs 26 and snapshot, but strangely not so for emacs 25.

@TrunovS
Copy link
Author

TrunovS commented Feb 15, 2020

This feature is somewhat buggy and still need to be refined.

@TrunovS TrunovS closed this Feb 15, 2020
@TrunovS TrunovS deleted the tramp_alien_index_with_relative_paths branch February 15, 2020 16:44
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

Successfully merging this pull request may close these issues.

projectile-find-file-in-directory does not work in TRAMP projects
2 participants