Closed BiagioFesta closed 5 years ago
Likely I've broken something with my recent refactorings. I'm a bit busy the next couple of weeks, but you can help me out if you'd like to debug where exactly the problem is. See http://www.projectile.mx/en/latest/troubleshooting/ for details.
I am not familiar with LISP
and your project.
However, I've tried some investigation at my best.
The issue may be related in the function projectile--find-file
Precisely, when the function calls the function find-file
the filename passed will be the following one:
${project_root}/main.cpp
instead of
${project_root}/src/main.cpp
That happens because the function projectile-project-files
returns the files inside src
directory without the "relative path" from the ${project_root}
, that is:
- main.cpp
- Foo.cpp
I would expect the project files should be (this is my assumption regarding projectile project):
- src/main.cpp
- src/Foo.cpp
In that case, when the find-file
will be called the correct filename will be concat.
For example:
${project_root}/src/main.cpp
I hope those information will be useful. if you give me more hits, maybe I can investigate more.
Thank you.
I have the same issue.
It looks like 7b362f67 changed projectile-dir-files
to return files relative to the input dir, not the project root dir. projectile-dir-files
is called from projectile-project-files
.
I think I see how to fix this. I'll try to submit a PR later today.
Expected behavior
We have source files into
src/
directory (e.g.src/main.cpp
).Launch the command
projectile-find-file
and typemain
. The filemain.cpp
should be open.Actual behavior
A new file (empty buffer) will be created instead. The
pwd
is the "project" directory (.
).Steps to reproduce the problem
Project Tree
.projectile
contentEmacs Configuration
Environment & Version information
Projectile version information
Emacs version
GNU Emacs 25.2.2
Operating systems