emacs-devel
[Top][All Lists]
Advanced

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

Re: TRAMP VC optimization: also breaks process filters -_-


From: Stefan Monnier
Subject: Re: TRAMP VC optimization: also breaks process filters -_-
Date: Mon, 06 May 2019 13:54:25 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> I'm sad to report that blocking timers in TRAMP is not sufficient to avoid
> it breaking other operations: process filters can also run while TRAMP is
> sending, and waiting for the result of, a command.

I'm not sure what is the problem with timers and/or process filters
(e.g. I don't see any process filters in your backtrace), so maybe I'm
misunderstanding the problem, but FWIW, here's what I noticed:

>   tramp-user-error(nil "Not a Tramp file name: \"%s\"" 
> "/Users/slippycheeze/.emacs.d/network-security.data")
>   
> tramp-dissect-file-name("/Users/slippycheeze/.emacs.d/network-security.data")
>   tramp-vc-file-name-handler(expand-file-name 
> "/Users/slippycheeze/.emacs.d/network-security.data" 
> "/gssh:slippycheeze.X.XXXXXXXX.XXX:")

This indicates that Tramp gets confused and thinks that the
tramp-vc-file-name-handler was called in response to expand-file-name on
the file "/Users/slippycheeze/.emacs.d/network-security.data" whereas
it's called because of the directory argument.

So I believe the (untested) patch below should fix the immediate problem.
Can you confirm?

Michael?


        Stefan


diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1f83756c32..d354086ecf 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2188,7 +2188,9 @@ tramp-file-name-for-operation
    ;; FILE DIRECTORY resp FILE1 FILE2.
    ((eq operation 'expand-file-name)
     (cond
-     ((file-name-absolute-p (nth 0 args)) (nth 0 args))
+     ((and (file-name-absolute-p (nth 0 args))
+           (tramp-tramp-file-p (nth 0 args)))
+      (nth 0 args))
      ((tramp-tramp-file-p (nth 1 args)) (nth 1 args))
      (t default-directory)))
    ;; START END FILE.



reply via email to

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