Subject: Re: bug#23006: 25.0.92; Loading Tramp breaks pcomplete in eshell-mode

From: Michael Albinus <[email-masked]>
Date: Fri, 18 Mar 2016 09:27:08 +0100

Dmitry Gutov <[email-masked]> writes:

> On 03/17/2016 09:54 PM, Michael Albinus wrote:
>
>> emacs -Q
>> M-x load-library tramp
>> M-x eshell
>> cd /
>> M-x pcomplete
>>
>> Still no error. Tests performed in the emacs-25 branch.
>
> I do get an error. Or rather, a failure message, like described
> previously. On emacs-25, with -Q, just 'make bootstrap'-ed the latest
> commit to triple-check, and the problem is consistent.
>
> Do you get any completions in the end?

Yes. But this aren't the files under "/", but rather all programs I
could start on my Ubuntu machine.

If I do *not* enter RET after "cd /", and call "M-x pcomplete" then, I
get the same error message. OK, that's clear.

Now the backtrace in this scenario:

--8<---------------cut here---------------start------------->8---
  (member (edebug-after 0 54 host) (edebug-after 0 55 methods))
  (and (edebug-after (edebug-before 33) 35 (equal (edebug-after 0 34 tramp-syntax) (quote ftp))) (edebug-after 0 36 host) (edebug-after (edebug-before 37) 44 (or (edebug-after (edebug-before 38) 40 (null (edebug-after 0 39 method))) (edebug-after (edebug-before 41) 43 (get-text-property 0 (quote tramp-default) (edebug-after 0 42 method))))) (edebug-after (edebug-before 45) 52 (or (edebug-after (edebug-before 46) 48 (null (edebug-after 0 47 user))) (edebug-after (edebug-before 49) 51 (get-text-property 0 (quote tramp-default) (edebug-after 0 50 user))))) (edebug-after (edebug-before 53) 56 (member (edebug-after 0 54 host) (edebug-after 0 55 methods))))
  (if (edebug-after (edebug-before 32) 57 (and (edebug-after (edebug-before 33) 35 (equal (edebug-after 0 34 tramp-syntax) (quote ftp))) (edebug-after 0 36 host) (edebug-after (edebug-before 37) 44 (or (edebug-after (edebug-before 38) 40 (null (edebug-after 0 39 method))) (edebug-after (edebug-before 41) 43 (get-text-property 0 (quote tramp-default) (edebug-after 0 42 method))))) (edebug-after (edebug-before 45) 52 (or (edebug-after (edebug-before 46) 48 (null (edebug-after 0 47 user))) (edebug-after (edebug-before 49) 51 (get-text-property 0 (quote tramp-default) (edebug-after 0 50 user))))) (edebug-after (edebug-before 53) 56 (member (edebug-after 0 54 host) (edebug-after 0 55 methods))))) (progn (edebug-after (edebug-before 58) 60 (tramp-cleanup-connection (edebug-after 0 59 vec))) (edebug-after (edebug-before 61) 64 (tramp-user-error (edebug-after 0 62 vec) "Host name must not match method \"%s\"" (edebug-after 0 63 host)))))
  (let ((method (edebug-after (edebug-before 1) 3 (tramp-file-name-method (edebug-after 0 2 vec)))) (user (edebug-after (edebug-before 4) 6 (tramp-file-name-user (edebug-after 0 5 vec)))) (host (edebug-after (edebug-before 7) 9 (tramp-file-name-host (edebug-after 0 8 vec)))) (methods (edebug-after (edebug-before 10) 12 (mapcar (quote car) (edebug-after 0 11 tramp-methods))))) (edebug-after (edebug-before 13) 30 (if (edebug-after (edebug-before 14) 22 (and (edebug-after 0 15 method) (edebug-after (edebug-before 16) 21 (not (edebug-after ... 20 ...))))) (progn (edebug-after (edebug-before 23) 25 (tramp-cleanup-connection (edebug-after 0 24 vec))) (edebug-after (edebug-before 26) 29 (tramp-user-error (edebug-after 0 27 vec) "Unknown method \"%s\"" (edebug-after 0 28 method)))))) (edebug-after (edebug-before 31) 65 (if (edebug-after (edebug-before 32) 57 (and (edebug-after (edebug-before 33) 35 (equal (edebug-after 0 34 tramp-syntax) (quote ftp))) (edebug-after 0 36 host) (edebug-after (edebug-before 37) 44 (or (edebug-after ... 40 ...) (edebug-after ... 43 ...))) (edebug-after (edebug-before 45) 52 (or (edebug-after ... 48 ...) (edebug-after ... 51 ...))) (edebug-after (edebug-before 53) 56 (member (edebug-after 0 54 host) (edebug-after 0 55 methods))))) (progn (edebug-after (edebug-before 58) 60 (tramp-cleanup-connection (edebug-after 0 59 vec))) (edebug-after (edebug-before 61) 64 (tramp-user-error (edebug-after 0 62 vec) "Host name must not match method \"%s\"" (edebug-after 0 63 host)))))))
  tramp-check-proper-method-and-host([#("scp" 0 3 (tramp-default t)) nil "adb" "" nil])
  tramp-maybe-open-connection([#("scp" 0 3 (tramp-default t)) nil "adb" "" nil])
  tramp-send-command([#("scp" 0 3 (tramp-default t)) nil "adb" "" nil] "cd ~ && pwd")
  tramp-sh-handle-expand-file-name("/adb:" "/")
  apply(tramp-sh-handle-expand-file-name ("/adb:" "/"))
  tramp-sh-file-name-handler(expand-file-name "/adb:" "/")
  apply(tramp-sh-file-name-handler expand-file-name ("/adb:" "/"))
  tramp-file-name-handler(expand-file-name "/adb:" "/")
  expand-file-name("adb:" "/")
  apply(expand-file-name ("adb:" "/"))
  tramp-completion-run-real-handler(expand-file-name ("adb:" "/"))
  tramp-completion-file-name-handler(expand-file-name "adb:" "/")
  file-directory-p("adb:")
  #[257 "\302\203\n\302!\205\301\203\301!\205\300?\206\300!\207" [file-directory-p #[257 "\211GSH\302=\203\301\205\303\301\"\202\300\205\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"]("adb:")
  completion-file-name-table("/" #[257 "\302\203\n\302!\205\301\203\301!\205\300?\206\300!\207" [file-directory-p #[257 "\211GSH\302=\203\301\205\303\301\"\202\300\205\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] t)
  comint-completion-file-name-table("/" #[257 "\302\203\n\302!\205\301\203\301!\205\300?\206\300!\207" [file-directory-p #[257 "\211GSH\302=\203\301\205\303\301\"\202\300\205\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] t)
  complete-with-action(t comint-completion-file-name-table "/" #[257 "\302\203\n\302!\205\301\203\301!\205\300?\206\300!\207" [file-directory-p #[257 "\211GSH\302=\203\301\205\303\301\"\202\300\205\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"])
  completion-table-with-predicate(comint-completion-file-name-table #[257 "\302\203\n\302!\205\301\203\301!\205\300?\206\300!\207" [file-directory-p #[257 "\211GSH\302=\203\301\205\303\301\"\202\300\205\303\300\"?\207" ["~\\'" "\\`\\(\\.\\.?\\|CVS\\)/\\'" 47 string-match] 4 "\n\n(fn FILE)"] nil] 3 "\n\n(fn F)"] strict "/" nil t)
  pcomplete(1)
  funcall-interactively(pcomplete 1)
  call-interactively(pcomplete record nil)
  command-execute(pcomplete record)
  execute-extended-command(nil "pcomplete" "pcomplete")
  funcall-interactively(execute-extended-command nil "pcomplete" "pcomplete")
  call-interactively(execute-extended-command nil nil)
  command-execute(execute-extended-command)
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.