GNU bug report logs - #31022
27.0.50; darwin: Infinite recursion in tramp-file-name-handler

Previous Next

Package: emacs;

Reported by: Simon Leinen <simon.leinen <at> switch.ch>

Date: Mon, 2 Apr 2018 12:18:01 UTC

Severity: normal

Found in version 27.0.50

Fixed in version 26.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31022 in the body.
You can then email your comments to 31022 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31022; Package emacs. (Mon, 02 Apr 2018 12:18:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Simon Leinen <simon.leinen <at> switch.ch>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 02 Apr 2018 12:18:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Leinen <simon.leinen <at> switch.ch>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 27.0.50; darwin: Infinite recursion in tramp-file-name-handler
Date: Mon, 2 Apr 2018 13:56:04 +0200
From a drawin host, visit a file on a non-darwin remote host via tramp,
using C-x C-f /sshx:HOST:/DIR/FILE

From that buffer, try to visit another file on that same host, or simply
trigger file name completion by typing e.g. C-x C-f TAB

Instead of the desired result, you will see an error message such as

  tramp-file-name-handler: Lisp nesting exceeds ‘max-lisp-eval-depth’

(See below for analysis and a proposed patch.)

Using debug-on-quit, I obtained the following backtrace:

Debugger entered--Lisp error: (quit)
  signal(quit nil)
  tramp-file-name-handler(process-file "/bin/sh" nil #<buffer  *string-output*-55262> nil "-c" "getconf DARWIN_USER_TEMP_DIR")
  apply(tramp-file-name-handler process-file "/bin/sh" nil #<buffer  *string-output*-55262> nil ("-c" "getconf DARWIN_USER_TEMP_DIR"))
  process-file("/bin/sh" nil #<buffer  *string-output*-55262> nil "-c" "getconf DARWIN_USER_TEMP_DIR")
  apply(process-file "/bin/sh" nil #<buffer  *string-output*-55262> nil ("-c" "getconf DARWIN_USER_TEMP_DIR"))
  tramp-handle-shell-command("getconf DARWIN_USER_TEMP_DIR" t nil)
  apply(tramp-handle-shell-command ("getconf DARWIN_USER_TEMP_DIR" t nil))
  tramp-sh-file-name-handler(shell-command "getconf DARWIN_USER_TEMP_DIR" t nil)
  apply(tramp-sh-file-name-handler shell-command ("getconf DARWIN_USER_TEMP_DIR" t nil))
  tramp-file-name-handler(shell-command "getconf DARWIN_USER_TEMP_DIR" t nil)
  shell-command("getconf DARWIN_USER_TEMP_DIR" t)
  shell-command-to-string("getconf DARWIN_USER_TEMP_DIR")
  (progn (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR"))
  (condition-case nil (progn (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")) (error nil))
  (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR"))
  (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp))
  (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")
  (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))
  (file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
  eval((file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
  tramp-sh-handle-expand-file-name("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  apply(tramp-sh-handle-expand-file-name ("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/"))
  tramp-sh-file-name-handler(expand-file-name "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  apply(tramp-sh-file-name-handler expand-file-name ("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/"))
  tramp-file-name-handler(expand-file-name "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  file-directory-p("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'")
  (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)
  (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp))
  (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")
  (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))
  (file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
  eval((file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
  tramp-sh-handle-expand-file-name("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  apply(tramp-sh-handle-expand-file-name ("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/"))
  tramp-sh-file-name-handler(expand-file-name "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  apply(tramp-sh-file-name-handler expand-file-name ("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/"))
  tramp-file-name-handler(expand-file-name "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  file-directory-p("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'")
  (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)
  (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp))
  (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")
  (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))
  (file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
  eval((file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
  tramp-sh-handle-expand-file-name("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  apply(tramp-sh-handle-expand-file-name ("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/"))
  tramp-sh-file-name-handler(expand-file-name "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  apply(tramp-sh-file-name-handler expand-file-name ("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/"))
  tramp-file-name-handler(expand-file-name "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'" "/sshx:unil0005:/var/log/ceph/")
  file-directory-p("getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'")
  (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)
  (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp))
  (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")
  (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))
  (file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp"))))
  eval((file-name-as-directory (cond ((memq system-type '(ms-dos windows-nt)) (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp")) ((eq system-type 'darwin) (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") (let ((tmp (ignore-errors (shell-command-to-string "getconf DARWIN_USER_TEMP_DIR")))) (and (stringp tmp) (setq tmp (replace-regexp-in-string "\n\\'" "" tmp)) (file-directory-p tmp) tmp)) "/tmp")) (t (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
  tramp-sh-handle-expand-file-name("/sshx:unil0005:/var/log/ceph" nil)
  apply(tramp-sh-handle-expand-file-name ("/sshx:unil0005:/var/log/ceph" nil))
  tramp-sh-file-name-handler(expand-file-name "/sshx:unil0005:/var/log/ceph" nil)
  apply(tramp-sh-file-name-handler expand-file-name ("/sshx:unil0005:/var/log/ceph" nil))
  tramp-file-name-handler(expand-file-name "/sshx:unil0005:/var/log/ceph" nil)
  expand-file-name("/sshx:unil0005:/var/log/ceph")
  tramp-handle-file-remote-p("/sshx:unil0005:/var/log/ceph" nil nil)
  apply(tramp-handle-file-remote-p ("/sshx:unil0005:/var/log/ceph" nil nil))
  tramp-sh-file-name-handler(file-remote-p "/sshx:unil0005:/var/log/ceph" nil nil)
  apply(tramp-sh-file-name-handler file-remote-p ("/sshx:unil0005:/var/log/ceph" nil nil))
  tramp-file-name-handler(file-remote-p "/sshx:unil0005:/var/log/ceph" nil nil)
  file-remote-p("/sshx:unil0005:/var/log/ceph")
  tramp-handle-substitute-in-file-name("/sshx:unil0005:/var/log/ceph")
  apply(tramp-handle-substitute-in-file-name "/sshx:unil0005:/var/log/ceph")
  tramp-sh-file-name-handler(substitute-in-file-name "/sshx:unil0005:/var/log/ceph")
  apply(tramp-sh-file-name-handler substitute-in-file-name "/sshx:unil0005:/var/log/ceph")
  tramp-file-name-handler(substitute-in-file-name "/sshx:unil0005:/var/log/ceph")
  substitute-in-file-name("/sshx:unil0005:/var/log/ceph")
  completion--sifn-requote(29 "/sshx:unil0005:/var/log/ceph/")
  completion--twq-try("/sshx:unil0005:/var/log/ceph/" "/sshx:unil0005:/var/log/ceph/" "/sshx:unil0005:/var/log/ceph/" 29 substitute-in-file-name completion--sifn-requote)
  #f(compiled-function (unquoted-result op) #<bytecode 0x42920bed>)(("/sshx:unil0005:/var/log/ceph/" . 29) 1)
  completion--nth-completion(1 "/sshx:unil0005:/var/log/ceph/" read-file-name-internal file-exists-p 29 (metadata (category . file) (completion--unquote-requote . t)))
  completion-try-completion("/sshx:unil0005:/var/log/ceph/" read-file-name-internal file-exists-p 29 (metadata (category . file) (completion--unquote-requote . t)))
  completion--do-completion(12 41)
  completion--in-region-1(12 41)
  #f(compiled-function (start end collection predicate) #<bytecode 0x410da4d3>)(12 41 read-file-name-internal file-exists-p)
  apply(#f(compiled-function (start end collection predicate) #<bytecode 0x410da4d3>) (12 41 read-file-name-internal file-exists-p))
  #f(compiled-function (funs global args) #<bytecode 0x40f1289d>)(nil nil (12 41 read-file-name-internal file-exists-p))
  completion--in-region(12 41 read-file-name-internal file-exists-p)
  completion-in-region(12 41 read-file-name-internal file-exists-p)
  minibuffer-complete()
  funcall-interactively(minibuffer-complete)
  call-interactively(minibuffer-complete nil nil)
  command-execute(minibuffer-complete)
  read-from-minibuffer("Find file: " "/sshx:unil0005:/var/log/ceph/" (keymap (keymap (32)) keymap (10 . minibuffer-complete-and-exit) (13 . minibuffer-complete-and-exit) keymap (menu-bar keymap (minibuf "Minibuf" keymap (tab menu-item "Complete" minibuffer-complete :help "Complete as far as possible") (space menu-item "Complete Word" minibuffer-complete-word :help "Complete at most one word") (63 menu-item "List Completions" minibuffer-completion-help :help "Display all possible completions") "Minibuf")) (27 keymap (118 . switch-to-completions)) (prior . switch-to-completions) (63 . minibuffer-completion-help) (32 . minibuffer-complete-word) (9 . minibuffer-complete) keymap (menu-bar keymap (minibuf "Minibuf" keymap (previous menu-item "Previous History Item" previous-history-element :help "Put previous minibuffer history element in the minibuffer") (next menu-item "Next History Item" next-history-element :help "Put next minibuffer history element in the minibuffer") (isearch-backward menu-item "Isearch History Backward" isearch-backward :help "Incrementally search minibuffer history backward") (isearch-forward menu-item "Isearch History Forward" isearch-forward :help "Incrementally search minibuffer history forward") (return menu-item "Enter" exit-minibuffer :key-sequence "\15" :help "Terminate input and exit minibuffer") (quit menu-item "Quit" abort-recursive-edit :help "Abort input and exit minibuffer") "Minibuf")) (10 . exit-minibuffer) (13 . exit-minibuffer) (7 . abort-recursive-edit) (C-tab . file-cache-minibuffer-complete) (9 . self-insert-command) (XF86Back . previous-history-element) (up . previous-line-or-history-element) (prior . previous-history-element) (XF86Forward . next-history-element) (down . next-line-or-history-element) (next . next-history-element) (27 keymap (114 . previous-matching-history-element) (115 . next-matching-history-element) (112 . previous-history-element) (110 . next-history-element))) nil file-name-history "/sshx:unil0005:/var/log/ceph/" nil)
  completing-read-default("Find file: " read-file-name-internal file-exists-p confirm-after-completion "/sshx:unil0005:/var/log/ceph/" file-name-history "/sshx:unil0005:/var/log/ceph/" nil)
  completing-read("Find file: " read-file-name-internal file-exists-p confirm-after-completion "/sshx:unil0005:/var/log/ceph/" file-name-history "/sshx:unil0005:/var/log/ceph/")
  read-file-name-default("Find file: " nil "/sshx:unil0005:/var/log/ceph/" confirm-after-completion nil nil)
  read-file-name("Find file: " nil "/sshx:unil0005:/var/log/ceph/" confirm-after-completion)
  find-file-read-args("Find file: " confirm-after-completion)
  byte-code("\300\301\302 \"\207" [find-file-read-args "Find file: " confirm-nonexistent-file-or-buffer] 3)
  call-interactively(find-file nil nil)
  command-execute(find-file)

The problem here is that tramp ((TRAMP-COMPAT-TEMPORARY-FILE-DIRECTORY))
evaluates the standard value of TEMPORARY-FILE-DIRECTORY (defined in
cus-start.el), which calls SHELL-COMMAND-TO-STRING on the remote system,
and also FILE-DIRECTORY-P, which will be replaced by tramp's version on
the remote system.  My remote systems are GNU/Linux, not Darwin, and the
"getconf DARWIN_USER_TEMP_DIR" command returns

"getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'"

According to a comment in cus-start.el, the FILE-DIRECTORY-P should
handle that case:

				 ;; Handles "getconf: Unrecognized variable..."
				 (file-directory-p tmp)

...but in the remote case, FILE-DIRECTORY-P will end up recursively
calling TRAMP-COMPAT-TEMPORARY-FILE-DIRECTORY.

TRAMP-COMPAT-TEMPORARY-FILE-DIRECTORY can be fixed by disabling
TRAMP-MODE around its evaluation of the TEMPORARY-FILE-DIRECTORY
expression:

diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index aa0c99bf9c..954e026fcd 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -50,12 +50,15 @@ tramp-compat-funcall
   `(when (functionp ,function)
      (with-no-warnings (funcall ,function ,@arguments))))
 
+(defvar tramp-mode)
+
 (defsubst tramp-compat-temporary-file-directory ()
   "Return name of directory for temporary files.
 It is the default value of `temporary-file-directory'."
   ;; We must return a local directory.  If it is remote, we could run
   ;; into an infloop.
-  (eval (car (get 'temporary-file-directory 'standard-value))))
+  (let ((tramp-mode nil))
+    (eval (car (get 'temporary-file-directory 'standard-value)))))
 
 (defsubst tramp-compat-make-temp-file (f &optional dir-flag)
   "Create a local temporary file (compat function).


This change is consistent with the comment in the function that says
that a local directory should always be returned.

I don't know whether the top-level (DEFVAR TRAMP-MODE) is the correct
idiom for making sure we bind the global variable TRAMP-MODE, which is
defined in another file using DEFCUSTOM.  Please advise.



In GNU Emacs 27.0.50 (build 9, x86_64-apple-darwin17.4.0, X toolkit, Xaw3d scroll bars)
 of 2018-04-02 built on macsl
Repository revision: 7228488effa78dcb75284cb6d247b24804e0e7f5
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:  Mac OS X 10.13.3

Recent messages:
Saving /Users/leinen/News/.newsrc.eld...done
nnimap read 0k from mail.ethz.ch
Processing kill file /Users/leinen/News/KILL...done
Saving file /Users/leinen/News/.newsrc...
Wrote /Users/leinen/News/.newsrc
Saving /Users/leinen/News/.newsrc.eld...
Saving file /Users/leinen/News/.newsrc.eld...
Wrote /Users/leinen/News/.newsrc.eld
Saving /Users/leinen/News/.newsrc.eld...done
(No changes need to be saved)

Configured using:
 'configure --verbose --with-x --with-x-toolkit=lucid --with-ns=no
 --without-makeinfo
 LIBXML2_CFLAGS=-I/usr/local/opt/libxml2/include/libxml2
 'LIBXML2_LIBS=-L/usr/local/opt/libxml2/lib -lxml2' --with-jpeg=no
 --with-gif=no --with-tiff=no --x-libraries=/usr/X11/lib
 --x-includes=/usr/X11/include --with-xpm=no
 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/X11/lib/pkgconfig:/usr/X11/share/pkgconfig'

Configured features:
XAW3D PNG RSVG DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE XFT
ZLIB TOOLKIT_SCROLL_BARS LUCID X11 THREADS JSON

Important settings:
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Group

Minor modes in effect:
  gnus-undo-mode: t
  shell-dirtrack-mode: t
  auto-insert-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/Users/leinen/.emacs.d/elpa/confluence-20151020.1828/confluence-edit hides /Users/leinen/.emacs.d/elpa/confluence-edit-20110609.1452/confluence-edit
/Users/leinen/.emacs.d/elpa/ruby-mode-20121202.2143/ruby-mode hides /Users/leinen/emacs/lisp/ruby-mode
/Users/leinen/.emacs.d/elpa/bbdb-20180330.2018/bbdb-anniv hides /Users/leinen/emacs/lisp/bbdb-anniv
/Users/leinen/.emacs.d/elpa/bbdb-20180330.2018/bbdb-pgp hides /Users/leinen/emacs/lisp/bbdb-pgp
/Users/leinen/.emacs.d/elpa/puppet-mode-20171220.2249/puppet-mode hides /Users/leinen/emacs/lisp/puppet-mode
/Users/leinen/.emacs.d/elpa/yang-mode-20180306.407/yang-mode hides /Users/leinen/emacs/lisp/yang-mode
/Users/leinen/.emacs.d/elpa/muse-3.20.2/httpd hides /Users/leinen/emacs/lisp/httpd
/Users/leinen/emacs/lisp/u-vm-color hides /usr/local/share/emacs/site-lisp/vm/u-vm-color
/Users/leinen/.emacs.d/elpa/svg-0.1/svg hides /usr/local/share/emacs/27.0.50/lisp/svg
/Users/leinen/emacs/lisp/mouse-copy hides /usr/local/share/emacs/27.0.50/lisp/mouse-copy
/Users/leinen/.emacs.d/elpa/ruby-mode-20121202.2143/ruby-mode hides /usr/local/share/emacs/27.0.50/lisp/progmodes/ruby-mode
/Users/leinen/.emacs.d/elpa/org-20180402/ob-stan hides /usr/local/share/emacs/27.0.50/lisp/org/ob-stan
/Users/leinen/.emacs.d/elpa/org-20180402/ob-exp hides /usr/local/share/emacs/27.0.50/lisp/org/ob-exp
/Users/leinen/.emacs.d/elpa/org-20180402/ob-J hides /usr/local/share/emacs/27.0.50/lisp/org/ob-J
/Users/leinen/.emacs.d/elpa/org-20180402/org-eshell hides /usr/local/share/emacs/27.0.50/lisp/org/org-eshell
/Users/leinen/.emacs.d/elpa/org-20180402/ob-emacs-lisp hides /usr/local/share/emacs/27.0.50/lisp/org/ob-emacs-lisp
/Users/leinen/.emacs.d/elpa/org-20180402/org-gnus hides /usr/local/share/emacs/27.0.50/lisp/org/org-gnus
/Users/leinen/.emacs.d/elpa/org-20180402/ob-css hides /usr/local/share/emacs/27.0.50/lisp/org/ob-css
/Users/leinen/.emacs.d/elpa/org-20180402/ob-lob hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lob
/Users/leinen/.emacs.d/elpa/org-20180402/ob-forth hides /usr/local/share/emacs/27.0.50/lisp/org/ob-forth
/Users/leinen/.emacs.d/elpa/org-20180402/org-macs hides /usr/local/share/emacs/27.0.50/lisp/org/org-macs
/Users/leinen/.emacs.d/elpa/org-20180402/ob hides /usr/local/share/emacs/27.0.50/lisp/org/ob
/Users/leinen/.emacs.d/elpa/org-20180402/org-version hides /usr/local/share/emacs/27.0.50/lisp/org/org-version
/Users/leinen/.emacs.d/elpa/org-20180402/ob-scheme hides /usr/local/share/emacs/27.0.50/lisp/org/ob-scheme
/Users/leinen/.emacs.d/elpa/org-20180402/ox hides /usr/local/share/emacs/27.0.50/lisp/org/ox
/Users/leinen/.emacs.d/elpa/org-20180402/ob-abc hides /usr/local/share/emacs/27.0.50/lisp/org/ob-abc
/Users/leinen/.emacs.d/elpa/org-20180402/ob-C hides /usr/local/share/emacs/27.0.50/lisp/org/ob-C
/Users/leinen/.emacs.d/elpa/org-20180402/org-capture hides /usr/local/share/emacs/27.0.50/lisp/org/org-capture
/Users/leinen/.emacs.d/elpa/org-20180402/ob-ref hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ref
/Users/leinen/.emacs.d/elpa/org-20180402/ob-clojure hides /usr/local/share/emacs/27.0.50/lisp/org/ob-clojure
/Users/leinen/.emacs.d/elpa/org-20180402/org-mouse hides /usr/local/share/emacs/27.0.50/lisp/org/org-mouse
/Users/leinen/.emacs.d/elpa/org-20180402/ob-ledger hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ledger
/Users/leinen/.emacs.d/elpa/org-20180402/org-ctags hides /usr/local/share/emacs/27.0.50/lisp/org/org-ctags
/Users/leinen/.emacs.d/elpa/org-20180402/org-entities hides /usr/local/share/emacs/27.0.50/lisp/org/org-entities
/Users/leinen/.emacs.d/elpa/org-20180402/org-archive hides /usr/local/share/emacs/27.0.50/lisp/org/org-archive
/Users/leinen/.emacs.d/elpa/org-20180402/ob-screen hides /usr/local/share/emacs/27.0.50/lisp/org/ob-screen
/Users/leinen/.emacs.d/elpa/org-20180402/ob-haskell hides /usr/local/share/emacs/27.0.50/lisp/org/ob-haskell
/Users/leinen/.emacs.d/elpa/org-20180402/ob-asymptote hides /usr/local/share/emacs/27.0.50/lisp/org/ob-asymptote
/Users/leinen/.emacs.d/elpa/org-20180402/org-mhe hides /usr/local/share/emacs/27.0.50/lisp/org/org-mhe
/Users/leinen/.emacs.d/elpa/org-20180402/org-table hides /usr/local/share/emacs/27.0.50/lisp/org/org-table
/Users/leinen/.emacs.d/elpa/org-20180402/ob-keys hides /usr/local/share/emacs/27.0.50/lisp/org/ob-keys
/Users/leinen/.emacs.d/elpa/org-20180402/ox-org hides /usr/local/share/emacs/27.0.50/lisp/org/ox-org
/Users/leinen/.emacs.d/elpa/org-20180402/org-plot hides /usr/local/share/emacs/27.0.50/lisp/org/org-plot
/Users/leinen/.emacs.d/elpa/org-20180402/ob-awk hides /usr/local/share/emacs/27.0.50/lisp/org/ob-awk
/Users/leinen/.emacs.d/elpa/org-20180402/ob-groovy hides /usr/local/share/emacs/27.0.50/lisp/org/ob-groovy
/Users/leinen/.emacs.d/elpa/org-20180402/ob-octave hides /usr/local/share/emacs/27.0.50/lisp/org/ob-octave
/Users/leinen/.emacs.d/elpa/org-20180402/org-faces hides /usr/local/share/emacs/27.0.50/lisp/org/org-faces
/Users/leinen/.emacs.d/elpa/org-20180402/org-colview hides /usr/local/share/emacs/27.0.50/lisp/org/org-colview
/Users/leinen/.emacs.d/elpa/org-20180402/ob-R hides /usr/local/share/emacs/27.0.50/lisp/org/ob-R
/Users/leinen/.emacs.d/elpa/org-20180402/org-timer hides /usr/local/share/emacs/27.0.50/lisp/org/org-timer
/Users/leinen/.emacs.d/elpa/org-20180402/ob-ebnf hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ebnf
/Users/leinen/.emacs.d/elpa/org-20180402/org-mobile hides /usr/local/share/emacs/27.0.50/lisp/org/org-mobile
/Users/leinen/.emacs.d/elpa/org-20180402/ob-fortran hides /usr/local/share/emacs/27.0.50/lisp/org/ob-fortran
/Users/leinen/.emacs.d/elpa/org-20180402/ob-shell hides /usr/local/share/emacs/27.0.50/lisp/org/ob-shell
/Users/leinen/.emacs.d/elpa/org-20180402/ob-perl hides /usr/local/share/emacs/27.0.50/lisp/org/ob-perl
/Users/leinen/.emacs.d/elpa/org-20180402/ob-sqlite hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sqlite
/Users/leinen/.emacs.d/elpa/org-20180402/ob-sed hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sed
/Users/leinen/.emacs.d/elpa/org-20180402/org-list hides /usr/local/share/emacs/27.0.50/lisp/org/org-list
/Users/leinen/.emacs.d/elpa/org-20180402/ob-ruby hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ruby
/Users/leinen/.emacs.d/elpa/org-20180402/ob-eval hides /usr/local/share/emacs/27.0.50/lisp/org/ob-eval
/Users/leinen/.emacs.d/elpa/org-20180402/org-habit hides /usr/local/share/emacs/27.0.50/lisp/org/org-habit
/Users/leinen/.emacs.d/elpa/org-20180402/org-clock hides /usr/local/share/emacs/27.0.50/lisp/org/org-clock
/Users/leinen/.emacs.d/elpa/org-20180402/ox-html hides /usr/local/share/emacs/27.0.50/lisp/org/ox-html
/Users/leinen/.emacs.d/elpa/org-20180402/org-src hides /usr/local/share/emacs/27.0.50/lisp/org/org-src
/Users/leinen/.emacs.d/elpa/org-20180402/ob-lisp hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lisp
/Users/leinen/.emacs.d/elpa/org-20180402/ob-ditaa hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ditaa
/Users/leinen/.emacs.d/elpa/org-20180402/org-pcomplete hides /usr/local/share/emacs/27.0.50/lisp/org/org-pcomplete
/Users/leinen/.emacs.d/elpa/org-20180402/org-lint hides /usr/local/share/emacs/27.0.50/lisp/org/org-lint
/Users/leinen/.emacs.d/elpa/org-20180402/org-rmail hides /usr/local/share/emacs/27.0.50/lisp/org/org-rmail
/Users/leinen/.emacs.d/elpa/org-20180402/ox-latex hides /usr/local/share/emacs/27.0.50/lisp/org/ox-latex
/Users/leinen/.emacs.d/elpa/org-20180402/ob-sass hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sass
/Users/leinen/.emacs.d/elpa/org-20180402/ob-io hides /usr/local/share/emacs/27.0.50/lisp/org/ob-io
/Users/leinen/.emacs.d/elpa/org-20180402/ob-tangle hides /usr/local/share/emacs/27.0.50/lisp/org/ob-tangle
/Users/leinen/.emacs.d/elpa/org-20180402/ob-calc hides /usr/local/share/emacs/27.0.50/lisp/org/ob-calc
/Users/leinen/.emacs.d/elpa/org-20180402/ob-java hides /usr/local/share/emacs/27.0.50/lisp/org/ob-java
/Users/leinen/.emacs.d/elpa/org-20180402/ox-icalendar hides /usr/local/share/emacs/27.0.50/lisp/org/ox-icalendar
/Users/leinen/.emacs.d/elpa/org-20180402/org-eww hides /usr/local/share/emacs/27.0.50/lisp/org/org-eww
/Users/leinen/.emacs.d/elpa/org-20180402/ox-md hides /usr/local/share/emacs/27.0.50/lisp/org/ox-md
/Users/leinen/.emacs.d/elpa/org-20180402/ox-beamer hides /usr/local/share/emacs/27.0.50/lisp/org/ox-beamer
/Users/leinen/.emacs.d/elpa/org-20180402/org-element hides /usr/local/share/emacs/27.0.50/lisp/org/org-element
/Users/leinen/.emacs.d/elpa/org-20180402/org-protocol hides /usr/local/share/emacs/27.0.50/lisp/org/org-protocol
/Users/leinen/.emacs.d/elpa/org-20180402/ob-mscgen hides /usr/local/share/emacs/27.0.50/lisp/org/ob-mscgen
/Users/leinen/.emacs.d/elpa/org-20180402/ob-gnuplot hides /usr/local/share/emacs/27.0.50/lisp/org/ob-gnuplot
/Users/leinen/.emacs.d/elpa/org-20180402/ob-latex hides /usr/local/share/emacs/27.0.50/lisp/org/ob-latex
/Users/leinen/.emacs.d/elpa/org-20180402/org-id hides /usr/local/share/emacs/27.0.50/lisp/org/org-id
/Users/leinen/.emacs.d/elpa/org-20180402/ob-vala hides /usr/local/share/emacs/27.0.50/lisp/org/ob-vala
/Users/leinen/.emacs.d/elpa/org-20180402/ox-man hides /usr/local/share/emacs/27.0.50/lisp/org/ox-man
/Users/leinen/.emacs.d/elpa/org-20180402/org-feed hides /usr/local/share/emacs/27.0.50/lisp/org/org-feed
/Users/leinen/.emacs.d/elpa/org-20180402/ob-lua hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lua
/Users/leinen/.emacs.d/elpa/org-20180402/ob-table hides /usr/local/share/emacs/27.0.50/lisp/org/ob-table
/Users/leinen/.emacs.d/elpa/org-20180402/ob-ocaml hides /usr/local/share/emacs/27.0.50/lisp/org/ob-ocaml
/Users/leinen/.emacs.d/elpa/org-20180402/ob-coq hides /usr/local/share/emacs/27.0.50/lisp/org/ob-coq
/Users/leinen/.emacs.d/elpa/org-20180402/ob-picolisp hides /usr/local/share/emacs/27.0.50/lisp/org/ob-picolisp
/Users/leinen/.emacs.d/elpa/org-20180402/org-indent hides /usr/local/share/emacs/27.0.50/lisp/org/org-indent
/Users/leinen/.emacs.d/elpa/org-20180402/ob-lilypond hides /usr/local/share/emacs/27.0.50/lisp/org/ob-lilypond
/Users/leinen/.emacs.d/elpa/org-20180402/ob-matlab hides /usr/local/share/emacs/27.0.50/lisp/org/ob-matlab
/Users/leinen/.emacs.d/elpa/org-20180402/org-datetree hides /usr/local/share/emacs/27.0.50/lisp/org/org-datetree
/Users/leinen/.emacs.d/elpa/org-20180402/ob-python hides /usr/local/share/emacs/27.0.50/lisp/org/ob-python
/Users/leinen/.emacs.d/elpa/org-20180402/org-bbdb hides /usr/local/share/emacs/27.0.50/lisp/org/org-bbdb
/Users/leinen/.emacs.d/elpa/org-20180402/ob-makefile hides /usr/local/share/emacs/27.0.50/lisp/org/ob-makefile
/Users/leinen/.emacs.d/elpa/org-20180402/org-duration hides /usr/local/share/emacs/27.0.50/lisp/org/org-duration
/Users/leinen/.emacs.d/elpa/org-20180402/org-agenda hides /usr/local/share/emacs/27.0.50/lisp/org/org-agenda
/Users/leinen/.emacs.d/elpa/org-20180402/ob-dot hides /usr/local/share/emacs/27.0.50/lisp/org/ob-dot
/Users/leinen/.emacs.d/elpa/org-20180402/ob-js hides /usr/local/share/emacs/27.0.50/lisp/org/ob-js
/Users/leinen/.emacs.d/elpa/org-20180402/ox-publish hides /usr/local/share/emacs/27.0.50/lisp/org/ox-publish
/Users/leinen/.emacs.d/elpa/org-20180402/org-inlinetask hides /usr/local/share/emacs/27.0.50/lisp/org/org-inlinetask
/Users/leinen/.emacs.d/elpa/org-20180402/ob-org hides /usr/local/share/emacs/27.0.50/lisp/org/ob-org
/Users/leinen/.emacs.d/elpa/org-20180402/ob-core hides /usr/local/share/emacs/27.0.50/lisp/org/ob-core
/Users/leinen/.emacs.d/elpa/org-20180402/org-compat hides /usr/local/share/emacs/27.0.50/lisp/org/org-compat
/Users/leinen/.emacs.d/elpa/org-20180402/org-docview hides /usr/local/share/emacs/27.0.50/lisp/org/org-docview
/Users/leinen/.emacs.d/elpa/org-20180402/ox-odt hides /usr/local/share/emacs/27.0.50/lisp/org/ox-odt
/Users/leinen/.emacs.d/elpa/org-20180402/ob-plantuml hides /usr/local/share/emacs/27.0.50/lisp/org/ob-plantuml
/Users/leinen/.emacs.d/elpa/org-20180402/ox-ascii hides /usr/local/share/emacs/27.0.50/lisp/org/ox-ascii
/Users/leinen/.emacs.d/elpa/org-20180402/org-loaddefs hides /usr/local/share/emacs/27.0.50/lisp/org/org-loaddefs
/Users/leinen/.emacs.d/elpa/org-20180402/org-w3m hides /usr/local/share/emacs/27.0.50/lisp/org/org-w3m
/Users/leinen/.emacs.d/elpa/org-20180402/org-bibtex hides /usr/local/share/emacs/27.0.50/lisp/org/org-bibtex
/Users/leinen/.emacs.d/elpa/org-20180402/org-info hides /usr/local/share/emacs/27.0.50/lisp/org/org-info
/Users/leinen/.emacs.d/elpa/org-20180402/ob-hledger hides /usr/local/share/emacs/27.0.50/lisp/org/ob-hledger
/Users/leinen/.emacs.d/elpa/org-20180402/ob-maxima hides /usr/local/share/emacs/27.0.50/lisp/org/ob-maxima
/Users/leinen/.emacs.d/elpa/org-20180402/org hides /usr/local/share/emacs/27.0.50/lisp/org/org
/Users/leinen/.emacs.d/elpa/org-20180402/org-macro hides /usr/local/share/emacs/27.0.50/lisp/org/org-macro
/Users/leinen/.emacs.d/elpa/org-20180402/ob-sql hides /usr/local/share/emacs/27.0.50/lisp/org/ob-sql
/Users/leinen/.emacs.d/elpa/org-20180402/org-attach hides /usr/local/share/emacs/27.0.50/lisp/org/org-attach
/Users/leinen/.emacs.d/elpa/org-20180402/ob-processing hides /usr/local/share/emacs/27.0.50/lisp/org/ob-processing
/Users/leinen/.emacs.d/elpa/org-20180402/ox-texinfo hides /usr/local/share/emacs/27.0.50/lisp/org/ox-texinfo
/Users/leinen/.emacs.d/elpa/org-20180402/org-irc hides /usr/local/share/emacs/27.0.50/lisp/org/org-irc
/Users/leinen/.emacs.d/elpa/org-20180402/org-crypt hides /usr/local/share/emacs/27.0.50/lisp/org/org-crypt
/Users/leinen/.emacs.d/elpa/org-20180402/org-footnote hides /usr/local/share/emacs/27.0.50/lisp/org/org-footnote
/Users/leinen/.emacs.d/elpa/org-20180402/org-install hides /usr/local/share/emacs/27.0.50/lisp/org/org-install
/Users/leinen/.emacs.d/elpa/org-20180402/ob-comint hides /usr/local/share/emacs/27.0.50/lisp/org/ob-comint
/Users/leinen/.emacs.d/elpa/org-20180402/ob-shen hides /usr/local/share/emacs/27.0.50/lisp/org/ob-shen

Features:
(shadow warnings emacsbug vc-dispatcher m4-mode vc-filewise vc-rcs
html-mode html-helper-mode tempo sgml-mode gnus-draft url-http url-gw
url-auth url-queue url-cache url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf flow-fill shr-color color
nroff-mode jka-compr files-x tramp-sh url-util shr svg xml dom mailalias
supercite regi nnir misearch multi-isearch sort gnus-cite mm-archive
gnus-bcklg gnus-async gnus-kill qp mail-extr gnus-ml disp-table nndraft
nnmh utf-7 nnml gnus-init dot-gnus-sa edmacro kmacro bbdb-gnus bbdb-mua
bbdb-com crm bbdb bbdb-site timezone epa-file network-stream nsm
starttls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg
gnus-art mm-uu mml2015 mm-view mml-smime smime dig mailcap nntp
gnus-cache gnus-sum gnus-group gnus-undo gnus-start gnus-cloud nnimap
nnmail mail-source tls gnutls netrc nnoo gnus-spec gnus-int gnus-range
message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
gnus-win imenu elec-pair proof-site proof-autoloads pg-vars slime-mrepl
inferior-slime slime-fancy slime-trace-dialog slime-fontifying-fu
slime-package-fu slime-references slime-compiler-notes-tree
slime-scratch slime-presentations bridge slime-macrostep macrostep
slime-mdot-fu slime-enclosing-context slime-fuzzy slime-fancy-trace
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-repl slime-parse slime compile etags xref project arc-mode
archive-mode noutline outline easy-mmode pp hyperspec thingatpt
browse-url finder-inf tex-site confluence-edit-autoloads docker-tramp
tramp-cache epoch-view-autoloads idle-highlight-autoloads gh-common
marshal eieio-compat logito-autoloads rx pod-mode-autoloads
rnc-mode-autoloads ruby-mode-autoloads slime-autoloads
windresize-autoloads info package let-alist derived pcase cl-extra
help-mode easymenu url-handlers url-parse url-vars epg epg-config subr-x
tramp trampver tramp-compat tramp-loaddefs ucs-normalize shell pcomplete
comint ansi-color ring parse-time format-spec advice avoid gnus nnheader
gnus-util rmail rmail-loaddefs time-date wid-edit autoinsert cus-start
cus-load solarized-light-theme solarized-definitions cl smtpmail
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mail-utils
timeclock vm-startup vm-search vm-edit vm-reply vm-mark vm-smime
vm-delete vm-digest vm-undo vm-page vm-virtual vm-summary-faces vm-pop
utf7 mm-util mail-prsvr vm-imap vm-thread vm-mime vm-motion vm-mouse
vm-toolbar vm-menu vm-window vm-crypto vm-summary vm-folder vm-minibuf
vm-misc vm-sort vm-autoloads vm-vars vm-version vm mule-util early-init
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 minibuffer 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 dbusbind kqueue dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 778286 58414)
 (symbols 48 72192 17)
 (miscs 40 5684 1196)
 (strings 32 248834 19595)
 (string-bytes 1 6736383)
 (vectors 16 91150)
 (vector-slots 8 2290391 251626)
 (floats 8 471 798)
 (intervals 56 2321 850)
 (buffers 992 79))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31022; Package emacs. (Mon, 02 Apr 2018 18:06:02 GMT) Full text and rfc822 format available.

Message #8 received at 31022 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Simon Leinen <simon.leinen <at> switch.ch>
Cc: 31022 <at> debbugs.gnu.org
Subject: Re: bug#31022: 27.0.50;
 darwin: Infinite recursion in tramp-file-name-handler
Date: Mon, 02 Apr 2018 20:05:38 +0200
[Message part 1 (text/plain, inline)]
Simon Leinen <simon.leinen <at> switch.ch> writes:

Hi Simon,

Thanks for the bug report.

> From a drawin host, visit a file on a non-darwin remote host via tramp,
> using C-x C-f /sshx:HOST:/DIR/FILE
>
> From that buffer, try to visit another file on that same host, or simply
> trigger file name completion by typing e.g. C-x C-f TAB
>
> Instead of the desired result, you will see an error message such as
>
>   tramp-file-name-handler: Lisp nesting exceeds ‘max-lisp-eval-depth’
>
> The problem here is that tramp ((TRAMP-COMPAT-TEMPORARY-FILE-DIRECTORY))
> evaluates the standard value of TEMPORARY-FILE-DIRECTORY (defined in
> cus-start.el), which calls SHELL-COMMAND-TO-STRING on the remote system,
> and also FILE-DIRECTORY-P, which will be replaced by tramp's version on
> the remote system.  My remote systems are GNU/Linux, not Darwin, and the
> "getconf DARWIN_USER_TEMP_DIR" command returns
>
> "getconf: Unrecognized variable `DARWIN_USER_TEMP_DIR'"
>
> According to a comment in cus-start.el, the FILE-DIRECTORY-P should
> handle that case:
>
> 				 ;; Handles "getconf: Unrecognized variable..."
> 				 (file-directory-p tmp)
>
> ...but in the remote case, FILE-DIRECTORY-P will end up recursively
> calling TRAMP-COMPAT-TEMPORARY-FILE-DIRECTORY.
>
> TRAMP-COMPAT-TEMPORARY-FILE-DIRECTORY can be fixed by disabling
> TRAMP-MODE around its evaluation of the TEMPORARY-FILE-DIRECTORY
> expression:

That would be an option, yes. But I prefer to fix it at the place the
problem happens, in cus-start.el.

Does the following patch cures the problem?

[Message part 2 (text/plain, inline)]
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 9ba1e105a1..f31d1df309 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -277,9 +277,10 @@ minibuffer-prompt-properties--setter
 		     ((eq system-type 'darwin)
 		      (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
 			  ;; See bug#7135.
-			  (let ((tmp (ignore-errors
-				       (shell-command-to-string
-					"getconf DARWIN_USER_TEMP_DIR"))))
+			  (let* (file-name-handler-alist
+				 (tmp (ignore-errors
+				        (shell-command-to-string
+					 "getconf DARWIN_USER_TEMP_DIR"))))
 			    (and (stringp tmp)
 				 (setq tmp (replace-regexp-in-string
 					    "\n\\'" "" tmp))
[Message part 3 (text/plain, inline)]
Best regards, Michael.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31022; Package emacs. (Mon, 02 Apr 2018 20:44:02 GMT) Full text and rfc822 format available.

Message #11 received at 31022 <at> debbugs.gnu.org (full text, mbox):

From: Simon Leinen <simon.leinen <at> switch.ch>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 31022 <at> debbugs.gnu.org
Subject: Re: bug#31022: 27.0.50;
 darwin: Infinite recursion in tramp-file-name-handler
Date: Mon, 2 Apr 2018 22:43:30 +0200
Michael Albinus writes:
> That would be an option, yes. But I prefer to fix it at the place the
> problem happens, in cus-start.el.

> Does the following patch cures the problem?

Yes it does.  I agree that this seems more thorough as a fix.

Thanks!
-- 
Simon.

> diff --git a/lisp/cus-start.el b/lisp/cus-start.el
> index 9ba1e105a1..f31d1df309 100644
> --- a/lisp/cus-start.el
> +++ b/lisp/cus-start.el
> @@ -277,9 +277,10 @@ minibuffer-prompt-properties--setter
>  		     ((eq system-type 'darwin)
>  		      (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP")
>  			  ;; See bug#7135.
> -			  (let ((tmp (ignore-errors
> -				       (shell-command-to-string
> -					"getconf DARWIN_USER_TEMP_DIR"))))
> +			  (let* (file-name-handler-alist
> +				 (tmp (ignore-errors
> +				        (shell-command-to-string
> +					 "getconf DARWIN_USER_TEMP_DIR"))))
>  			    (and (stringp tmp)
>  				 (setq tmp (replace-regexp-in-string
>  					    "\n\\'" "" tmp))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31022; Package emacs. (Tue, 03 Apr 2018 06:13:02 GMT) Full text and rfc822 format available.

Message #14 received at 31022 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Simon Leinen <simon.leinen <at> switch.ch>
Cc: 31022 <at> debbugs.gnu.org
Subject: Re: bug#31022: 27.0.50;
 darwin: Infinite recursion in tramp-file-name-handler
Date: Tue, 03 Apr 2018 08:12:17 +0200
Simon Leinen <simon.leinen <at> switch.ch> writes:

Hi Simon,

>> That would be an option, yes. But I prefer to fix it at the place the
>> problem happens, in cus-start.el.
>
>> Does the following patch cures the problem?
>
> Yes it does.  I agree that this seems more thorough as a fix.

Thanks for confirmation.

This patch is such simple, that it could go into the emacs-26
branch. But I let it for Eli to decide.

> Thanks!

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31022; Package emacs. (Tue, 03 Apr 2018 07:12:02 GMT) Full text and rfc822 format available.

Message #17 received at 31022 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 31022 <at> debbugs.gnu.org, simon.leinen <at> switch.ch
Subject: Re: bug#31022: 27.0.50;
 darwin: Infinite recursion in tramp-file-name-handler
Date: Tue, 03 Apr 2018 10:11:16 +0300
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Date: Tue, 03 Apr 2018 08:12:17 +0200
> Cc: 31022 <at> debbugs.gnu.org
> 
> >> Does the following patch cures the problem?
> >
> > Yes it does.  I agree that this seems more thorough as a fix.
> 
> Thanks for confirmation.
> 
> This patch is such simple, that it could go into the emacs-26
> branch. But I let it for Eli to decide.

It's okay to put this on the release branch.

Thanks.




Reply sent to Michael Albinus <michael.albinus <at> gmx.de>:
You have taken responsibility. (Tue, 03 Apr 2018 07:57:01 GMT) Full text and rfc822 format available.

Notification sent to Simon Leinen <simon.leinen <at> switch.ch>:
bug acknowledged by developer. (Tue, 03 Apr 2018 07:57:02 GMT) Full text and rfc822 format available.

Message #22 received at 31022-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: simon.leinen <at> switch.ch, 31022-done <at> debbugs.gnu.org
Subject: Re: bug#31022: 27.0.50;
 darwin: Infinite recursion in tramp-file-name-handler
Date: Tue, 03 Apr 2018 09:56:38 +0200
Version: 26.1

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Michael Albinus <michael.albinus <at> gmx.de>
>> Date: Tue, 03 Apr 2018 08:12:17 +0200
>> Cc: 31022 <at> debbugs.gnu.org
>> 
>> >> Does the following patch cures the problem?
>> >
>> > Yes it does.  I agree that this seems more thorough as a fix.
>> 
>> Thanks for confirmation.
>> 
>> This patch is such simple, that it could go into the emacs-26
>> branch. But I let it for Eli to decide.
>
> It's okay to put this on the release branch.

Done. Closing the bug.

> Thanks.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31022; Package emacs. (Tue, 03 Apr 2018 08:51:02 GMT) Full text and rfc822 format available.

Message #25 received at 31022 <at> debbugs.gnu.org (full text, mbox):

From: Simon Leinen <simon.leinen <at> switch.ch>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 31022 <at> debbugs.gnu.org
Subject: Re: bug#31022: 27.0.50;
 darwin: Infinite recursion in tramp-file-name-handler
Date: Tue, 3 Apr 2018 10:50:00 +0200
Hi Michael,

>>> That would be an option, yes. But I prefer to fix it at the place the
>>> problem happens, in cus-start.el.
>> 
>>> Does the following patch cures the problem?
>> 
>> Yes it does.  I agree that this seems more thorough as a fix.

> Thanks for confirmation.

> This patch is such simple, that it could go into the emacs-26
> branch. But I let it for Eli to decide.

Right. It would be good to have this in Emacs 26. For me it was the most
annoying regression I had in a while.

Best regards, and thanks again for your work!
-- 
Simon.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 01 May 2018 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.