From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: testing for a remote file to include file on aWindows mappeddrive Date: Mon, 21 Apr 2008 01:15:52 -0700 Message-ID: <000001c8a387$ea969a30$0200a8c0@us.oracle.com> References: <479A602D.3040206@gnu.org><87skxf96ml.fsf@offby1.atm01.sea.blarg.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1208765829 16167 80.91.229.12 (21 Apr 2008 08:17:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Apr 2008 08:17:09 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Andreas Schwab'" , "'Eric Hanchrow'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Apr 21 10:17:41 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 1JnrDY-0006XA-5p for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2008 10:17:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnrCs-0007vD-Jf for ged-emacs-devel@m.gmane.org; Mon, 21 Apr 2008 04:16:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JnrCp-0007v6-4i for emacs-devel@gnu.org; Mon, 21 Apr 2008 04:16:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JnrCn-0007uu-Jo for emacs-devel@gnu.org; Mon, 21 Apr 2008 04:16:54 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JnrCn-0007ur-Hw for emacs-devel@gnu.org; Mon, 21 Apr 2008 04:16:53 -0400 Original-Received: from agminet01.oracle.com ([141.146.126.228]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JnrCn-0007v8-88 for emacs-devel@gnu.org; Mon, 21 Apr 2008 04:16:53 -0400 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m3L8Gg48018707; Mon, 21 Apr 2008 03:16:42 -0500 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m3L4UhEe018570; Mon, 21 Apr 2008 02:16:41 -0600 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3654746221208765731; Mon, 21 Apr 2008 01:15:31 -0700 Original-Received: from dradamslap1 (/141.144.64.98) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 21 Apr 2008 01:15:31 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcijhYD7fiDi/KR7Qoif9CHFyYOJOQAADpfg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 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:95608 Archived-At: > > _I_ sure wish it did. I like using global-auto-revert-mode, > > but that can make Emacs hang when it checks a remote file. > > And since file-remote-p doesn't give the right answer ... > > Is a file on a CDROM device that needs to spin up on every access > file-remote-p? We agree that we might need other test functions, such as Michael suggested. But as long as the agreed-upon purpose of `file-remote-p' is to let you avoid an access performance cost, that can be the place to incorporate such info. IOW, either we add other test functions, as Michael suggested with `file-mounted-p', and you then test with (or ...) to see if there is a possible slowdown, or we put the tests into `file-remote-p' and we recognize that the name is not accurate. Or we roll all the tests into some other function (as I tried to do with `my-remote-file'), say, `slow-access-file-p'. The expressed need is to know whether accessing a file with a given name might be significantly slower than accessing a local file on an ordinary drive etc. Some of those terms might be vague, but the general idea is clear: We want to get a performance assessment from the file name (perhaps also locally checking known mounts, mapped drives etc.) - without incurring a significant performance penalty for the test itself. A boolean estimate is probably enough: possible performance hit vs probably fast. How that is done, and whether it indicates that the file is remote or on a slow local drive or whatever, I really don't care (but we might care, in some contexts). For some uses, some people might want more than a boolean - a time estimate, so they can judge "fast enough" for some particular use. But for myself, now, classifying the file names into two groups (probably fast, possibly slow) is enough.