Open Ambrevar opened 3 years ago
Any idea?
No, sorry. I suppose this is rare enough that it doesn'matter to most users. I personally use hippie-expand
for filenames in the REPL, but that's a habit. But if you dig down into comint-filename-completion
you'll probably find the culprit.
I tried hippie-expand on a file with a double quote and it isn't escaped either. Does it escape for you?
Does it escape for you?
I don't know, I don't have an Emacs here. I'd suppose not. Only now to I see the what you're trying to achieve. You want the correct escaping for the syntax of the language you are typing. I think you have to add some escaping thing to sly-complete-filename-maybe
. If I'm following you correctly...
Yes, I think we are on the same page.
I just don't see the difference between shell-mode and sly-mrepl-mode. I need to investigate more.
Is it possible to escape filename when completing them? This is needed when a filename contains double quotes, e.g.
foo"bar
, otherwise the completion will result in incorrect syntax like#p"path/to/foo"bar"
.In a SLY REPL,
completion-at-point-functions
is set to(sly-complete-filename-maybe sly-complete-symbol)
.So this calls
comint-filename-completion
which is also used by shell-mode and correctly escape double quotes. I must be missing something.Any idea?