From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: testing for a remote file to include file on a Windows mapped drive Date: Fri, 25 Jan 2008 17:11:45 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1201299123 20568 80.91.229.12 (25 Jan 2008 22:12:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Jan 2008 22:12:03 +0000 (UTC) Cc: Emacs-Devel To: "Drew Adams" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 25 23:12:23 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 1JIWmZ-0004yj-85 for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 23:12:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIWm8-0001xa-R9 for ged-emacs-devel@m.gmane.org; Fri, 25 Jan 2008 17:11:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JIWm4-0001w5-UG for emacs-devel@gnu.org; Fri, 25 Jan 2008 17:11:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JIWm3-0001tz-DB for emacs-devel@gnu.org; Fri, 25 Jan 2008 17:11:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JIWm3-0001td-6i for emacs-devel@gnu.org; Fri, 25 Jan 2008 17:11:47 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JIWm2-00055p-Vm for emacs-devel@gnu.org; Fri, 25 Jan 2008 17:11:47 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFbtmUfO+J95dGdsb2JhbACQKgEwnW5/ X-IronPort-AV: E=Sophos;i="4.25,252,1199682000"; d="scan'208";a="13229501" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 25 Jan 2008 17:11:46 -0500 Original-Received: from pastel.home ([206.248.159.121]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id FXK79645; Fri, 25 Jan 2008 17:11:45 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 674E6858A; Fri, 25 Jan 2008 17:11:45 -0500 (EST) In-Reply-To: (Drew Adams's message of "Fri, 25 Jan 2008 10:47:51 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:87514 Archived-At: > I have some code that needs to avoid some particular processing when the > current input might name a remote file. I don't want the code to try to > contact anything remote in this case. > In Windows, you can map a remote directory to a virtual drive. So, for > instance, "h:foo" or "h:/foo" might represent a remote file. But the same > name would represent a local file if drive `h' is local, not mapped. The same problem exists under GNU/Linux and friends. ~/foo might be a mount point and all files underneath are access via NFS or SSHFS (or whatever else). Under GNU/Linux, I believe there are C-level primitives that can help figure out whether a file is really local or not, so we could use those to improve file-remote-p. Stefan