unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Spencer Baugh <sbaugh@janestreet.com>
Cc: emacs-devel@gnu.org
Subject: Re: A UI approach for making synchronous commands asynchronous
Date: Thu, 27 Jul 2023 22:32:34 +0300	[thread overview]
Message-ID: <838rb1kv59.fsf@gnu.org> (raw)
In-Reply-To: <ierlef1rz8z.fsf@janestreet.com> (message from Spencer Baugh on Thu, 27 Jul 2023 14:22:04 -0400)

> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Thu, 27 Jul 2023 14:22:04 -0400
> 
> Ideally the buffer would update incrementally with the new or removed
> names as they happen, and be fully updated once the rename is finished.
> 
> That can be difficult to implement, though.  And also, for some kinds of
> operations, it's not clear what the buffer should look like while the
> command is half-done.
> 
> So here's another idea that would help with that: maybe we could have a
> kind of buffer-specific blocking.  A "blocking" buffer would refuse all
> input and commands while it's "blocking", and it wouldn't update, but
> the user can switch to other buffers and edit them without a problem.
> So, buffer-specific commands wouldn't work, but commands like C-x b and
> C-x o would work.  It might be kind of like how term-mode works today.

Here you already describe the same "blocking" or "locking" that was
discussed at length in the other thread about concurrency.  Which I
think means that you are basically thinking about the same ideas with
the same issues and possible solutions.  It is not a different set of
ideas.

> So in that world, the user would execute a dired rename operation, and
> then execute C-M-z to background it, and that would cause that dired
> buffer to stop responding while the rename is proceeding, while other
> buffers continue to work.
> 
> One question is what happens to the user's input when the buffer
> "blocks".  Today when Emacs as a whole is blocking, key input gets
> queued up and executed when Emacs resumes.  Should the same happen for
> blocking buffers?  Or maybe any key input should just immediately result
> in errors being printed?  The latter seems preferable, and it wouldn't
> be a compatibility break because the user would have to run C-M-z to
> trigger such behavior.

Queuing input means blocking UI, so if we lock various parts of Emacs
while a command runs, we will have achieved nothing.



  reply	other threads:[~2023-07-27 19:32 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-26 19:07 A UI approach for making synchronous commands asynchronous Spencer Baugh
2023-07-27  5:58 ` Eli Zaretskii
2023-07-27 14:22   ` Spencer Baugh
2023-07-27 15:09     ` Eli Zaretskii
2023-07-27 15:32       ` Spencer Baugh
2023-07-27 17:31         ` Eli Zaretskii
2023-07-27 18:22           ` Spencer Baugh
2023-07-27 19:32             ` Eli Zaretskii [this message]
2023-07-28  4:32               ` tomas
2023-07-28  6:21                 ` Eli Zaretskii
2023-08-01 14:09 ` Spencer Baugh
2023-08-01 16:53   ` Helmut Eller
2023-08-01 17:11     ` Eli Zaretskii

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=838rb1kv59.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=sbaugh@janestreet.com \
    /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).