[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Asynchronous insertion / saving of buffers

From: Michael Albinus
Subject: Asynchronous insertion / saving of buffers
Date: Fri, 13 Apr 2012 14:44:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux)


these days I'm working on Bug#9617, which asks for non-blocking
(asynchronous) insertion or saving of buffers. This makes sense for
large remote files, because Emacs would be blocked for a while during
these operations.

The implementation for `insert-file-contents' works pretty well
meanwhile (technically, an asynchronous process copies the remote file
into a local temporary file in the background, and a corresponding
process sentinel inserts this local file into the buffer once the
process has finished).

However, this is not sufficient. File name handlers, like Tramp, know
only primitive operations. In the environment where these primitive
operations are called, further actions will be applied, assuming that
the primitive operation has finished once it returns. In case of
`insert-file-contents', further operations will be applied, which fail
in the asynchronous case due to the missing buffer contents. Examples:

- Call of `after-find-file', which expands for example tar files

- Operations from vc-*, which check a status (like reading and parsing
  dirstate in vc-bzr)

Obviously, we need some design how to handle asynchronous file
operations. Any proposals?

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]