From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Gemini Lasswell Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Tue, 21 Aug 2018 09:17:16 -0700 Message-ID: <87wosjpucz.fsf@runbox.com> References: <838t59j821.fsf@gnu.org> <87lg92q7ih.fsf@runbox.com> <83a7phdl7r.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1534868233 10178 195.159.176.226 (21 Aug 2018 16:17:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Aug 2018 16:17:13 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Aug 21 18:17:09 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 1fs9LA-0002W7-1G for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2018 18:17:08 +0200 Original-Received: from localhost ([::1]:54728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs9NG-0006EY-JS for ged-emacs-devel@m.gmane.org; Tue, 21 Aug 2018 12:19:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fs9M0-0006Dl-10 for emacs-devel@gnu.org; Tue, 21 Aug 2018 12:18:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fs9Lv-0005r7-M9 for emacs-devel@gnu.org; Tue, 21 Aug 2018 12:17:59 -0400 Original-Received: from aibo.runbox.com ([91.220.196.211]:38518) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fs9Lr-0005ld-03; Tue, 21 Aug 2018 12:17:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=runbox.com; s=rbselector1; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From; bh=/oJQR0b1/tdnroCEgJNVUPbd8+AoJjrKSY7+4JvYdls=; b=GCHIClsRUHGeMOmTPX9W+sya3G /bOEA9PcoXxFIrvacTj3Icbrl8XdL3jRji1K+AXZR23UZR+Fi8ph9dNUlgwfQgubasNkph3rIrwcv C7PqhfYVjyw8cTUGoKjrWUSqRgPUSio6Jg32lUxmx1dLfhK9qwecgYWcHZIaYQvftKzOosGyATocB AUDb1ZVw5vogR1hfvd8ML2MNNQ0XArJJUQ5/V9YaZEIHiUhAU2dsGiJaJNtKU0LDEFZ0aWscaUtSv 79S1c0lF8A14e3JZ2dtM0bn1zAU7H7wT+u24lpEmn/k+pNuXx2/SyGj4x54fdraOu25NrzytJtgkO RKIPpPWw==; Original-Received: from [10.9.9.212] (helo=mailfront12.runbox.com) by mailtransmit02.runbox with esmtp (Exim 4.86_2) (envelope-from ) id 1fs9Lm-0005CZ-1X; Tue, 21 Aug 2018 18:17:46 +0200 Original-Received: by mailfront12.runbox.com with esmtpsa (uid:179284 ) (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) id 1fs9LK-0007rt-UC; Tue, 21 Aug 2018 18:17:19 +0200 In-Reply-To: <83a7phdl7r.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Aug 2018 20:03:20 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.220.196.211 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:228788 Archived-At: Eli Zaretskii writes: > Then there's the issue of passing the result to the prompting thread. > Unless you want to ask the programmer of that thread's function to > write specialized code for user interaction, the prompting thread > expects to get the keyboard input through the normal input machinery, > like read_key_sequence. How will that be possible with the "queue" > model? Thanks, I understand the difficulties better now. >> The user should, as now, be able to type C-x C-o or C-x 5 o during >> read-from-minibuffer, and perform unrelated commands on another buffer. > > This means some of the user input should go to the prompting thread, > while some other part ("C-x C-o" in your example) should go to the > main thread, so that it switches to another frame. How will Emacs > know which part of user input is intended to what thread? I don't know, but I frequently leave minibuffer prompts, usually with my keybinding for avy-find-char-timer, but sometimes using C-x o or C-x 5 o, and return to them later. I also have enable-recursive-minibuffers set. So from my point of view as an Emacs user, I want to be able to continue to do this, whether the minibuffer prompt I'm looking at came from the main thread or some other thread.