bbatsov / projectile

Project Interaction Library for Emacs
https://docs.projectile.mx
GNU General Public License v3.0
3.98k stars 584 forks source link

Globbing ignored in .projectile (projectile-current-project-files) #1771

Open bitozoid opened 2 years ago

bitozoid commented 2 years ago

Expected behavior

The globbing pattern in .projectile file is ignored in a subdir when running projectile-current-project-files.

In the example below, I would expect y.text not to be in the result, because it has been excluded in the .projectile file.

Actual behavior

I get excluded patterns in the project files list.

("test.el" "mysubdir/x.txt" "mysubdir/y.text")

Steps to reproduce the problem

  1. Create sample project like this:
mkdir test-hybrid{,/mysubdir}
touch test-hybrid/mysubdir/{x.txt,y.text}
echo "-*.text" > test-hybrid/.projectile
echo "(projectile-current-project-files)" > test-hybrid/test.el
  1. Start emacs.

  2. Set projectile indexing to hybrid.

(setq projectile-indexing-method 'hybrid)
  1. Open test.el

  2. Run the sexp with C-u C-x C-e.

Environment & Version information

Projectile version information

Projectile version:  20220402.624

Emacs version

GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.31, cairo version 1.16.0) of 2022-03-24

Operating system

GNU/Linux

thorsten-ha commented 8 months ago

I have the same problem when running projectile-replace (Projectile version: 20231130.1934).