Subject: bug#66123: 29.1; tar-mode errors when saving remote files

From: Michael Albinus <[email-masked]>
Date: Wed, 20 Sep 2023 20:36:54 +0200

Dan McCarthy <[email-masked]> writes:

Hi Dan,

> The setup is the same as bug#55166:
>
> /ssh:dan@solstice:/tmp/ #$ touch a b c
> /ssh:dan@solstice:/tmp/ #$ tar cf test.tar a b c
> /ssh:dan@solstice:/tmp/ #$ xz test.tar
>
> but in this case write-file throws an error instead of failing
> silently:
>
> Debugger entered--Lisp error: (wrong-type-argument "listp
> (tramp-file-name-handler tramp-crypt-file-name-handler .
> inhibit-file-name-handlers)")
>   signal(wrong-type-argument ("listp (tramp-file-name-handler
> tramp-crypt-file-name-handler . inhibit-file-name-handlers)"))

Oops, a comma is missing. Could you pls try the appended patch? Note
that, due to macro expansion, you must recompile lisp/net/tramp.el first
and then lisp/net/tramp-sh.el afterwards.

Best regards, Michael.

diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 502ededcfb7..8ace0165ed9 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -3734,7 +3734,7 @@ tramp-skeleton-write-region
 			(let ((inhibit-file-name-handlers
 			       `(tramp-file-name-handler
 				 tramp-crypt-file-name-handler
-				 . inhibit-file-name-handlers))
+				 . ,inhibit-file-name-handlers))
 			      (inhibit-file-name-operation 'write-region))
 			  (find-file-name-handler ,visit 'write-region))))
 	  ;; We use this to save the value of