unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Asynchronous insertion / saving of buffers
@ 2012-04-13 12:44 Michael Albinus
  2012-04-13 15:22 ` Stefan Monnier
  2012-04-13 18:16 ` Ted Zlatanov
  0 siblings, 2 replies; 10+ messages in thread
From: Michael Albinus @ 2012-04-13 12:44 UTC (permalink / raw)
  To: emacs-devel, tramp-devel

Hi,

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.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-22 18:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-13 12:44 Asynchronous insertion / saving of buffers Michael Albinus
2012-04-13 15:22 ` Stefan Monnier
2012-04-20 13:41   ` Michael Albinus
2012-04-21  2:06     ` Stefan Monnier
2012-04-21  8:57       ` Michael Albinus
2012-04-21 14:17         ` Stefan Monnier
2012-04-22 18:27           ` Michael Albinus
2012-04-13 18:16 ` Ted Zlatanov
2012-04-20 13:49   ` Michael Albinus
2012-04-21 16:14     ` Ted Zlatanov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).