emacs-devel
[Top][All Lists]
Advanced

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

Re: Tramp with global-auto-revert-mode.


From: Stefan Monnier
Subject: Re: Tramp with global-auto-revert-mode.
Date: 14 May 2004 13:06:03 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> Work properly if they are on a different connection.  Queue them if
> they are on the same connection.

Can't queue 'em.

Scenario:

        file-exist-p -> Tramp -> accept-process-output
        <<Now process filters and sentinels and timers can be run>>
        One of those async thingies calls
        file-readable-p -> Tramp -> ????

If it's on the same connection Tramp is stuck: its connection is either
busy waiting for some answer from the remote host (which is OK: we can
wait) or busy waiting for accept-process-output to return so Emacs can
react to the remote process's output; but accept-process-output can't return
before file-readable-p is finished.  Sending new commands to perform
file-readable-p canbe tricky because the remote shell might be in any
intermediate state, so we'd need to detect this state, save it and restore
it when done.  Or else open up a new connection.

Note that the above also shows that async code is not only run when you call
accept-process-output or sit-for or sleep-for or read-kbd-sequence: it can
also be run when you call file-exists-p.  I.e.

     (let ((default-directory "/a"))
       (if (file-exists-p default-directory) default-directory))

can return "/b" (if one of the process filters changes default-directory).


        Stefan




reply via email to

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