| Age | Commit message (Collapse) | Author |
|
The implicit "any unprefixed line is an ignore pattern" rule is the
last source of subtle parser surprises — it's the reason why a
single leading space silently changes a +-keep into a literal ignore
pattern, and it makes typo'd comments slip through as ignores.
Mark these lines as :legacy-ignore in the classifier, record them
in a new prefixless-ignore slot on the dirconfig struct, and emit a
one-time warning per project listing the offending entries. The
behavior is unchanged — the lines still go into the ignore list —
but users now get a nudge to write them as -entry. The warning can
be silenced via projectile-warn-on-prefixless-dirconfig-lines.
|
|
Replace the positional (KEEP IGNORE ENSURE) triple with a
cl-defstruct. Every internal call site used car/cadr/caddr to pull
out a slot, which is unreadable and error-prone — slot accessors
make the intent explicit and let cl-defstruct grow a fourth field
later without touching every consumer.
Existing callers that compared against the raw triple (a couple of
internal helper tests) are updated to construct the struct with
make-projectile-dirconfig.
|
|
The parser silently turns every keep entry into a directory via
file-name-as-directory, which means a user-typed +*.json or +/foo.txt
becomes "*.json/" or "foo.txt/" and quietly never matches anything.
Spot the obvious misuses (anything containing *, ?, or [) at parse
time and emit a warning so the user can correct the file or move the
pattern to an ignore/ensure rule.
|
|
Under alien indexing the dirconfig file is silently ignored, which
is the most common confusion in the issue tracker (#1322, #1075,
#1534, #1941). Show a one-shot display-warning the first time we
index a project where alien mode meets a non-empty .projectile.
The new projectile-warn-when-dirconfig-is-ignored option lets users
who already understand the trade-off silence the warning.
|
|
A user accidentally typing " -path/" or " # comment" in .projectile
would have the line silently routed to the ignore bucket with the
prefix character left intact, because the parser dispatched on the
first character of the line without trimming. Skip leading spaces and
tabs before the pcase so the +/-/! and comment-prefix markers are
matched regardless of indentation. Reported in #1508.
|
|
|
|
|
|
|
|
|
|
|
|
seq-union is not available in Emacs 27's built-in seq.el.
Use (seq-uniq (append ...)) which achieves the same result.
|
|
Migrate cl-remove-if-not → seq-filter, cl-remove-if → seq-remove,
cl-some → seq-some, cl-every → seq-every-p, cl-find-if → seq-find,
cl-mapcan → mapcan, cl-union → seq-union, cl-sort → seq-sort,
cl-case → pcase, and delete projectile-difference in favor of
seq-difference. Manual replacements for cl-notany, cl-typep, cl-incf,
cl-remove, and cl-subst.
cl-lib is still required for cl-defun, cl-defmethod, cl-loop, cl-letf,
and cl-flet*.
|
|
Add (compat "30") as a dependency, which backports newer Emacs
functions to older versions with zero overhead on modern Emacs.
Changes enabled by compat:
- Use string-replace instead of replace-regexp-in-string for literal
replacements (resolves TODO in projectile-complementary-dir)
Also simplified version-conditional code now safe with Emacs 27.1+:
- Remove redundant fboundp check for xref-references-in-directory
- Remove redundant fboundp check for xref-find-definitions
- Simplify auto tags backend to prefer ggtags then xref
|
|
Emacs 27.1 was released nearly 6 years ago (August 2020). Bumping
the minimum version lets us remove ~30 lines of compatibility code:
- Remove fileloop fallback using deprecated tags-loop-scan/operate
- Fix tags-query-replace FIXME in projectile-replace-regexp by using
fileloop-initialize-replace + fileloop-continue
- Replace projectile-flatten with built-in flatten-tree (6 call sites)
- Simplify projectile-time-seconds to just (time-convert nil 'integer)
- Use proper-list-p for known-projects file validation
- Use json-parse-buffer unconditionally in CMake preset reader
- Use package-get-version unconditionally
- Add (require 'fileloop) as a proper dependency
- Drop Emacs 26.3 from CI matrix
|
|
Document 8 user-visible changes that were missing:
- #1964: project.el project-name and project-buffers integration
- #1962: fix other-file crash for root directory files
- projectile-add-known-project keybinding (A) and menu entry
- projectile-ripgrep glob quoting fix for zsh
- CMake version parsing robustness
- Jujutsu file listing template syntax
- build.mill as Mill project marker
- Emacs 31+ compatibility (obsolete macro replacements)
|
|
- Wrap file-expand-wildcards in ignore-errors so project root
detection works when parent directories are not readable,
e.g. on iCloud Drive or Termux (#1816)
- Preserve the user's compilation-buffer-name-function instead of
unconditionally binding it to nil in projectile--run-project-cmd,
so custom buffer naming works when projectile-per-project-compilation-buffer
is nil (#1841)
|
|
- Pass unique=t to rename-buffer in projectile-grep so subsequent
greps don't fail with "buffer name in use", which prevented
projectile-grep-finished-hook from running (#1687)
- Filter nonexistent files from projectile-replace-regexp file list
to avoid stopping on deleted files (#1456)
- Validate that deserialized known-projects data is a proper list,
gracefully handling corrupted bookmarks files (#1939)
|
|
- Update the mode-line via window-configuration-change-hook so
non-file buffers like Magit display correct project info (#1823)
- Use projectile-acquire-root instead of projectile-project-root in
projectile--run-project-cmd to prevent wrong-type-argument error
when running commands in newly created projects (#1886)
|
|
projectile-root-top-down used projectile-locate-dominating-file which
stops at the first (bottommost) match going up the directory tree.
This made it behave identically to projectile-root-bottom-up.
Add projectile-locate-dominating-file-top-down which walks the entire
directory hierarchy and returns the topmost match. For example, with
nested Makefiles at both project/ and project/subdir/, searching from
project/subdir/ now correctly returns project/ instead of
project/subdir/.
|
|
projectile-project-dirs previously only returned directories that
directly contain files, missing intermediate directories that contain
only subdirectories (e.g. src/ when it only has src/ComponentA/).
Fix by walking each file path's ancestor directories up to the project
root, so all intermediate directories are included.
|
|
#1554)
Two unrelated small fixes:
1. projectile-cache-current-file now checks file-exists-p before adding
a file to the cache. This prevents ghost entries when visiting a new
file with find-file and abandoning the buffer without saving.
2. Add -F (fixed-string) flag to the grep and git-grep commands used by
projectile-files-with-string, matching what rg, ag, and ack already
do. This fixes errors when the search string contains regex special
characters like [ ] and @.
|
|
Two bugs in projectile-replace:
1. fileloop is autoloaded but never required, so (fboundp
#'fileloop-continue) returns nil and the function falls back to the
legacy Emacs 25/26 code path even on Emacs 27+. Fix by requiring
fileloop before the check.
2. fileloop-initialize-replace expects a regexp, but projectile-replace
is documented to do literal replacement. Fix by wrapping the search
term with regexp-quote.
|
|
When fd is unavailable or disabled, `git ls-files -zco --exclude-standard`
returns files still tracked in the index even if deleted from disk. This
causes projectile-dir-files-alien to list ghost files. Fix by running
`git ls-files -zd` and removing those entries from the result.
|
|
Wrap the directory-files call in ignore-errors so that unreadable
directories (e.g. .Spotlight-V100 on macOS) are silently skipped
instead of aborting the entire native indexing operation.
|
|
Newer fd versions (8.3.0+) prepend "./" to output. The --strip-cwd-prefix
flag was already added to projectile-generic-command and projectile-git-fd-args,
but this flag doesn't exist in older fd versions, causing errors.
Add post-processing in projectile-files-via-ext-command to strip the "./"
prefix from results as a defensive fallback, matching the existing pattern
in projectile-files-from-cmd.
Fixes #1749
|
|
On case-insensitive filesystems (macOS default), a ~/workspace directory
matches the "WORKSPACE" Bazel marker because file-exists-p returns t for
both files and directories. This causes the home directory to be falsely
detected as a Bazel project root, leading to severe performance issues.
Add a (not (file-directory-p ...)) guard in projectile-root-top-down so
that only regular files can satisfy file-type marker checks.
Fixes #1961
|
|
|
|
|
|
- Include projectile-cache-file in projectile-globally-ignored-files default
- Add :safe predicate to allow dir-locals configuration
- Add tests for default values and :safe predicate validation
- Update related file and test matching functions to use let* variants
- Improve variable binding consistency and future compatibility
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #1954
|
|
Safe values are:
- nil to go back using `projectile-project-name-function'
- non-blank strings
|
|
|
|
|
|
|
|
That's a safer default, given the changes to its behavior in 2.9.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It allows to ignore files and directories with regexp patterns.
This provides a clear separations between configuration entries
are treated as regular strings and those that are treated as regular
expressions.
|
|
|