diff options
| author | Michael Albinus <michael.albinus@gmx.de> | 2010-10-03 17:58:09 +0200 |
|---|---|---|
| committer | Michael Albinus <michael.albinus@gmx.de> | 2010-10-03 17:58:09 +0200 |
| commit | 178fdd41ca72858d3ec8a5e780896964cc2997a2 (patch) | |
| tree | 2e7f8ad514b36e40ed05d7383f66c55c2f450b87 | |
| parent | f99d75f5bb7389d609236243bd21a91a52c484ae (diff) | |
| download | emacs-178fdd41ca72858d3ec8a5e780896964cc2997a2.tar.gz | |
* files.texi (Magic File Names): New defopt remote-file-name-inhibit-cache.
| -rw-r--r-- | doc/lispref/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/lispref/files.texi | 28 |
2 files changed, 33 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index dfa070e70b3..e49fe5fc3d8 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,8 @@ +2010-10-03 Michael Albinus <michael.albinus@gmx.de> + + * files.texi (Magic File Names): New defopt + remote-file-name-inhibit-cache. + 2010-10-02 Glenn Morris <rgm@gnu.org> * os.texi (Killing Emacs): Hook now runs in batch mode. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 23fd2376a57..333e60e3df2 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -2857,6 +2857,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 |
