From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kai Grossjohann Newsgroups: gmane.emacs.devel Subject: Re: auto-revert-mode and tramp file handlers Date: Mon, 10 May 2004 15:17:05 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <87isf4zajy.fsf@emptyhost.emptydomain.de> References: <200405091734.i49HYRM01844@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084198425 7096 80.91.224.253 (10 May 2004 14:13:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 10 May 2004 14:13:45 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon May 10 16:13:33 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 1BNBXB-0003wZ-00 for ; Mon, 10 May 2004 16:13:33 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BNBXB-0001sf-00 for ; Mon, 10 May 2004 16:13:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BNBNl-0005qp-5v for emacs-devel@quimby.gnus.org; Mon, 10 May 2004 10:03:49 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BNBDg-0003sO-3H for emacs-devel@gnu.org; Mon, 10 May 2004 09:53:24 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BNBD6-0003lr-Kd for emacs-devel@gnu.org; Mon, 10 May 2004 09:53:19 -0400 Original-Received: from [80.91.224.249] (helo=main.gmane.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BNAeN-0005Tk-IU for emacs-devel@gnu.org; Mon, 10 May 2004 09:16:59 -0400 Original-Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BNAeN-0004pd-00 for ; Mon, 10 May 2004 15:16:55 +0200 Original-Received: from 213-203-244-156.kunde.vdserver.de ([213.203.244.156]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 May 2004 15:16:55 +0200 Original-Received: from kai by 213-203-244-156.kunde.vdserver.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 10 May 2004 15:16:55 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 213-203-244-156.kunde.vdserver.de User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:ZqOXwV0dgb3/xmvZ1R5Q3ElQ6Vo= 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:23036 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:23036 Luc Teirlinck writes: > A problem is that tramp seems to handle functions like file-exists-p > and file-readable-p by trying to connect for 60 seconds and then > throwing an error if the connection has been closed. I believe that > both functions strictly speaking should return nil in the given > situation. In the case of file-exists-p that is because it is > impossible to figure out the file's attributes. From the Elisp > manual: > > -- Function: file-exists-p filename > This function returns `t' if a file named FILENAME appears to exist. > This does not mean you can necessarily read the file, only that > you can find out its attributes. > > If there is no way to quickly check whether the connection has been > closed, and if so, return nil instead of throwing an error, then I > believe that maybe we should just disable auto-reverting for remote > files. (This is trivial, using `file-remote-p'.) I believe that at > the very least there should be an option to disable auto-reverting for > remote files, because it can be very costly for people with slow > connections. I'm not sure how to change Tramp to make this better: it often happens that a connection is closed merely because a timeout has expired. In that case, just silently reopening the connection appears to be the right approach. But I confess that I haven't thought a lot about your problem. So it's quite likely that there are good solutions that I'm not seeing. But I do realize that there is a problem here. Perhaps it is best to make it easy for the user to customize "no auto-revert on remote files". What do people think? Kai