From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Albinus Newsgroups: gmane.emacs.devel Subject: Re: testing for a remote file to include file on a Windows mapped drive Date: Tue, 22 Apr 2008 17:40:40 +0200 Message-ID: References: <87bq781bf7.fsf@gmx.de> <000a01c8a314$5fff7630$0200a8c0@us.oracle.com> <000d01c8a324$97820590$0200a8c0@us.oracle.com> <000f01c8a334$b2a40660$0200a8c0@us.oracle.com> <000101c8a37f$eeb543d0$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1208879096 21677 80.91.229.12 (22 Apr 2008 15:44:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2008 15:44:56 +0000 (UTC) Cc: jasonr@gnu.org, monnier@iro.umontreal.ca, drew.adams@oracle.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 22 17:45:30 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JoKeb-0008M6-KT for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 17:43:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoKdw-00082s-1h for ged-emacs-devel@m.gmane.org; Tue, 22 Apr 2008 11:42:52 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JoKas-0006jB-Hj for emacs-devel@gnu.org; Tue, 22 Apr 2008 11:39:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JoKaq-0006iT-PQ for emacs-devel@gnu.org; Tue, 22 Apr 2008 11:39:42 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JoKaq-0006iN-K3 for emacs-devel@gnu.org; Tue, 22 Apr 2008 11:39:40 -0400 Original-Received: from mailrelay1.alcatel.de ([194.113.59.95]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JoKae-0008OX-TM; Tue, 22 Apr 2008 11:39:29 -0400 Original-Received: from slbhab.alcatel.de (slbhab.bln.sel.alcatel.de [149.204.63.218]) by mailrelay1.alcatel.de (8.13.8/8.13.8/ICT) with ESMTP id m3MFdPBI023365; Tue, 22 Apr 2008 17:39:26 +0200 In-Reply-To: (Eli Zaretskii's message of "Mon, 21 Apr 2008 22:29:25 +0300") User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (hpux) X-Scanned-By: MIMEDefang 2.57 on 149.204.45.72 X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:95774 Archived-At: Eli Zaretskii writes: >> * file-mounted-p (as working name) returns t, if a file looks like an >> ordinary file from the operating system's point of view, but its >> physical location is on another machine. Examples are nfs, smbfs or >> sshfs mounts under GNU/Linux, or network shares under W32. This >> property cannot be detected by file name handler functions. The >> implementation shall be in the C core. >> >> These functions are exclusive: file-remote-p and file-mounted-p shall >> not return t for the same filename. Since one function uses the >> filename only for checking the result, and the other function uses >> operating system properties, I don't believe it makes sense to merge >> them into one function. > > 110% agreement. And, given several good arguments posted by Andreas, > it sounds like the best implementation for determining whether > accessing a file is likely to be slow would be a simple alist, set by > the user, since only the user knows which filesystems on her machine > cause slowdown. I don't see how Emacs can determine that by itself > without actually accessing the file. I like this idea. Let's forget file-mounted-p; Emacs cannot determine by itself good enough whether something is fast or slow. And even "fast" and "slow" depend on the user and her preferences. Maybe we shall have something like `slow-accessible-files-list', a list of regexps and predicates which denote file names with slow access. (Please don't blame me for the name; it could be anything else). If a file name matches one of the regexps, or a predicate with the file name as argument returns non-nil, then the access to the file is regarded as, hmm, slow. It could be something like this: (defvar slow-accessible-files-list '(file-remote-p ;; All files with file name handler functions. "^/media/disk")) ;; My USB stick. And a function, let's call it `file-slow-accessible-p', might evaluate that list. Best regards, Michael.