Subject: Re: bug#28066: eshell-tramp sudo ignores C-c

From: Michael Albinus <[email-masked]>
Date: Sun, 20 Aug 2017 21:46:33 +0200

Eli Zaretskii <[email-masked]> writes:

>> From: Michael Albinus <[email-masked]>
>> Date: Sun, 20 Aug 2017 21:29:33 +0200
>> Cc: [email-masked], [email-masked]
>> 
>> I've implemented this as advice on `interrupt-process', but this is
>> discouraged for primitives. Maybe we should spend `interrupt-process' a
>> hook where Tramp could enter? Or even a file name handler, based on
>> default-directory of the related process-buffer?
>
> In such cases, we usually provide a variable whose value is a
> function.  The default value is a function that does whatever
> interrupt-process is doing now, and Tramp can replace it with its own
> function.
>
> Does this make sense in your case?

Perfect. As long as no other package replaces Tramp's function.

Maybe the variable shall keep a list of functions, which are tried until
one of the functions reports success (returns t, for example). The
default function would be the last in the queue.

Best regards, Michael.