Subject: bug#38648: 27.0.50; Emacs `compile' command does not handle remote (over TRAMP) file name correctly

From: Fan Yang <[email-masked]>
Date: Tue, 17 Dec 2019 20:44:28 +0800

Re-produce steps:

1. `find-file' to my project root directory on a remote machine,
   namely, "/scp:vm00:pmdk-balloon/".
2. `M-x compile', and give compile command "make".
3. (Previously I have injected some typos in some of my source files,
   say "obj.c").
4. In the *compilation* buffer, the "obj.c" file appears.  But when I
   click the underlined text (or <RET> on it), an error occurs in the
   minibuffer:

   "Find this error in (default obj.c): /scp:vm00:/System/Volumes/Data/home/fan/pmdk-balloon/src/libpmemobj"

   The "/System/Volumes/Data/" is actually a path on my local machine.
5. To further confirm, I use `C-u C-x =' on the underlined text in the
   *compilation* buffer.  The "compilation-message" text property shows:

   #s(compilation--message
   (nil 42
        (("../common/vec.h" "/scp:vm00:/System/Volumes/Data/home/fan/pmdk-balloon/src/libpmemobj")
         nil
         (42 #1))
        nil nil)
   0 nil)

It appears that when compile.el was handling the remote path, it
mixed-up part of my local machine path with the
remote machine path, resulting the error.

I use Edebug to instrument `compilation-get-file-structure' and
then `file-truename' to find when my local path "/System/Volumes/Data/"
is inserted, here is a backtrace:

  lines started with a "*" is what I think important.

  (file-symlink-p filename)
  (setq target (file-symlink-p filename))
  (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))
  (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
  file-truename("/System" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
  file-truename("/System/Volumes" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
* file-truename("/System/Volumes/Data" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
* file-truename("/home" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
  file-truename("/home/fan" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
  file-truename("/home/fan/pmdk-balloon" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
  file-truename("/home/fan/pmdk-balloon/src" (91) (nil))
  (file-name-as-directory (file-truename dirfile counter prev-dirs))
  (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))
  (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))
  (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new))))
  (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory (file-truename dirfile counter prev-dirs)))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))
  (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir (car prev-dirs)))) (let ((old dir) (new (file-name-as-directory ...))) (setcar prev-dirs (cons (cons old new) (car prev-dirs))) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t))))))
  (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr (assoc dir ...))) (let ((old dir) (new ...)) (setcar prev-dirs (cons ... ...)) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory (directory-file-name dir))) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir (file-name-nondirectory filename))) (setq target (file-symlink-p filename)) (if target (setq filename (files--splice-dirname-file dir target) done nil) (setq done t)))))))
  (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or (file-name-directory filename) default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq (compare-strings dir 0 nil dirfile 0 nil t) t)) (if (assoc dir (car prev-dirs)) (setq dir (cdr ...)) (let (... ...) (setcar prev-dirs ...) (setq dir new)))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name (file-name-directory ...)) done t) (if (equal "." (file-name-nondirectory filename)) (setq filename (directory-file-name dir) done t) (setq filename (concat dir ...)) (setq target (file-symlink-p filename)) (if target (setq filename ... done nil) (setq done t))))))))
  (let (done (file-name-handler-alist (if prev-dirs file-name-handler-alist (let ((tem (copy-sequence file-name-handler-alist))) (delq (rassq 'ange-ftp-completion-hook-function tem) tem))))) (or prev-dirs (setq prev-dirs (list nil))) (if (eq system-type 'windows-nt) (if (string-match "[[*?]" filename) nil (let ((longname (w32-long-file-name filename))) (if longname (setq filename longname))))) (while (not done) (setcar counter (1- (car counter))) (if (< (car counter) 0) (error "Apparent cycle of symbolic links for %s" filename)) (let ((handler (find-file-name-handler filename 'file-truename))) (if handler (setq filename (funcall handler 'file-truename filename) done t) (let ((dir (or ... default-directory)) target dirfile) (setq dirfile (directory-file-name dir)) (or (string= dir dirfile) (and (file-name-case-insensitive-p dir) (eq ... t)) (if (assoc dir ...) (setq dir ...) (let ... ... ...))) (if (equal ".." (file-name-nondirectory filename)) (setq filename (directory-file-name ...) done t) (if (equal "." ...) (setq filename ... done t) (setq filename ...) (setq target ...) (if target ... ...))))))) filename)
  file-truename("/home/fan/pmdk-balloon/src/libpmemobj")
  (if (cdr file) (file-truename (cdr file)))
  (let ((filename (car file)) (spec-directory (if (cdr file) (file-truename (cdr file))))) (when (and (boundp 'comint-file-name-prefix) (not (equal comint-file-name-prefix ""))) (if (file-name-absolute-p filename) (setq filename (concat comint-file-name-prefix filename)) (if spec-directory (setq spec-directory (file-truename (concat comint-file-name-prefix spec-directory)))))) (unless (memq compilation-parse-errors-filename-function '(nil identity)) (save-match-data (setq filename (funcall compilation-parse-errors-filename-function filename)))) (if (stringp filename) (setq filename (command-line-normalize-file-name filename))) (puthash file (or (gethash (cons filename spec-directory) compilation-locs) (puthash (cons filename spec-directory) (compilation--make-file-struct (list filename spec-directory) fmt) compilation-locs)) compilation-locs))
  (or (gethash file compilation-locs) (let ((filename (car file)) (spec-directory (if (cdr file) (file-truename (cdr file))))) (when (and (boundp 'comint-file-name-prefix) (not (equal comint-file-name-prefix ""))) (if (file-name-absolute-p filename) (setq filename (concat comint-file-name-prefix filename)) (if spec-directory (setq spec-directory (file-truename (concat comint-file-name-prefix spec-directory)))))) (unless (memq compilation-parse-errors-filename-function '(nil identity)) (save-match-data (setq filename (funcall compilation-parse-errors-filename-function filename)))) (if (stringp filename) (setq filename (command-line-normalize-file-name filename))) (puthash file (or (gethash (cons filename spec-directory) compilation-locs) (puthash (cons filename spec-directory) (compilation--make-file-struct (list filename spec-directory) fmt) compilation-locs)) compilation-locs)))
  compilation-get-file-structure(("../common/vec.h" . "/home/fan/pmdk-balloon/src/libpmemobj") nil)
  compilation-internal-error-properties(("../common/vec.h" . "/home/fan/pmdk-balloon/src/libpmemobj") 42 nil nil nil 0 nil)
  compilation-error-properties(1 2 nil 3 nil (4 . 5) nil)
  compilation-parse-errors(1941 #<marker at 2809 in *compilation*>)
  compilation--parse-region(1941 #<marker at 2809 in *compilation*>)
  compilation--ensure-parse(2462)
  compilation-filter(#<process compilation> "In file included from ../common/vec.h:42,\n        ...")

Then I find that in my environment, `(file-symlink-p "/home")' is
evaluated to "/System/Volumes/Data/home".  Now I stuck here since I know
little about TRAMP and how a remote file path should be handled.

Do you have any suggestion or idea to fix this bug?  Thanks in advance
for your time.

Other information:

1. macOS Catalina 10.15.2
2. My emacs is at commit 9ee5af315098245d9f58eb5562dca6997cab4426, Dec 14, 2019.

In GNU Emacs 27.0.50 (build 2, x86_64-apple-darwin19.2.0, NS appkit-1894.20 Version 10.15.2 (Build 19C57))
 of 2019-12-15 built on Fans-Air.ipads-lab.se.sjtu.edu.cn
Repository revision: 9ee5af315098245d9f58eb5562dca6997cab4426
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.2

Recent messages:
Tramp: Found remote shell prompt on ‘vm00’
Tramp: Opening connection for vm00 using scp...done
Compilation exited abnormally with code 2
Mark saved where search started
Type "q" in help window to restore its previous buffer.
Char: h (104, #o150, #x68) point=1977 of 2808 (70%) column=36
mouse-2, RET: describe this character set
mouse-2, RET: show this character in its character set
mouse-2, RET: Push this button
mouse-2, RET: pretty print value in another buffer

Configured using:
 'configure --prefix=/Users/fan/src/emacs/out
 CPPFLAGS=-I/usr/local/opt/libxml2/include/libxml2/
 LDFLAGS=-L/usr/local/opt/libxml2/lib --with-ns'

Configured features:
RSVG GLIB NOTIFY KQUEUE ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS PDUMPER LCMS2 GMP

Important settings:
  value of $LC_ALL: 
  value of $LC_COLLATE: zh_CN.UTF-8
  value of $LC_CTYPE: zh_CN.UTF-8
  value of $LC_MESSAGES: zh_CN.UTF-8
  value of $LC_MONETARY: zh_CN.UTF-8
  value of $LC_NUMERIC: zh_CN.UTF-8
  value of $LC_TIME: zh_CN.UTF-8
  value of $LANG: zh_CN.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs
text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils pp wid-edit descr-text help-mode easymenu
misearch multi-isearch compile dired dired-loaddefs tramp-cache tramp-sh
tramp tramp-loaddefs trampver tramp-integration files-x tramp-compat
shell pcomplete comint ansi-color ring parse-time iso8601 time-date
ls-lisp format-spec auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json subr-x map seq byte-opt gv bytecomp
byte-compile cconv edmacro kmacro cl-loaddefs cl-lib china-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 74466 9616)
 (symbols 48 20580 1)
 (strings 32 82411 1816)
 (string-bytes 1 2108733)
 (vectors 16 15285)
 (vector-slots 8 631222 14248)
 (floats 8 48 31)
 (intervals 56 749 0)
 (buffers 1000 18))