[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TRAMP VC optimization: also breaks process filters -_-

From: Michael Albinus
Subject: Re: TRAMP VC optimization: also breaks process filters -_-
Date: Tue, 07 May 2019 17:51:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> Daniel's reports have been covered always
>> vc-registered. And indeed, the related `tramp-vc-file-name-handler'
>> seems to expect always a Tramp file name, which is not true for filters
>> and sentinels which run for non-Tramp processes.
> I don't understand what filers and sentinels have to do with it.

The last Tramp action as expected was process-send-string (called from
tramp-send-string). According to the Elisp manual, filters or sentinels
from *other* processes can be called during process-send-string:

--8<---------------cut here---------------start------------->8---
   Sometimes the system is unable to accept input for that process,
because the input buffer is full.  When this happens, the send functions
wait a short while, accepting output from subprocesses, and then try
again.  This gives the subprocess a chance to read more of its pending
input and make space in the buffer.  It also allows filters, sentinels
and timers to run—so take account of that in writing your code.
--8<---------------cut here---------------end--------------->8---

This happens here, as Daniel has shown.

The problem is, that expand-file-name has been forwarded to
tramp-vc-file-name-handler due to the remote DIR argument. This isn't
relevant, because FILENAME is absolute, but in the next line FILENAME is
tried to be dissected without any further check. This I have changed.

In the native tramp-file-name-handler, this situation can also happen,
but it is handled already. So we have only to fix tramp-vc-file-name-handler.

>         Stefan

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]