tramp-devel
[Top][All Lists]
Advanced

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

Re: TRAMP: Host name must not match method ...


From: Matt McClure
Subject: Re: TRAMP: Host name must not match method ...
Date: Mon, 19 Aug 2013 22:38:10 -0400

On Mon, Aug 19, 2013 at 8:07 AM, Michael Albinus <address@hidden> wrote:
> Matt McClure <address@hidden> writes:
>
>> Here's the backtrace the first time it stops:
>
> [...]
>
>>       rfn-eshadow-update-overlay()
>
> Strange. The user error in `tramp-dissect-file-name' is raised only when
> `tramp-completion-mode-p' returns nil. That function checks (beside
> other things) the variable `non-essential', which is bound to t inside
> `rfn-eshadow-update-overlay'. So there shouldn't be any problem.

True. The first backtrace from my previous message is in a scenario
where the error doesn't surface to the user. The second backtrace,
which does not include `rfn-eshadow-update-overlay', is the failure
case.

> Could you, please, check whether you might have shadow lisp files? Try
> "M-x list-load-path-shadows".

    No Emacs Lisp load-path shadowings were found

> In the debugger, you might also check the value of `non-essential', when
> you pass `rfn-eshadow-update-overlay' and the break point.

At the breakpoint in the failure case, and actually in the success cases also:

    non-essential is a variable defined in `simple.el'.
    Its value is nil

>>     C-x C-f /ssh:address@hidden:/ RET
>>
>> This time the backtrace looks different. I notice these two stack
>> frames that look suspicious:
>>
>>       substitute-in-file-name("/ssh:address@hidden")
>>       completion--sifn-requote(27 "/ssh:address@hidden:/")
>
> Here I don't see exactly what happens; I'm not so familiar with the
> completion code in minibuffer.el. But maybe this is caused by the same
> reason as the first break, let's see.

Comparing rfn-eshadow-update-overlay to completion--sifn-requote, I
notice that the former wraps its call to substitute-in-file-name with
condition-case, whereas the latter does not. I believe the user-error
is signaled in both cases, but in the former it's handled by
condition-case, whereas in the latter nothing handles it.

I'm able to work around the problem with:

diff -u --label
/Applications/Emacs.app/Contents/Resources/lisp/minibuffer.el.gz\~
--label /Applications/Emacs.app/Contents/Resources/lisp/minibuffer.el.gz
/var/folders/_d/5p0jtv397qs73qr_frd6bw180000gn/T/jka-com874eUK
/var/folders/_d/5p0jtv397qs73qr_frd6bw180000gn/T/jka-com8744oW
--- /Applications/Emacs.app/Contents/Resources/lisp/minibuffer.el.gz~
+++ /Applications/Emacs.app/Contents/Resources/lisp/minibuffer.el.gz
@@ -2256,13 +2256,15 @@
     ;; Second assumptions: If qpos is far from the end this can be a bit slow,
     ;; so we speed it up by doing a first loop that skips a word at a time.
     ;; This word-sized loop is careful not to cut in the middle of env-vars.
-    (while (let ((boundary (string-match "\\(\\$+{?\\)?\\w+\\W*\\'" qstr)))
-             (and boundary
-                  (progn
-                    (setq qprefix (substring qstr 0 boundary))
-                    (string-prefix-p uprefix
-                                   (substitute-in-file-name qprefix)))))
-      (setq qstr qprefix))
+    (condition-case nil
+ (while (let ((boundary (string-match "\\(\\$+{?\\)?\\w+\\W*\\'" qstr)))
+ (and boundary
+      (progn
+ (setq qprefix (substring qstr 0 boundary))
+ (string-prefix-p uprefix
+ (substitute-in-file-name qprefix)))))
+  (setq qstr qprefix))
+      (error nil))
     (let ((qpos (length qstr)))
       (while (and (> qpos 0)
                   (string-prefix-p uprefix

Diff finished.  Mon Aug 19 22:29:17 2013

But it seems that there must be a copy of minibuffer.el compiled into
the executable (?). Even though the completion--sifn-requote is
already defined, before my copy becomes active, I have to explicitly
(load-library "minibuffer").

-- 
Matt McClure
http://matthewlmcclure.com
http://www.mapmyfitness.com/profile/matthewlmcclure



reply via email to

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