Document wide integers better.
[bpt/emacs.git] / doc / lispref / files.texi
index e2560c2..51c27ec 100644 (file)
@@ -1,7 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2011
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/files
@@ -1042,7 +1041,8 @@ because they eliminate symbolic links as a cause of name variation.
 
 @defun file-truename filename
 The function @code{file-truename} returns the truename of the file
-@var{filename}.  The argument must be an absolute file name.
+@var{filename}.  If the argument is not an absolute file name,
+this function first expands it against @code{default-directory}.
 
 This function does not expand environment variables.  Only
 @code{substitute-in-file-name} does that.  @xref{Definition of
@@ -1236,13 +1236,10 @@ deleted and recreated; @code{nil} otherwise.
 
 @item
 The file's inode number.  If possible, this is an integer.  If the
-inode number is too large to be represented as an integer in Emacs
-Lisp, but still fits into a 32-bit integer, then the value has the
-form @code{(@var{high} . @var{low})}, where @var{low} holds the low 16
-bits.  If the inode is wider than 32 bits, the value is of the form
-@code{(@var{high} @var{middle} . @var{low})}, where @code{high} holds
-the high 24 bits, @var{middle} the next 24 bits, and @var{low} the low
-16 bits.
+inode number @math{N} is too large to be represented as an integer in
+Emacs Lisp, then the value has the form @code{(@var{high}
+. @var{low})}, where @var{high} holds the high bits (i.e., all but the
+low 16 bits) and @var{low} the low 16 bits.
 
 @item
 The filesystem number of the device that the file is on.  Depending on
@@ -1788,20 +1785,6 @@ Note that the @samp{.~3~} in the two last examples is the backup part,
 not an extension.
 @end defun
 
-@ignore
-Andrew Innes says that this
-
-@c @defvar directory-sep-char
-This variable holds the character that Emacs normally uses to separate
-file name components.  The default value is @code{?/}, but on MS-Windows
-you can set it to @code{?\\}; then the functions that transform file names
-use backslashes in their output.
-
-File names using backslashes work as input to Lisp primitives even on
-MS-DOS and MS-Windows, even if @code{directory-sep-char} has its default
-value of @code{?/}.
-@end defvar
-@end ignore
 
 @node Relative File Names
 @subsection Absolute and Relative File Names
@@ -2858,6 +2841,34 @@ non-magic directory to serve as its current directory, and this function
 is a good way to come up with one.
 @end defun
 
+@defopt remote-file-name-inhibit-cache
+Whether to use the remote file-name cache for read access.
+
+File attributes of remote files are cached for better performance.  If
+they are changed out of Emacs' control, the cached values become
+invalid, and must be reread.
+
+When set to @code{nil}, cached values are always used.  This shall be
+set with care.  When set to @code{t}, cached values are never used.
+ALthough this is the safest value, it could result in performance
+degradation.
+
+A compromise is to set it to a positive number.  This means that
+cached values are used for that amount of seconds since they were
+cached.
+
+In case a remote file is checked regularly, it might be reasonable to
+let-bind this variable to a value less then the time period between
+two checks.  Example:
+
+@example
+(defun display-time-file-nonempty-p (file)
+  (let ((remote-file-name-inhibit-cache (- display-time-interval 5)))
+    (and (file-exists-p file)
+         (< 0 (nth 7 (file-attributes (file-chase-links file)))))))
+@end example
+@end defopt
+
 @node Format Conversion
 @section File Format Conversion
 
@@ -3174,7 +3185,3 @@ will produce good, general extensions we can install in Emacs.
 names or values---because a program that general is probably difficult
 to write, and slow.  Instead, choose a set of possible data types that
 are reasonably flexible, and not too hard to encode.
-
-@ignore
-   arch-tag: 141f74ce-6ae3-40dc-a6c4-ef83fc4ec35c
-@end ignore