projectile icon indicating copy to clipboard operation
projectile copied to clipboard

Weird escape characters appearing in projectile index

Open antoniojkim opened this issue 1 year ago • 3 comments

Expected behavior

Projectile index should contain valid paths to files in the project. It contained valid paths up until last week.

Actual behavior

After

Projectile is initializing cache for ...

Paths in index look like:

image

The path should just be src/infra/README.md, but there are evidently these escape characters included for some reason. These escape characters appear for every path in the index. These paths are obviously invalid and thus none of them open valid files and instead create new files with the messed up name

image image

Steps to reproduce the problem

The project I'm working on is remote and thus being accessed using TRAMP. All that needs to be done is initialize the project index and that's what I see.

This used to work without any problems up until last week. The only thing that's changed is I upgraded doomemacs to the latest. I've tried reverting the upgrade and still the issue persists. I've also tried downgrading to emacs 29.1 and still the issue persists.

Environment & Version information

Projectile version information

Projectile 2.8.0-snapshot

Emacs version

Emacs 30.0.50 (using emacs-plus@30 from homebrew and a customized doomemacs config)

Operating system

macOS 13.5.1 (22G90)

antoniojkim avatar Aug 28 '23 15:08 antoniojkim

Manually running the fd command via ssh appears to return the proper file paths without the escape characters

$ ssh [server ip address] "cd [project path] && fd . -H --color=never --type file --type symlink --follow --exclude .git --strip-cwd-prefix" | grep "src/infra/README.md"
src/infra/README.md

So, nothing has changed from my device perspective I think. There must be some processing of the output of fd in projectile that is "inserting" or causing those escape characters to appear

antoniojkim avatar Aug 28 '23 15:08 antoniojkim

Not sure why this only started appearing now, but I solved this by adding --color=never to the fd arg list,

(setq projectile-git-fd-args "-0 -H --color=never --type file --exclude .git --strip-cwd-prefix")

antoniojkim avatar Aug 29 '23 16:08 antoniojkim

Also saw this issue, the color=never flag solved it for me as well. Thanks @antoniojkim

nshankar avatar Sep 18 '23 17:09 nshankar