* lisp/progmodes/project.el (project--files-in-directory):
Make sure the directory includes the trailing slash in case it's
a symlink, discussed in
https://lists.gnu.org/archive/html/emacs-devel/2021-01/msg00345.html.
* lisp/progmodes/xref.el (xref-matches-in-directory): Same.
* lisp/cedet/semantic/symref/grep.el (semantic-symref-perform-search):
Same.
(erase-buffer)
(setq default-directory rootdir)
(let ((cmd (semantic-symref-grep-use-template
- (file-local-name rootdir) filepattern grepflags greppat)))
+ (file-name-as-directory (file-local-name rootdir))
+ filepattern grepflags greppat)))
(process-file semantic-symref-grep-shell nil b nil
shell-command-switch cmd)))
(setq ans (semantic-symref-parse-tool-output tool b))
(localdir (file-local-name (expand-file-name dir)))
(command (format "%s %s %s -type f %s -print0"
find-program
- localdir
+ ;; In case DIR is a symlink.
+ (file-name-as-directory localdir)
(xref--find-ignores-arguments ignores localdir)
(if files
(concat (shell-quote-argument "(")
;; do that reliably enough, without creating false negatives?
(command (xref--rgrep-command (xref--regexp-to-extended regexp)
files
- (file-local-name (expand-file-name dir))
+ (file-name-as-directory
+ (file-local-name (expand-file-name dir)))
ignores))
(def default-directory)
(buf (get-buffer-create " *xref-grep*"))