redguardtoo / counsel-etags

Fast, energy-saving, and powerful code navigation solution
174 stars 15 forks source link

indexing issue #5

Open kermorgant opened 6 years ago

kermorgant commented 6 years ago

Hello,

I've just started using this nice package but I've just stumbled on an indexing issue

image

Maybe it has nothing to do with this package, but you can see in the screenshot that a path vendor/friendsofsymfony/user-bundle is misspelled (fridsofsymfony/...). And the files can't be opened when hitting enter on the candidate.

EDIT OS : archlinux Emacs 25.3 counsel-etags 20171111.608 project using git

redguardtoo commented 6 years ago

ctags version? OS? Emacs version? and counsel-etags version? Are you using git?

Currently I can only guess. This package only read the tags file created by ctags. Looks ctags misspell file path. To double check, could you open the file TAGS with any text editor and double check?

You can either install latest Exuberant Ctags from HomeBrew or use etags.el bundled with Emacs.

kermorgant commented 6 years ago

Hello,

sorry for the lack of details, I sould have taken the time to make it right.

So I have those versions OS : archlinux Emacs 25.3 counsel-etags 20171111.608 project using git

About ctags, I have those two on my system

± % ctags --version Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert Compiled: Oct 24 2014, 14:15:58 Addresses: dhiebert@users.sourceforge.net, http://ctags.sourceforge.net Optional compiled features: +wildcards, +regex, +internal-sort

And

% ctags.emacs --version !10010 ctags (GNU Emacs 25.3) Copyright (C) 2017 Free Software Foundation, Inc. This program is distributed under the terms in ETAGS.README

I've checked inside the TAGS file, the path is also misspelked. There is an update of counsel-etags so I will try that first.

EDIT updated to latest counsel-etags, rescanned code and same result.

redguardtoo commented 6 years ago

I tested with your sample directory php files without any problem. Looks it's your ctags setup.

You should use Exuberant Ctags. What's the output of which ctags?

Run ctags -e -R in your project to create TAGS file manually. Open it and check if the path is correct.

If the issue is still not resolved, prepare a minimum project and mail to chenbin DOT sh AT gmail

kermorgant commented 6 years ago

Thanks,

"which ctags" outputs /usr/bin/ctags (it is Exuberant Ctags).

Runned from the command line, the paths are correct.

I guess there's some project setup involved in the issue as I have a similar symfony project with the same vendors, and no problem there.

So when I'll have some spare time, I'll try to prepare a project with the issue.

redguardtoo commented 6 years ago

Sure. Take your time.

When running counsel-etags-update-tags-force, my program will output the full cli into message buffer.

For example, mine is:

find . \( -iwholename "*/.git/*" -or -iwholename "*/.svn/*" -or -iwholename "*/.cvs/*" -or -iwholename "*/.bzr/*" -or -iwholename "*/.hg/*" -or -iwholename "*/bin/*" -or -iwholename "*/fonts/*" -or -iwholename "*/images/*" -or -iwholename "*/.DS_Store/*" -or -iwholename "*/.npm/*" -or -iwholename "*/.tmp/*" -or -iwholename "*/.sass-cache/*" -or -iwholename "*/.idea\*/*" -or -iwholename "*/node_modules/*" -or -iwholename "*/bower_components/*" -or -iwholename "*/.tox/*" -or -iwholename "*/.cask/*" \) -prune -o -type f -not -size +64k -not -name "\*.json" -not -name "\*.log" -not -name "tags" -not -name "TAGS" -not -name "\*.gz" -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 "\*.o" -not -name "\*.a" -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" | ctags -e -L - at /home/cb/projs/ms-frontend-sandbox

The default command use both find and ctags. Maybe it's the find setup.