projectile ignore and keep not work as expected

Created on 15 Mar 2020  路  5Comments  路  Source: bbatsov/projectile

Use the template below when reporting bugs. Please, make sure that
you're running the latest stable Projectile and that the problem you're reporting
hasn't been reported (and potentially fixed) already.

Remove all of the placeholder text in your final report!

Expected behavior

for example of linux source code tree.
.projectile to set ignore file and include files:

expect to include only drivers/nvme and ignore all other contents in drivers directory.

so i use the :

+/drivers/nvme

Actual behavior

all files in /drivers were include

Steps to reproduce the problem

  1. git clone to download linux source repo
  2. create .projectile file in the repo dir
  3. add following content:
    +/drivers/nvme
    -/Documents
  4. eval : (print (projectile-ignored-directories-rel))
    will see ignored dirs were not contains expected sub-dirs of /drivers

Environment & Version information

Projectile version information

Include here the version string displayed by M-x projectile-version. Here's an example:

Projectile 20200307.1701

Emacs version

GNU Emacs 25.2.2 (x86_64-pc-linux-gnu)

Operating system

Linux 5.6.0-050600rc5-lowlatency #202003082130 SMP PREEMPT Mon Mar 9 01:45:36 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Stale

Most helpful comment

@ChinaXing Please check the value of variable projectile-indexing-method

If the value is alien projectile will ignore your .projectile file.
Set it to native and projectile will respect your .projectile file

All 5 comments

GNU Emacs 26.3
Projectile 20200307.1701

cat .projectile

 -/vendor/

(print (projectile-ignored-directories-rel))

(".idea/" ".ensime_cache/" ".eunit/" ".git/" ".hg/" ".fslckout/" "_FOSSIL_/" ".bzr/" "_darcs/" ".tox/" ".svn/" ".stack-work/")

Actually it works, I had a leading space in my .projectile....

(".idea/" ".ensime_cache/" ".eunit/" ".git/" ".hg/" ".fslckout/" "_FOSSIL_/" ".bzr/" "_darcs/" ".tox/" ".svn/" ".stack-work/" "vendor/")

@ChinaXing Please check the value of variable projectile-indexing-method

If the value is alien projectile will ignore your .projectile file.
Set it to native and projectile will respect your .projectile file

Can this issue be closed now?

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!

Was this page helpful?
0 / 5 - 0 ratings