Next: , Previous: Large directories, Up: Common use-cases


10.7 Working with remote directories

The term “remote” means directories which are remote in the sense of TRAMP1, ANGE-FTP2 or EFS3. Each of these Emacs-addons is intended to make editing directories and files on remote machines as transparent as possible.

10.7.1 General remarks

ECB supports such remote directoires out of the box and completely transparently, i.e. you can add remote directories to the option ecb-source-path without any restriction. ECB will handle these directories transparently with the appropriate tool - either TRAMP, ANGE-FTP or EFS. So when working with such a remote directory is possible without ECB it will be possible too with active ECB - at least as long you are “connected”!

Caution: Suppose you have added a remote dir (e.g. “user@host.at.a.server:/dir/”) to ecb-source-path and you start ECB when you are offline, means there can be no connection established to the remote computer (e.g. “host.at.a.server”). Each time ECB has to process a remote path ECB pings via the ping-program the remote host (in the example above it would ping the host “host.at.a.server”) to test if it is accessible. If not then this path will be ignored by ECB4. Ensure that ECB calls your ping-program (see ecb-ping-program) with the right options (see ecb-ping-options). To avoid to many pings to the same host ECB caches the ping result so there should be no performance decrease. But to ensure still correct accessible-results and to avoid using outdated cache-results ECB discards the cached value of the accessible-state of a certain host after a customizable time-interval (please read the documentation of ecb-host-accessible-check-valid-time!).

10.7.2 Excluding remote directories from time-consuming tasks

ECB performs some tasks stealthily and interruptable by the user (see the option ecb-stealthy-tasks-delay for additional explanations) because these tasks are time-consuming and could otherwise ECB block. Especially for remote directories these special tasks can cause annoying blocks of Emacs (see Stealthy background tasks).

Therefore it is probably the best to switch on each of the stealthy tasks with the unless-remote which is the default activation (see Stealthy background tasks). So a certain stealthy task will be swtiched on for all local directories (and also for all mounted drives in the LAN) but not for real remote directories used via TRAMP, ANGE-FTP or EFS.

10.7.3 Caching the contents of remote directories

ECB caches per default the contents of remote directories to avoid annoying delays. The cache is done via the option ecb-cache-directory-contents which contains an entry which covers the syntax of remote directories. If you do not want this caching (which is strongly recommened) you have to remove this entry from this option.


Footnotes

[1] TRAMP stands for 'Transparent Remote (file) Access, Multiple Protocol'. This package provides remote file editing, similar to ANGE-FTP.

[2] This package attempts to make accessing files and directories using FTP from within Emacs as simple and transparent as possible.

[3] A system for transparent file-transfer between remote hosts using the FTP protocol within Emacs

[4] This avoids long lasting and annoying blocking of ECB when a remote-path is not accessible: Without a ping ECB would always try to open this directory through the appropriate library (e.g. TRAMP) and it would depend on the timeout-mechanism of this library (e.g. TRAMP has 60 seconds) how long ECB would be blocked. First after this timeout ECB could start working! A fast “pre”-ping avoids this problem!