minad / cape

🦸cape.el - Completion At Point Extensions
GNU General Public License v3.0
603 stars 22 forks source link

Should cape-file complete tramp file names? #89

Closed LemonBreezes closed 1 year ago

LemonBreezes commented 1 year ago

Hi. I remember previously, when using Eshell, I would get completions from Tramp when typing /ssh:. I don't know if they were coming from cape or from pcomplete or company but I'm wondering if cape-file should handle such file names.

minad commented 1 year ago

Hi! Tramp is intentionally unsupported for file completion since my experience with it has been mixed (error messages, password prompts which interfere with the completion popup etc). cape-file binds non-essential and uses cape--nonessential-table which prevent Tramp from connecting. If non-essential is removed it may work as long as cape--bounds returns correct file name bounds. You can give that a try and experiment. I guess it needs some debugging.

minad commented 1 year ago

I should add - if it can be made to work reliably, I am not against supporting Tramp in cape-file. In principle it should work given that Eshell completion with Corfu also seems to work with Tramp (maybe you remembered that). But a quick try of disabling non-essential in cape-file resulted in errors like "Remote file error: Forbidden reentrant call of Tramp" and "Tramp failed to connect. If this happens repeatedly, try...".