Subject: bug#75314: 28.2; tramp-error: Invalid function: "with-tramp-connection-property"

From: Rudolf Schlatte <[email-masked]>
Date: Fri, 03 Jan 2025 16:01:30 +0100

Michael Albinus via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Jason Williams <[email-masked]> writes:
>
> Hi Jason,
>
>> Tramp is failing to do anything and has worked in the past on different
>> installations.
>>
>> When I attempt to use M-x find-file /ssh:name@host: ENT it will fault
>> with
>>
>> tramp-error: Invalid function: "with-tramp-connection-property"
>>
>> without fail. invoking M-x find-file /doas: ENT has no response and
>> treats the input 'doas:' as a literal file.
>>
>> My config looks like this:
>>
>> (use-package tramp :straight t)
>> (require 'tramp)
>> (add-to-list 'tramp-connection-properties
>>              (list (regexp-quote "/ssh:[email-masked]:")
>>                    "remote-shell" "/bin/bashsh"))
>
> I don't know how trustworthy an installation with straight is. But in
> fact, you have an inconsistent Tramp installation.

The error message `tramp-error: Invalid function:
"with-tramp-connection-property"` points to some kind of flawed
compilation process, since `with-tramp-connection-property` is a macro;
its definition has to be available at compile-time.