Subject: bug#73385: 29.4; eshell over tramp with explicit port capf and history error

From: Michael Albinus <[email-masked]>
Date: Sat, 28 Sep 2024 09:36:53 +0200

Karl Roldan <[email-masked]> writes:

Hi Karl,

> After trying to open a dired buffer /ssh:user@ip#22:~ then executing
> eshell, I noticed that capf and eshell-previous-matching-input (bound to
> M-p) do not work. They seem to work well if port is not explicitly defined.
>
> I enabled toggle-debug-on-error and executed some commands on emacs -Q
> to see the callstack but I'm not very adept at debugging emacs yet.
>
> After M-p:
> Debugger entered--Lisp error: (error "Not found")
>   error("Not found")
>   eshell-previous-matching-input("^/ssh:karl@10\\.1\\.2\\.84#22:~ \\$ " 1)
>   eshell-previous-matching-input-from-input(1)
>   funcall-interactively(eshell-previous-matching-input-from-input 1)
>   command-execute(eshell-previous-matching-input-from-input)
>
> After TAB (completion at point)
> Debugger entered--Lisp error: (error "Invalid variable reference")
>   error("Invalid variable reference")
>   eshell-parse-variable-ref(nil)
>   eshell-parse-variable()
>   eshell-interpolate-variable()
>   run-hook-with-args-until-success(eshell-interpolate-variable)
>   eshell-parse-argument()
>   eshell-parse-arguments(29 #<marker at 56 in *eshell*>)
>   eshell-complete-parse-arguments()
>   pcomplete-parse-arguments(nil)
>   pcomplete-completions()
>   pcomplete-completions-at-point()
>   completion--capf-wrapper(pcomplete-completions-at-point all)
>   completion-at-point()
>   funcall-interactively(completion-at-point)
>   command-execute(completion-at-point)

I can reproduce both problems with Emacs 29. With Emacs 30 (pretest
version), there's no problem. So I guess it is fixed already there.

Do you have a chance to check Emacs 30?

Best regards, Michael.