From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Daniel Pittman <slippycheeze@google.com>
Cc: Michael Albinus <michael.albinus@gmx.de>,
Stefan Monnier <monnier@iro.umontreal.ca>,
emacs-devel@gnu.org
Subject: Re: TRAMP VC optimization: also breaks process filters -_-
Date: Mon, 06 May 2019 13:54:25 -0400 [thread overview]
Message-ID: <jwv8svjiijb.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAC45yQuAqWBkZvrA_+5tbTG+LNEcZqSyxuDpomxw6j1=LMd7RQ@mail.gmail.com> (Daniel Pittman's message of "Wed, 1 May 2019 14:13:47 -0400")
> 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.
next prev parent reply other threads:[~2019-05-06 17:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 18:13 TRAMP VC optimization: also breaks process filters -_- Daniel Pittman
2019-05-06 17:54 ` Stefan Monnier [this message]
2019-05-07 15:24 ` Michael Albinus
2019-05-07 15:42 ` Stefan Monnier
2019-05-07 15:51 ` Michael Albinus
2019-05-07 16:19 ` Stefan Monnier
2019-05-08 6:35 ` Michael Albinus
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=jwv8svjiijb.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
--cc=slippycheeze@google.com \
/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.