From: Michael Albinus <michael.albinus@gmx.de>
To: Simon Leinen <simon.leinen@switch.ch>
Cc: 31022@debbugs.gnu.org
Subject: bug#31022: 27.0.50; darwin: Infinite recursion in tramp-file-name-handler
Date: Mon, 02 Apr 2018 20:05:38 +0200 [thread overview]
Message-ID: <87k1tp32ml.fsf@gmx.de> (raw)
In-Reply-To: <aawoxpyg8b.fsf@switch.ch> (Simon Leinen's message of "Mon, 2 Apr 2018 13:56:04 +0200")
[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]
Simon Leinen <simon.leinen@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?
[-- Attachment #2: Type: text/plain, Size: 661 bytes --]
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))
[-- Attachment #3: Type: text/plain, Size: 24 bytes --]
Best regards, Michael.
next prev parent reply other threads:[~2018-04-02 18:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 11:56 bug#31022: 27.0.50; darwin: Infinite recursion in tramp-file-name-handler Simon Leinen
2018-04-02 18:05 ` Michael Albinus [this message]
2018-04-02 20:43 ` Simon Leinen
2018-04-03 6:12 ` Michael Albinus
2018-04-03 7:11 ` Eli Zaretskii
2018-04-03 7:56 ` Michael Albinus
2018-04-03 8:50 ` Simon Leinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1tp32ml.fsf@gmx.de \
--to=michael.albinus@gmx.de \
--cc=31022@debbugs.gnu.org \
--cc=simon.leinen@switch.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.