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 a Windows mappeddrive Date: Fri, 25 Jan 2008 12:33:21 -0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1201293344 1581 80.91.229.12 (25 Jan 2008 20:35:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 20:35:44 +0000 (UTC) To: "Emacs-Devel" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 25 21:36:04 2008 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 1JIVHP-0005zw-Bj for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 21:36:04 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIVGx-0005B1-Ub for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 15:35:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIVGY-00053M-Uu for emacs-devel@gnu.org; Fri, 25 Jan 2008 15:35:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIVGX-000530-AK for emacs-devel@gnu.org; Fri, 25 Jan 2008 15:35:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIVGX-00052x-4b for emacs-devel@gnu.org; Fri, 25 Jan 2008 15:35:09 -0500 Original-Received: from rgminet01.oracle.com ([148.87.113.118]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JIVGV-00079e-2g for emacs-devel@gnu.org; Fri, 25 Jan 2008 15:35:08 -0500 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id m0PKYwTf003538 for ; Fri, 25 Jan 2008 13:34:59 -0700 Original-Received: from acsmt350.oracle.com (acsmt350.oracle.com [141.146.40.150]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m0PEOgwL010444 for ; Fri, 25 Jan 2008 13:34:58 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt350.oracle.com with ESMTP id 3534417321201293196; Fri, 25 Jan 2008 12:33:16 -0800 Original-Received: from dradamslap1 (/141.144.73.144) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 25 Jan 2008 12:33:16 -0800 X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal 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:87512 Archived-At: > Is there some way to ask Windows (from Emacs) whether a drive letter is > mapped or local? In the absence of any suggestion, I'm thinking of providing a user option in my code that specifies the local drive letters, defaulting to, say, A through I. Googling showed that local drive vs mapped network drive can be tested, in C# at least (using GetDriveType() or DriveInfo.DriveType). I didn't come across a way to test it from C, however. It would be great if Emacs were somehow to provide a predicate for this. In spite of its name, `file-remote-p' does not consider files on mapped network drives to be remote. They are perhaps not remote in the original Emacs sense of the word (requiring remote protocol access, such as FTP), but they are remote in terms of access time. And many of the uses of `file-remote-p' are concerned about access time.