From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Fri, 17 Aug 2018 09:24:31 +0200 Message-ID: <5B76782F.6060303@gmx.at> References: <838t59j821.fsf@gnu.org> <5B73DF10.5070200@gmx.at> <87muto5998.fsf@gmx.de> <5B73ED7E.5000102@gmx.at> <87in4b6hwf.fsf@gmx.de> <5B741C4E.6060403@gmx.at> <83sh3fin70.fsf@gnu.org> <5B756C41.1040600@gmx.at> <83a7pmifvd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1534490573 1134 195.159.176.226 (17 Aug 2018 07:22:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 17 Aug 2018 07:22:53 +0000 (UTC) Cc: michael.albinus@gmx.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 17 09:22:49 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fqZ5q-0000B6-3P for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2018 09:22:46 +0200 Original-Received: from localhost ([::1]:60377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqZ7w-00038E-I0 for ged-emacs-devel@m.gmane.org; Fri, 17 Aug 2018 03:24:56 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58722) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fqZ7q-00037r-45 for emacs-devel@gnu.org; Fri, 17 Aug 2018 03:24:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fqZ7p-0008PF-Ev for emacs-devel@gnu.org; Fri, 17 Aug 2018 03:24:50 -0400 Original-Received: from mout.gmx.net ([212.227.17.20]:58585) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fqZ7k-0008IS-Lq; Fri, 17 Aug 2018 03:24:44 -0400 Original-Received: from [192.168.1.101] ([212.95.5.2]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MgpmG-1fUTta2VSS-00M2tF; Fri, 17 Aug 2018 09:24:42 +0200 In-Reply-To: <83a7pmifvd.fsf@gnu.org> X-Provags-ID: V03:K1:qzNPIdrdfqDGMhRilKDL9egwWK/4ujPPZjD0x2R3unq+YBK0e86 uMhvrLRgmOHJjJwzuRdNQi5KdNxW0pJG1yRFx0CbiW382DKdS3fa3/0gCacG550JhhGHB8p r+L3kMCjbvd7MQqpYht9xh6umLEIlZTbWExPCcufrRqb+HUV8M1tnf3D9GiPtyGC44Z3jE4 6AUkshz2d+DfPljIg74tQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:vOcYlkDlkqU=:f1fAPy0NiIDXeTJ0me/L56 QRv8Zduhr5nZDCKhZYO0PxmvJX5YvXYP0Ig9sSBQ2c2wb1NqcJPUggsy/zM32aCiYHo/Qf/zA GoiJDUbkVdsPCDCtzc6nbQ7s/QRJuObXlr+qhDfnuQsIr/gGl2z366Fpm7QS8tSG5a3PgY42V cOHImeEZkXHAF4RYjJQiKoKgCZexm+SX07Ke8bJGTQtip3TzE4g4Kzbzlu6HFAotgd+jaIhK9 YRLFd/5sgclRfH+RuNRGatiWxrXTdQNzjtojETtxcZ7pPIk9CJH+qwuBIR6hI4FL0JgaFuAYX PK1CEm0BvjEQO0HAWANEg6zWiT61VTc33V1NNTkzKrjYHK5dfJ7ruUm4LX8FV6D5GZyfzgoJu DOHx2icgRwdybBtllne9EaWKnppIhRzWSPq5CPcpIcQE5ebnfVphs2PhXcMgh2genuUDW/Gtx cZqJlk7Wu95FugZrInEruECYDduK3/0gCNa3Dyytufr8wktTu5sSGt79KtAH/eFe/zRE9BPVx KToWETYE0Vv2dmyFf4SrcXF88BGZfJLnfliBFZ2YaP+BXLJfM9K8khqB3Pv42pcv4Z8iq1yzT Uampvkoh+nZbLGZeGlhFdb/JqGPJZU58imlwyl5N7HXalT4qrajC1yINIhQiy2RDUc899kQxw ET+VdVZIs4WuvZaYg6JrBQfKkL7OSF1iAmGbirv/iXuxd9pvJBN+fs40JHKTn3Io8L6a6DpgL dGckPZNyA8njkRgfVhCtlXZj7+mKYAlINFrl7KFAWf0WIk64KNQwR7zRcOiZiF00UKXbFWfA X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.20 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:228624 Archived-At: >> I'd want to relax the organization of minibuffers. Instead of >> maintaining them in form of a stack, allow random access to the >> minibuffer list. Instead of having always only the one on top of the >> stack active, allow to make any of them the active one. And allow any >> of them to appear in its own dedicated minibuffer window where the >> selectedness of that window's frame indicates the currently active >> minibuffer. > > That is a fine plan, but how does it make the issue at hand easier to > solve? Calling it a "fine plan" probably means that you doubt it can be implemented. Maybe you're right. Anyway, the issues you raised when you started this thread were: > Use case #1: > > . The main thread is waiting for user input. The user didn't yet > type anything > . A non-main thread runs Lisp that prompts the user for some input > > In this case, we probably want the following input to go to the > prompting thread, right? But it might also be the case that the > user actually wants the input to go to the main thread, e.g. to > perform some unrelated command. Should we allow that? If yes, how > should Emacs know which thread should receive what the user types? The last question you ask here would be resolved because the user types "into a window" and that window is unambiguously owned by the thread that should receive what the user types. > Use case #2: > > Same as the previous, but now the user is in the middle of typing a > key sequence, when the non-main thread prompts. For example, > suppose the user has typed "C-x". > > What do we want to happen now? Do we "preempt" the main thread and > let the following input to go to the prompting thread? Or do we let > the prompting thread wait until the main thread reads a full key > sequence and runs the command bound to it? If the former, what to > do with the partial key sequence ("C-x") that the user typed? If > the latter, how do we indicate to the user that there is a prompt > from another thread? The non-main thread would prompt in another frame and the user can choose whether to continue with her input or have a look at the prompting frame and answer that prompt. > Use case #3: > > Similar, but now 2 or more non-main threads prompt the user, one > after the other, in quick succession. What should happen now, and > how will the user know there are multiple prompts? Each prompt has its own frame and the user can choose the order in which to answer prompts by switching to the corresponding frame first. martin