Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind non-essential to prevent tramp error #487

Closed
wants to merge 1 commit into from

Conversation

juergenhoetzel
Copy link
Contributor

I use company-capf in eshell. An error is raised when completing Tramp filenames like
cd /scp:
`
->

Debugger entered--Lisp error: (error "Company: backend company-capf error \"Host name must not match method \"scp\"\" with args (candidates /scp:)")

See discussion here:

http://lists.gnu.org/archive/html/tramp-devel/2016-03/msg00005.html

@juergenhoetzel juergenhoetzel changed the title Bind non-essential to prevent invalid tramp error Bind non-essential to prevent invalid error Mar 12, 2016
@juergenhoetzel juergenhoetzel changed the title Bind non-essential to prevent invalid error Bind non-essential to prevent tramp error Mar 12, 2016
@dgutov
Copy link
Member

dgutov commented Mar 12, 2016

Hi!

This seems to be a bug in Emacs: you can type M-x pcomplete, and get the same error.

You'll even get this error if the input is just cd /.

@juergenhoetzel
Copy link
Contributor Author

@albinus: Any options about fixing this in pcomplete/eshell ?

@albinus
Copy link

albinus commented Mar 13, 2016

Jürgen Hötzel notifications@github.com writes:

@albinus: Any options about fixing this in pcomplete?

I've tried to reproduce the bug in pcomplete, but it doesn't work for
me:

~/src/emacs-25/src/emacs -Q /

M-x load-library RET pcomplete
M-x pcomplete RET
=> Invalid function: pcomplete-here

Best regards, Michael.

@juergenhoetzel
Copy link
Contributor Author

Jürgen Hötzel notifications@github.com writes:
@albinus: Any options about fixing this in pcomplete?
I've tried to reproduce the bug in pcomplete, but it doesn't work for
me:

emacs -Q /

M-x load-library RET pcomplete
M-x pcomplete RET
=> Invalid function: pcomplete-here

Best regards, Michael.

@albinus Hi Michael,

i can reproduce this on emacs master branch, not in the dired pcomplete setup, but eshell:

emacs -Q /

M-x eshell RET
Welcome to the Emacs shell

Enter a tramp-filename prefix:

/ $ /scp:

then

M-x pcomplete RET

results in this error:

tramp-file-name-handler: Host name must not match method "scp"

@albinus
Copy link

albinus commented Mar 13, 2016

Jürgen Hötzel notifications@github.com writes:

@albinus Hi Michael,

Hi Juergen,

i can reproduce this on emacs master branch, not in the dired
pcomplete setup, but eshell:

emacs -Q /

M-x eshell RET
Welcome to the Emacs shell

Enter a tramp-filename prefix:

/ $ /scp:

then

M-x pcomplete RET

results in this error:

tramp-file-name-handler: Host name must not match method "scp"

Thanks for the recipe, I could reproduce it here as well. Will fix it in
pcomplete, either the emacs-25 branch (frozen already), or in master.

Best regards, Michael.

@dgutov dgutov closed this in 7d2d49b Mar 18, 2016
juergenhoetzel added a commit to juergenhoetzel/company-mode that referenced this pull request Jan 4, 2017
`non-essential' is bound to `t' when company tries to fetch candidates
during idle completion (See: company-mode#487). Thus this change prevents to start
the backends completion on the local system which would return invalid
candidates/errors).

Fixes company-mode#462.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants