Repository navigation
Add projectile-files-transform-functions for file names collected as raw bytes - #2199
Open
attilayener wants to merge 2 commits into
Open
attilayener wants to merge 2 commits into
attilayener wants to merge 2 commits into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1743
Problem
On platforms whose file-name coding system doesn't cover some characters
(e.g. Emacs on Windows with a legacy system code page), project file names
containing non-ASCII characters are collected as raw byte escapes like
\305\264\303\251. The escapes end up both in commands such asprojectile-find-fileand in the persistent cache.Solution
As discussed in #1743, this adds a new option -
projectile-files-transform-functions- that applies a list of functionsto every file name Projectile collects for a project. The transforms run
after indexing and before the list is cached and presented, so the
cache holds the final representation as well.
The default is nil: file names are used as collected and no extra work
is done, so nothing changes for existing users.
All indexing methods (alien, hybrid, native) pass through the same
transform step.
Notes
doc/modules/ROOT/pages/indexing.adoctest/projectile-indexing-test.el