redguardtoo / find-file-in-project

Quick access to project files in Emacs
GNU General Public License v3.0
428 stars 57 forks source link

Not working anymore after update #128

Closed silgon closed 3 years ago

silgon commented 3 years ago

Some days ago I decided to update a lot of things in my emacs configuration and packages. However I ran into troubles with find-file-in-project. I used find-file-in-project with ido mode (using (setq ffip-prefer-ido-mode t) in my init file). When I use the command I see

Find in myproject/:

But I don't see any files or whatsover, so, ido-mode doesn't work I suppose because of this (not sure).

I decided to set:

(setq ffip-debug t)

And I get the following at every search:

ffip--create-filename-pattern-for-gnufind called. rlt=
run command at ~/this/project/path/: /usr/bin/find  . \( -iwholename "*/.git" -or -iwholename "*/.svn" -or -iwholename "*/.cvs" -or -iwholename "*/.tox" -or -iwholename "*/.bzr" -or -iwholename "*/.hg" -or -iwholename "*/.DS_Store" -or -iwholename "*/.sass-cache" -or -iwholename "*/.npm" -or -iwholename "*/.tmp" -or -iwholename "*/.idea" -or -iwholename "*/node_modules" -or -iwholename "*/bower_components" -or -iwholename "*/.gradle" -or -iwholename "*/.cask" \) -prune -o -type f -not -name "*.log" -not -name "tags" -not -name "TAGS" -not -name "*.tgz" -not -name "*.gz" -not -name "*.xz" -not -name "*.zip" -not -name "*.tar" -not -name "*.rar" -not -name "GTAGS" -not -name "GPATH" -not -name "GRTAGS" -not -name "cscope.files" -not -name "*bundle.js" -not -name "*min.js" -not -name "*min.css" -not -name "*.png" -not -name "*.jpg" -not -name "*.jpeg" -not -name "*.gif" -not -name "*.bmp" -not -name "*.tiff" -not -name "*.ico" -not -name "*.doc" -not -name "*.docx" -not -name "*.xls" -not -name "*.ppt" -not -name "*.pdf" -not -name "*.odt" -not -name "*.obj" -not -name "*.so" -not -name "*.o" -not -name "*.a" -not -name "*.ifso" -not -name "*.tbd" -not -name "*.dylib" -not -name "*.lib" -not -name "*.d" -not -name "*.dll" -not -name "*.exe" -not -name ".metadata*" -not -name "*.class" -not -name "*.war" -not -name "*.jar" -not -name "*flymake" -not -name "#*#" -not -name ".#*" -not -name "*.swp" -not -name "*~" -not -name "*.elc" -not -name "*.pyc"    -print

Which should be the normal search, If I launch it on my bash terminal, that command doesn't seem to have a problem.

Some of my ido configuration:

(setq ido-default-buffer-method 'selected-window)
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(require 'ido)
(ido-mode t)
(ido-vertical-mode 1)
(setq ido-vertical-define-keys 'C-n-and-C-p-only)
(setq ffip-prefer-ido-mode t)

Any thoughts? thanks in advance.

I'm using GNU Emacs 26.3 on xubuntu 20.04.

redguardtoo commented 3 years ago

d58004c restore ffip-prefer-ido-mode (Chen Bin)

silgon commented 3 years ago

Nice. I installed the update from melpa. It seems to work.

silgon commented 3 years ago

I have to reopen the issue since I realize that when I open a file, I'm not redirected to the correct path when I'm not working in the root directory of my project. Example: for project with name project in directory /path/to/my/project/. If I'm working in my file /path/to/my/project/folder1/myfile.txt, then I want to open otherfile.txt that is in /path/to/my/project/folder1, find-file-in-project will give me the correct path of my otherfile.txt however, when I ask to open it will try to open /path/to/my/project/folder1/folder2/otherfile.txt.

redguardtoo commented 3 years ago

where folder2 comes from. I need exact steps. What command you use to find&open file?

silgon commented 3 years ago

Sorry. I though I write that in the description. folder1 and folder2 are inside my project on the root directory. So, the treecommand on the root would give me the following:

├── folder1
│   └── myfile.txt
└── folder2
    └── otherfile.txt

Plus the git configuration folders.

redguardtoo commented 3 years ago

2f44af3 ido and other completion frameworks share same code (Chen Bin)