From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.bugs Subject: bug#31022: 27.0.50; darwin: Infinite recursion in tramp-file-name-handler Date: Mon, 02 Apr 2018 20:05:38 +0200 Message-ID: <87k1tp32ml.fsf@gmx.de> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: blaine.gmane.org 1522692252 1771 195.159.176.226 (2 Apr 2018 18:04:12 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 2 Apr 2018 18:04:12 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 31022@debbugs.gnu.org To: Simon Leinen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 02 20:04:08 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f33oL-0000LH-DJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Apr 2018 20:04:05 +0200 Original-Received: from localhost ([::1]:52940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f33qO-0002a1-Rf for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Apr 2018 14:06:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f33qI-0002Zi-OJ for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 14:06:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f33qE-0003CU-Oi for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 14:06:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55698) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f33qE-0003CL-Is for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 14:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f33qE-0007lN-3Z for bug-gnu-emacs@gnu.org; Mon, 02 Apr 2018 14:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Michael Albinus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Apr 2018 18:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31022 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31022-submit@debbugs.gnu.org id=B31022.152269234829820 (code B ref 31022); Mon, 02 Apr 2018 18:06:02 +0000 Original-Received: (at 31022) by debbugs.gnu.org; 2 Apr 2018 18:05:48 +0000 Original-Received: from localhost ([127.0.0.1]:35362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f33q0-0007ku-1M for submit@debbugs.gnu.org; Mon, 02 Apr 2018 14:05:48 -0400 Original-Received: from mout.gmx.net ([212.227.17.21]:34821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f33py-0007kc-IC for 31022@debbugs.gnu.org; Mon, 02 Apr 2018 14:05:47 -0400 Original-Received: from detlef.gmx.de ([212.91.249.214]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LhB9P-1ehyom2Woh-00oV4A; Mon, 02 Apr 2018 20:05:39 +0200 In-Reply-To: (Simon Leinen's message of "Mon, 2 Apr 2018 13:56:04 +0200") X-Provags-ID: V03:K0:7ir8Kb5eVsyfBk9L9prOWcAaEh/Bk1ku/IMDwVzFEtqnck3Tzds xAjylCc9KbT8ZCeVWBRsAoQ5XJst7FFK68wmQxpVrPz50aIfDxDyPe0V32hC3vWrgA31HLw XnLXEVLsqwRqiGt20xZeIhsQsOQ20xKPrPmzjYfmF+9rewfRbGsBX1X/C1kWSYpfPpJdnOq D6NtrwF8iQ1UdDOJkfaKA== X-UI-Out-Filterresults: notjunk:1;V01:K0:ESXrsABnzAQ=:eB5IJ1sxvVx6xfXmecC+Pt UGj/P1sCU79sNN1AqdoLIleoimjmQGFkn1S6fOxFUMKfNKQhigbnIZF2PB1WHwE/DMA4g7aMc 1GMCaB8nlYStE54ekCUSuoE4AtoX4nU7CvaZJ1Twwjo1NrJvDRy0SqDnDUYFRIzdCjHrKdKTm rLYJaSSZbW90PE20uElkaVJvcLJuh/OXiwNE4tQiRv1KN3NdCBpNYQhUvReagYOaDNX1TMpTU uA/zSv26gyu8SKCUIHVhio9fQNTuWadOX6dnrAM++f0BtZ2ijdC2fqBmMzmoigHSwJ81MTsVp 2e+IZkF//YBU0vkbsBxrh9/JKZUscig2wBp/y8UTplnGuJanPhjUmLFB8SYZecAkKze9EaajQ 5oxZw7Oxkdhw3HKWit3IdXcpi5Dwft5Plt7yWryG0v/9Hidkw6FZ9xEDJpl436o3aui94goe8 JkyQsaVbPm61QIpkKKkOd0YN4Y4y2SVsyQLSeP9O/wxaUXncoOyIumChm/zTDk1/5yopWGa/P Hn7UOS5ZFukxbIHx6imLIhomuzBp4ctnEXf5V7r+NiZYbLH4XenY8AjeaqX2pLI4eOiI/Cg7m drY1Zfwwt6Q48UANaIlqj5qP5RNoQ/rcRVpJLiVETsXzossDVzmEVsiWfr7Mefit47Jdor/ZL ZAx8RKn7WPEv67hFVf/Go866vuq9JSF6VKFhECiJVxcjkAZX+ZGHJP3XNEXpRWvYA15IGHups KeiogK1UZ3dvWNzBILagolbI00XzYfpbIk/o54T90mTNTkhTt2qEvfeUxvGqum8bjci42WWX X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144797 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Simon Leinen 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 =E2=80=98max-lisp-eval-de= pth=E2=80=99 > > 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? --=-=-= Content-Type: text/plain Content-Disposition: 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)) --=-=-= Content-Type: text/plain Best regards, Michael. --=-=-=--