diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/os.texi | 13 | ||||
-rw-r--r-- | doc/misc/tramp.texi | 52 |
2 files changed, 58 insertions, 7 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index bc602205f5d..85f930d1897 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2106,6 +2106,19 @@ run while waiting. If a timer function needs to perform an action after a certain time has elapsed, it can do this by scheduling a new timer. + If a timer function performs a remote file operation, it can be in +conflict with an already running remote file operation of the same +connection. Such conflicts are detected, and they result in a +@code{remote-file-error} error (@pxref{Standard Errors}). This should +be protected by wrapping the timer function body with + +@lisp +@group +(ignore-error 'remote-file-error + @dots{}) +@end group +@end lisp + If a timer function calls functions that can change the match data, it should save and restore the match data. @xref{Saving Match Data}. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 59b8bdbdf37..0557ca54695 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2508,7 +2508,7 @@ whatever shell is installed on the device with this setting: @lisp @group (add-to-list 'tramp-connection-properties - (list (regexp-quote "192.168.0.26") "remote-shell" "sh")) + (list (regexp-quote "192.168.0.26") "remote-shell" "sh")) @end group @end lisp @@ -2560,7 +2560,7 @@ the previous example, fix the connection properties as follows: @lisp @group (add-to-list 'tramp-connection-properties - (list (regexp-quote "android") "remote-shell" "sh")) + (list (regexp-quote "android") "remote-shell" "sh")) @end group @end lisp @@ -4341,9 +4341,9 @@ configure @file{~/.ssh/config} on the proxy host: @example @group Host * - ControlMaster auto - ControlPath tramp.%C - ControlPersist no + ControlMaster auto + ControlPath tramp.%C + ControlPersist no @end group @end example @@ -4878,6 +4878,25 @@ In case you have installed it from its Git repository, @ref{Recompilation}. @item +I get an error @samp{Remote file error: Forbidden reentrant call of Tramp} + +Timers, process filters and sentinels, and other event based functions +can run at any time, when a remote file operation is still running. +This can cause @value{tramp} to block. When such a situation is +detected, this error is triggered. It shall be fixed in the +respective function (an error report will help), but for the time +being you can suppress this error by the following code in your +@file{~/.emacs}: + +@lisp +@group +(setq debug-ignored-errors + (cons 'remote-file-error debug-ignored-errors)) +@end group +@end lisp + + +@item How to disable other packages from calling @value{tramp}? There are packages that call @value{tramp} without the user ever @@ -4982,7 +5001,7 @@ handlers. @node External packages @section Integrating with external Lisp packages -@subsection File name completion. +@subsection File name completion @vindex non-essential Sometimes, it is not convenient to open a new connection to a remote @@ -5000,7 +5019,7 @@ bind it to non-@code{nil} value. @end lisp -@subsection File attributes cache. +@subsection File attributes cache Keeping a local cache of remote file attributes in sync with the remote host is a time-consuming operation. Flushing and re-querying @@ -5040,6 +5059,25 @@ root-directory, it is most likely sufficient to make the @code{default-directory} of the process buffer as the root directory. +@subsection Timers + +Timers run asynchronously at any time when Emacs is waiting for +sending a string to a process, or waiting for process output. They +can run any remote file operation, which would conflict with the +already running remote file operation, if the same connection is +affected. @value{tramp} detects this situation, and raises the +@code{remote-file-error} error. A timer function shall avoid this +situation. At least, it shall protect itself against this error, by +wrapping the timer function body with + +@lisp +@group +(ignore-error 'remote-file-error + @dots{}) +@end group +@end lisp + + @node Traces and Profiles @chapter How to Customize Traces @vindex tramp-verbose |