From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Tramp with global-auto-revert-mode. Date: 14 May 2004 13:06:03 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200405122254.i4CMsUj29445@raven.dms.auburn.edu> <200405122326.i4CNQk929511@raven.dms.auburn.edu> <200405132324.i4DNOBs14811@raven.dms.auburn.edu> <200405140008.i4E08lb14858@raven.dms.auburn.edu> <871xln4xmc.fsf-monnier+emacs@gnu.org> <87oeorb5pq.fsf@emptyhost.emptydomain.de> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084554738 27123 80.91.224.253 (14 May 2004 17:12:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 May 2004 17:12:18 +0000 (UTC) Cc: Kai Grossjohann , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 14 19:12:04 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOgE8-0006oR-00 for ; Fri, 14 May 2004 19:12:04 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BOgE7-0003da-00 for ; Fri, 14 May 2004 19:12:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOgDh-0000Kf-Qq for emacs-devel@quimby.gnus.org; Fri, 14 May 2004 13:11:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BOgDM-0000KN-LG for emacs-devel@gnu.org; Fri, 14 May 2004 13:11:16 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BOgCp-0000Dr-72 for emacs-devel@gnu.org; Fri, 14 May 2004 13:11:15 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BOg8L-0007N8-H4; Fri, 14 May 2004 13:06:05 -0400 Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 9821220972; Fri, 14 May 2004 13:06:03 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 4D4B78CA23; Fri, 14 May 2004 13:06:03 -0400 (EDT) Original-To: David Kastrup In-Reply-To: Original-Lines: 32 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-0.908, requis 5, BAYES_10 -0.91) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:23410 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23410 > 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 <> 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