| Age | Commit message (Collapse) | Author |
|
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.
|
|
The existing parser tests stub insert-file-contents; nothing exercises
the full IO path. Add three sandbox-based tests: a mixed +/-/!/no-prefix
file, a non-ASCII round-trip, and a file with no trailing newline. These
guard against IO-layer regressions that the stubbed tests can't see.
|
|
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.
|
|
The parser docstring only described + and - prefixes even though the
function returns a 3-tuple including the ! ensure bucket. Fill that
in, and pull the path-vs-glob distinction out of the prose in
projects.adoc into a subsection of its own — that ambiguity is at
the root of recurring confusion (#740, #1109, #680, #1941).
|
|
The mtime-keyed cache around projectile-parse-dirconfig-file had no
direct coverage. Cover the four invariants that matter: a cache hit
on repeat calls, a re-parse when mtime advances, no caching of a nil
result for a missing file, and entry removal via
projectile-invalidate-cache (the path that previously crashed in #1854).
|
|
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.
|
|
Fixes #1815
Fixes #1715
When two projects share the same name (e.g. both named "src"),
projectile-generate-process-name now detects the collision and
falls back to using the abbreviated project path in the buffer
name instead of just the project name.
|
|
Fixes #1959
projectile-ignored-file-p now checks projectile-globally-ignored-file-suffixes
in addition to projectile-globally-ignored-files and file patterns.
Previously the suffix check only happened in projectile-remove-ignored
which is used by hybrid indexing but not native indexing.
|
|
Closes #1684
With a prefix argument, projectile-dired, projectile-dired-other-window,
and projectile-dired-other-frame now prompt for a known project to open
in dired, rather than always using the current project.
|
|
Closes #1227
projectile-replace now intersects the files found by rg/ag/grep with
the project's file list from projectile-dir-files, ensuring that files
ignored via .projectile or other ignore rules are excluded from
replacement. Previously the external search tool's results were used
directly, which could include backup files and other ignored entries.
|
|
Closes #1001
Add a new command that lists all files under the project root using
a generic file listing command (fd or find), bypassing .gitignore,
.projectile, and other ignore mechanisms. This is useful when you
need to find files that are normally excluded from the project.
|
|
|
|
Fixes #1923
When compilation output references a file via a relative path, the
advice now also checks if the file exists relative to the project root
and adds its parent directory to the search path. This handles the
edge case where a directory only contains subdirectories (no files
directly) and therefore was not included in the file-derived directory
list from projectile-current-project-dirs.
|
|
|
|
- Test projectile-ignored-project-p truename normalization
- Test projectile-determine-find-tag-fn fallback behavior
- Update projectile-files-via-ext-command test for empty string guard
|
|
add-dir-local-variable switches to the .dir-locals.el buffer.
Without save-selected-window, kill-buffer and the subsequent
buffer-file-name check operated on unpredictable buffers. This
matches the pattern already used in projectile-add-dir-local-variable.
|
|
The seq-sort comparator ignored its second argument, producing
undefined ordering. The intent was just to prioritize files from
sibling directories. Replace with a clear two-bucket partition:
sibling-dir files first, then the rest.
|
|
unwind-protect ran save-buffer even when the user aborted skeleton
insertion with C-g, creating a .dir-locals.el with empty/partial
content. Run save-buffer sequentially after the skeleton instead,
so aborting leaves no file on disk.
|
|
projectile-ignored-projects returns truename-resolved paths, but
callers pass abbreviated or unnormalized paths. The member check
would fail to match (e.g., ~/work/ vs /Users/bob/work/). Resolve
project-root to truename before comparing.
|
|
file-expand-wildcards uses default-directory for relative patterns,
which was whatever the current buffer had rather than the project
root. Bind default-directory to the project root and return relative
paths so projectile-expand-paths resolves them correctly downstream.
|
|
find-tag was removed in Emacs 29. When the configured tags backend
(ggtags or etags-select) is unavailable, fall back to
xref-find-definitions instead, which is available since Emacs 25.1.
|
|
Replace private xref--show-xrefs with public xref-show-xrefs. The
private function's signature changed across Emacs versions. Keep
xref-references-in-directory to scope the search to Projectile's
project root.
|
|
The filename text at point (from thing-at-point or region) was used
directly as a regexp pattern in string-match. Characters like [ ] ( )
would cause invalid-regexp errors or incorrect matches. Use
string-search for literal substring matching instead.
|
|
projectile-get-sub-projects-command returned "" for non-git VCSes,
which passed the stringp guard in projectile-files-via-ext-command
and spawned a useless shell process. Return nil instead, and also
make the guard defensive against empty strings to match the
docstring's contract.
|
|
|
|
- Test sort-by-modification-time handles nil file-attributes
- Test projectile--merge-related-files-fns merges correctly across
keys, within same key, and does not mutate original return values
- Test projectile-load-project-cache does not store nil on corrupt
cache files
|
|
nconc destructively modifies the existing plist value, which can
corrupt shared data from related-files-fn return values. It also
silently drops values when the existing list is nil (nconc of nil
doesn't update the plist entry in place). Using append with
explicit plist-put fixes both issues.
|
|
When no command is configured for a project type and
compilation-read-command is nil (skipping the prompt), the nil
command would reach (compile nil) and signal a cryptic
wrong-type-argument error. Signal a clear user-error instead.
|
|
recentf stores canonical paths (with symlinks resolved), so the
project root must also be truename-resolved for string-prefix-p
matching to work when the project path contains symlinks.
|
|
file-attributes returns nil for deleted files, causing
file-attribute-modification-time to error. Use 0 as the fallback
timestamp so deleted files sort to the end instead of crashing.
|
|
Like projectile-project-buffers, pass a shared truename-cache hash
table to projectile-project-buffer-p to avoid redundant
file-truename calls when iterating over the buffer list.
|
|
The format call passed both project-root and compile-dir, but no
project type's configure command uses two %s placeholders (meson
uses one for the project root). The extra argument was silently
ignored.
|
|
The function created a temp buffer and ran hack-dir-local-variables
on every compile/test/run invocation just to read a variable that
dir-locals already set buffer-locally in file buffers. Simply read
the variable directly.
|
|
The unbounded (while (vc-dir-busy) ...) loop could freeze Emacs
indefinitely if vc-dir hangs (e.g., broken remote repo). This is
especially dangerous when called for every known project via
projectile-check-vcs-status-of-known-projects.
|
|
The new-process argument was ignored when generating the eat buffer
name (hardcoded nil), so requesting a new process via prefix arg
would always reuse the same buffer name. This matches the behavior
already used in projectile--vterm.
|
|
mapcar wraps each recursive result in a list, producing nested lists
that only work because flatten-tree compensates downstream. mapcan
properly concatenates the results into a flat list.
|
|
When projectile-unserialize returns nil (corrupt or empty file),
don't store nil in projectile-projects-cache. A nil entry prevents
future reload attempts until the user manually invalidates.
|
|
Reuse the already-resolved `current-project` binding instead of
calling projectile-project-root a second time. Avoids redundant
root resolution and a subtle correctness risk if the two calls
returned different values.
|
|
|
|
- Test that projectile-update-project-type resets cache with 'equal test
- Test safe-local-variable predicates for project settings variables
- Test that projectile-project-type passes project-root through to
detect-project-type
|
|
projectile-project-type already resolves the project root. Pass it
through to projectile-detect-project-type so it doesn't resolve it
a second time just for the cache key.
|
|
nconc destructively modifies the list returned by
projectile-get-immediate-sub-projects, which could affect any caller
holding a reference to that list. Use append for a non-destructive
alternative.
|
|
The deleted file check used member inside seq-remove, which is O(n*m)
where n is total files and m is deleted files. Convert the deleted
list to a hash set for O(1) lookups, making the overall operation O(n).
|
|
Variables documented as "should be set via .dir-locals.el" were missing
safe-local-variable properties, causing Emacs to prompt for confirmation
every time they were encountered. Add stringp for command and directory
variables, booleanp for the caching toggle.
Intentionally omit projectile-project-related-files-fn since it accepts
functions, which cannot be safely evaluated from dir-locals.
|
|
file-truename resolves symlinks via synchronous I/O, which can hang
Emacs when the project is on a remote host via TRAMP. expand-file-name
is sufficient here (it normalizes path components) and works safely
with remote paths.
|
|
The buffer-limiting function was called before the file-remote-p guard
in projectile-find-file-hook-function, triggering expensive buffer
enumeration and file-truename calls on every remote file open. Move
it inside the existing TRAMP guard.
|
|
When called with :precedence, the function recreated the type cache
hash table without :test 'equal, defaulting to eql. Since project
roots are strings, no cache key would ever match, causing perpetual
re-detection of project types until Emacs was restarted.
|
|
|
|
- projectile-purge-file-from-cache: verify it serializes the updated
file list (not the stale original) to disk
- projectile-default-generic-command: test string commands, symbol
commands, lambda commands, and missing commands
- projectile-sort-by-modification-time: verify descending sort order
- projectile-project-buffer-p: verify the truename cache is used and
avoids redundant file-truename calls
|
|
Move projectile--dirconfig-cache near other cache variables to fix
byte-compilation warning. Also skip caching when file-attributes
returns nil (e.g. file doesn't exist) to avoid false cache hits.
|