unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: emacs-devel@gnu.org, tramp-devel@gnu.org
Subject: Asynchronous insertion / saving of buffers
Date: Fri, 13 Apr 2012 14:44:31 +0200	[thread overview]
Message-ID: <871unrkdhs.fsf@gmx.de> (raw)

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.



             reply	other threads:[~2012-04-13 12:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-13 12:44 Michael Albinus [this message]
2012-04-13 15:22 ` Asynchronous insertion / saving of buffers 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871unrkdhs.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=emacs-devel@gnu.org \
    --cc=tramp-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).