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 15:37:47 -0800 Message-ID: References: <479A602D.3040206@gnu.org> 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 1201304299 6407 80.91.229.12 (25 Jan 2008 23:38:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 23:38:19 +0000 (UTC) Cc: Emacs-Devel To: "Jason Rumney" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 26 00:38:38 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 1JIY80-00021s-7l for ged-emacs-devel@m.gmane.org; Sat, 26 Jan 2008 00:38:32 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIY7Z-0001Eg-VN for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 18:38:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIY7W-0001Dk-9L for emacs-devel@gnu.org; Fri, 25 Jan 2008 18:38:02 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIY7V-0001Cf-E6 for emacs-devel@gnu.org; Fri, 25 Jan 2008 18:38:01 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIY7V-0001Cc-8J for emacs-devel@gnu.org; Fri, 25 Jan 2008 18:38:01 -0500 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 1JIY7R-0004Xc-88; Fri, 25 Jan 2008 18:37:57 -0500 Original-Received: from rgmgw1.us.oracle.com (rgmgw1.us.oracle.com [138.1.186.110]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m0PNbsI9003575; Fri, 25 Jan 2008 17:37:54 -0600 Original-Received: from acsmt351.oracle.com (acsmt351.oracle.com [141.146.40.151]) by rgmgw1.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m0PCfZ5m014394; Fri, 25 Jan 2008 16:37:53 -0700 Original-Received: from inet-141-146-46-1.oracle.com by acsmt351.oracle.com with ESMTP id 3537754081201304263; Fri, 25 Jan 2008 15:37:43 -0800 Original-Received: from dradamslap1 (/141.144.73.144) by bhmail.oracle.com (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 25 Jan 2008 15:37:42 -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: <479A602D.3040206@gnu.org> 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:87528 Archived-At: > > 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. > > GetDriveType can be called from C. Emacs already uses it in w32.c, but > only to determine which drives are fixed, thus their information can be > cached indefinitely. Good. Do you agree that it would be good for either `file-remote-p' or some new function to take mapped network drives into account for remote files? It might be that some uses of `file-remote-p' should not consider a file on a network drive to be remote - I don't know. Also, IIUC, `file-remote-p' isn't only boolean; the non-nil return value means something. I don't know what should be returned for a file on a mapped network drive. And should we perhaps have a function that distinguishes remote files that are not on a mapped drive from those that are? Is there any need to distinguish these? (We currently do distinguish them, in that `file-remote-p' returns non-nil for the former and nil for the latter.)