From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: testing for a remote file to include file on a Windows mappeddrive Date: Sun, 27 Jan 2008 19:28:17 +0200 Message-ID: References: <871w844yff.fsf@gmx.de> <87bq781bf7.fsf@gmx.de> <877ihvzfcc.fsf@gmx.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1201454924 27046 80.91.229.12 (27 Jan 2008 17:28:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Jan 2008 17:28:44 +0000 (UTC) Cc: emacs-devel@gnu.org, monnier@iro.umontreal.ca, drew.adams@oracle.com, jasonr@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 27 18:29:02 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 1JJBJT-0008AQ-AU for ged-emacs-devel@m.gmane.org; Sun, 27 Jan 2008 18:28:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJBJ2-0002hf-Jc for ged-emacs-devel@m.gmane.org; Sun, 27 Jan 2008 12:28:32 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JJBIx-0002g2-Ua for emacs-devel@gnu.org; Sun, 27 Jan 2008 12:28:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JJBIw-0002dx-57 for emacs-devel@gnu.org; Sun, 27 Jan 2008 12:28:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JJBIv-0002dr-VW for emacs-devel@gnu.org; Sun, 27 Jan 2008 12:28:26 -0500 Original-Received: from heller.inter.net.il ([213.8.233.23]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JJBIr-0007pC-Tb; Sun, 27 Jan 2008 12:28:22 -0500 Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-220-9.inter.net.il [83.130.220.9]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id ETZ19434 (AUTH halo1); Sun, 27 Jan 2008 19:28:17 +0200 (IST) In-reply-to: <877ihvzfcc.fsf@gmx.de> (message from Michael Albinus on Sun, 27 Jan 2008 12:18:43 +0100) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.7-5.2 (or MacOS X 10.2-10.4) (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:87644 Archived-At: > From: Michael Albinus > Cc: monnier@iro.umontreal.ca, jasonr@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org > Date: Sun, 27 Jan 2008 12:18:43 +0100 > > (nth 11 (file-attributes "~/src/emacs/lisp")) > => 2049 > (nth 11 (file-attributes "~/src/tramp/lisp")) > => 24 > > "~/src/emacs" is a link to "/usr/local/src/emacs". The device number > 2049 is related to device "/", which has the device type "ext2/ext3". > > "~/src/tramp" is a link to "/mnt/src/tramp". The device number 24 is > related to device "/mnt/src", which has the device type "UNKNOWN". > > These information (and other ones, if necessary) might be sufficient to > determine whether a given file is "mounted locally". Implementation > shall happen in Emacs C core,of course. Are you saying that files with device number below a certain threshold are guaranteed to be on a remote mounted volume? If so, what is that threshold, and is this universal among Posix platforms? Also, wouldn't file-attributes (which calls `stat' internally) try to access the mounted volume, and thus be as slow as the file access we want to avoid? For example, I thought that a call to `stat' would try to mount automounted volumes, but perhaps I'm confused.