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
because this is not portable. Always use
@code{file-name-as-directory}.
-@cindex directory name abbreviation
- Directory name abbreviations are useful for directories that are
-normally accessed through symbolic links. Sometimes the users recognize
-primarily the link's name as ``the name'' of the directory, and find it
-annoying to see the directory's ``real'' name. If you define the link
-name as an abbreviation for the ``real'' name, Emacs shows users the
-abbreviation instead.
-
-@defopt directory-abbrev-alist
-The variable @code{directory-abbrev-alist} contains an alist of
-abbreviations to use for file directories. Each element has the form
-@code{(@var{from} . @var{to})}, and says to replace @var{from} with
-@var{to} when it appears in a directory name. The @var{from} string is
-actually a regular expression; it should always start with @samp{\`}.
-The @var{to} string should be an ordinary absolute directory name. Do
-not use @samp{~} to stand for a home directory in that string. The
-function @code{abbreviate-file-name} performs these substitutions.
-
-You can set this variable in @file{site-init.el} to describe the
-abbreviations appropriate for your site.
-
-Here's an example, from a system on which file system @file{/home/fsf}
-and so on are normally accessed through symbolic links named @file{/fsf}
-and so on.
-
-@example
-(("\\`/home/fsf" . "/fsf")
- ("\\`/home/gp" . "/gp")
- ("\\`/home/gd" . "/gd"))
-@end example
-@end defopt
-
To convert a directory name to its abbreviation, use this
function:
@defun abbreviate-file-name filename
@anchor{Definition of abbreviate-file-name}
-This function applies abbreviations from @code{directory-abbrev-alist}
-to its argument, and also substitutes @samp{~} for the user's home
-directory if the argument names a file in the home directory or one of
-its subdirectories. (If the home directory is a root directory, it is
-not replaced with @samp{~}, because this does not make the result
-shorter on many systems.) You can use it for directory names and for
-file names, because it recognizes abbreviations even as part of the
-name.
+This function returns an abbreviated form of @var{filename}. It
+applies the abbreviations specified in @code{directory-abbrev-alist}
+(@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}),
+then substitutes @samp{~} for the user's home directory if the
+argument names a file in the home directory or one of its
+subdirectories. If the home directory is a root directory, it is not
+replaced with @samp{~}, because this does not make the result shorter
+on many systems.
+
+You can use this function for directory names and for file names,
+because it recognizes abbreviations even as part of the name.
@end defun
@node File Name Expansion
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