bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#46203: 28.0.50; flymake doesn't start in java-mode; here is debugger


From: Lian Hung Hon
Subject: bug#46203: 28.0.50; flymake doesn't start in java-mode; here is debugger output
Date: Sun, 14 Mar 2021 12:43:55 +0800

In flymake-proc.el:

(defun flymake-proc--delete-temp-directory (dir-name)
  "Attempt to delete temp dir created by `flymake-proc-create-temp-with-folder-structure', do not fail on error."
  (let* ((temp-dir    temporary-file-directory)
(suffix      (substring dir-name (1+ (length (directory-file-name temp-dir))))))
    (while (> (length suffix) 0)
      (setq suffix (directory-file-name suffix))
      ;;+(flymake-log 0 "suffix=%s" suffix)
      (flymake-proc--safe-delete-directory
       (file-truename (expand-file-name suffix temp-dir)))
      (setq suffix (file-name-directory suffix)))))

Line 901 should be

  (let* ((temp-dir    (file-truename temporary-file-directory))

This is because the default value of variable temporary-file-directory might be abbreviated, so substring does not work correctly. For example, on my system (Windows) the default value is "c:/Users/HECTOR~1/AppData/Local/Temp/". It ended up trying to delete my source directory (!), but fortunately permission is denied.

A workaround is to manually set temporary-file-directory in .emacs to the correct full path.

Regards,
Hon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]