From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: User interaction from multiple threads Date: Sat, 25 Aug 2018 22:51:48 +0300 Message-ID: <83bm9q6x7v.fsf@gnu.org> References: <838t59j821.fsf@gnu.org> <87lg92q7ih.fsf@runbox.com> <83a7phdl7r.fsf@gnu.org> <61492e7f622303d02405bedbe65fabae@webmail.orcon.net.nz> <83pnybdaer.fsf@gnu.org> <837ekicw7i.fsf@gnu.org> <877ekiierh.fsf@himinbjorg.adminart.net> <834lflb2fj.fsf@gnu.org> <83h8jk9l41.fsf@gnu.org> <8336v2994c.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1535226648 18909 195.159.176.226 (25 Aug 2018 19:50:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 25 Aug 2018 19:50:48 +0000 (UTC) Cc: psainty@orcon.net.nz, hw@adminart.net, emacs-devel@gnu.org, emacs-devel-bounces+psainty=orcon.net.nz@gnu.org, gazally@runbox.com To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 25 21:50:43 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 1ftea3-0004pm-07 for ged-emacs-devel@m.gmane.org; Sat, 25 Aug 2018 21:50:43 +0200 Original-Received: from localhost ([::1]:46895 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftec9-0008JQ-3j for ged-emacs-devel@m.gmane.org; Sat, 25 Aug 2018 15:52:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftebV-0008JL-FH for emacs-devel@gnu.org; Sat, 25 Aug 2018 15:52:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ftebS-000876-80 for emacs-devel@gnu.org; Sat, 25 Aug 2018 15:52:13 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ftebS-000872-4b; Sat, 25 Aug 2018 15:52:10 -0400 Original-Received: from [176.228.60.248] (port=4069 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ftebL-0004Ea-60; Sat, 25 Aug 2018 15:52:04 -0400 In-reply-to: (message from Richard Stallman on Sat, 25 Aug 2018 15:11:10 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:228910 Archived-At: > From: Richard Stallman > Cc: psainty@orcon.net.nz, hw@adminart.net, gazally@runbox.com, > emacs-devel-bounces+psainty=orcon.net.nz@gnu.org, > emacs-devel@gnu.org > Date: Sat, 25 Aug 2018 15:11:10 -0400 > > > My conclusion from the discussion is that when a thread asks for > > input, it might be too late, because the prompt was already issued. > > In Emacs, prompts are usually output by a function > whose main purpose is to ask for input. Is this no longer true? > So in practice it is easy to tell what is a prompt that asks for input. I think we are miscommunicating regarding what exactly constitutes "asking for input". I assumed you meant low-level functions such as wait_reading_process_output, but you seem to be talking about much higher-level functions, like read-from-minibuffer. > > > until the thread exits? > > > Not until it exits, until it no longer needs to interact with the > > user, for the current transaction (whatever that means). > > How does a thread say that it no longer needs to interact...? We'd need to provide a new API for that. > > I'm saying that fixing the prompt itself is a better alternative, > > because we will always give the prompt more screen estate than to the > > thread ID. > > Emacs could add the thread ID at the start of a prompt > when there are multiple threads that could be asking for input, > such that there is a possibility of confusion. > > That could avoid lengthening the prompts in the usual cases. I don't see how this would solve the problem, since thread IDs will always be quite short.