unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: <tomas@tuxteam.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Spencer Baugh <sbaugh@janestreet.com>, emacs-devel@gnu.org
Subject: Re: A UI approach for making synchronous commands asynchronous
Date: Fri, 28 Jul 2023 06:32:26 +0200	[thread overview]
Message-ID: <ZMNE2i8fHho3Z/M9@tuxteam.de> (raw)
In-Reply-To: <838rb1kv59.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2340 bytes --]

On Thu, Jul 27, 2023 at 10:32:34PM +0300, Eli Zaretskii wrote:
> > 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.

I think Spencer is onto something here. The really "fun" part in all
this multiprocessing part is the interaction with the user (as an
independent entity).

Spencer's idea is just one possibility. Another would be to just lock
"part of a buffer" (whatever that means,see below): for example, in
Org-Babel, where a snippet of the buffer is passed for evaluation to
some external process and the results (think stdout) are inserted in
a specific region of the buffer, you only have to keep a "lock" on
this.

Now, what happens if the user deletes a whole region containing that
"part of the buffer"? How does Emacs signal to the user that this "part"
is currently "moving"? Should that "part" be intangible? How does Emacs
signal that it's "done"?

I think Spencer's original mail was a proposal to think about such
things and to try to discuss and develop "language elements" (not
in the sense of "computer language", more of "user interaction
language"), that's how I read his "user interface" term there.

Spencer: am I right?

thanks
-- 
tomás

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

  reply	other threads:[~2023-07-28  4: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
2023-07-28  4:32               ` tomas [this message]
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=ZMNE2i8fHho3Z/M9@tuxteam.de \
    --to=tomas@tuxteam.de \
    --cc=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).