diff options
Diffstat (limited to 'doc/lispref/files.texi')
-rw-r--r-- | doc/lispref/files.texi | 52 |
1 files changed, 31 insertions, 21 deletions
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index e2560c2abf..72f39f681a 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -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 @@ -1788,20 +1788,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 +2844,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 +3188,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 |