diff options
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/tramp.texi | 21 |
2 files changed, 25 insertions, 1 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 81b89b98a2e..2d67aec0eab 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2010-08-05 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * tramp.texi (External packages): File attributes cache flushing | ||
| 4 | for asynchronous processes. | ||
| 5 | |||
| 1 | 2010-08-01 Alan Mackenzie <acm@muc.de> | 6 | 2010-08-01 Alan Mackenzie <acm@muc.de> |
| 2 | 7 | ||
| 3 | Enhance the manual for the latest Java Mode. | 8 | Enhance the manual for the latest Java Mode. |
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 41f29de09d2..b9c83be457e 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -3471,7 +3471,7 @@ it has seen so far. | |||
| 3471 | 3471 | ||
| 3472 | This is a performance degradation, because the lost file attributes | 3472 | This is a performance degradation, because the lost file attributes |
| 3473 | must be recomputed, when needed again. In cases the caller of | 3473 | must be recomputed, when needed again. In cases the caller of |
| 3474 | @code{process-file} knows that there are file attribute changes, it | 3474 | @code{process-file} knows that there are no file attribute changes, it |
| 3475 | shall let-bind the variable @code{process-file-side-effects} to | 3475 | shall let-bind the variable @code{process-file-side-effects} to |
| 3476 | @code{nil}. @value{tramp} wouldn't flush the file attributes cache then. | 3476 | @code{nil}. @value{tramp} wouldn't flush the file attributes cache then. |
| 3477 | 3477 | ||
| @@ -3479,6 +3479,25 @@ shall let-bind the variable @code{process-file-side-effects} to | |||
| 3479 | (let (process-file-side-effects) | 3479 | (let (process-file-side-effects) |
| 3480 | ...) | 3480 | ...) |
| 3481 | @end lisp | 3481 | @end lisp |
| 3482 | |||
| 3483 | For asynchronous processes, @value{tramp} flushes the file attributes | ||
| 3484 | cache via a process sentinel. If the caller of | ||
| 3485 | @code{start-file-process} knows that there are no file attribute | ||
| 3486 | changes, it shall set the process sentinel to @code{nil}. In case the | ||
| 3487 | caller defines an own process sentinel, @value{tramp}'s process | ||
| 3488 | sentinel is overwritten. The caller can still flush the file | ||
| 3489 | attributes cache in its process sentinel with this code: | ||
| 3490 | |||
| 3491 | @lisp | ||
| 3492 | (unless (memq (process-status proc) '(run open)) | ||
| 3493 | (dired-uncache remote-directory)) | ||
| 3494 | @end lisp | ||
| 3495 | |||
| 3496 | @code{remote-directory} shall be the root directory, where file | ||
| 3497 | attribute changes can happen during the process lifetime. | ||
| 3498 | @value{tramp} traverses all subdirectories, starting at this | ||
| 3499 | directory. Often, it is sufficient to use @code{default-directory} of | ||
| 3500 | the process buffer as root directory. | ||
| 3482 | @end ifset | 3501 | @end ifset |
| 3483 | 3502 | ||
| 3484 | 3503 | ||