From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ricardo Wurmus Newsgroups: gmane.emacs.devel Subject: Re: interactive closure =?utf-8?Q?=E2=80=94?= variables not bound Date: Thu, 29 Sep 2016 11:09:22 +0200 Message-ID: <87bmz7t6mk.fsf@elephly.net> References: <87y42ch7e1.fsf@elephly.net> <87eg43u3tj.fsf@elephly.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1475140211 18096 195.159.176.226 (29 Sep 2016 09:10:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Sep 2016 09:10:11 +0000 (UTC) User-Agent: mu4e 0.9.16; emacs 25.1.1 Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 29 11:10:04 2016 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 1bpXLk-0002aQ-Bv for ged-emacs-devel@m.gmane.org; Thu, 29 Sep 2016 11:09:52 +0200 Original-Received: from localhost ([::1]:35752 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpXLh-0007eK-O3 for ged-emacs-devel@m.gmane.org; Thu, 29 Sep 2016 05:09:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpXLV-0007bo-FO for emacs-devel@gnu.org; Thu, 29 Sep 2016 05:09:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpXLQ-0000H3-Cu for emacs-devel@gnu.org; Thu, 29 Sep 2016 05:09:36 -0400 Original-Received: from sender163-mail.zoho.com ([74.201.84.163]:21438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpXLQ-0000Gg-4T for emacs-devel@gnu.org; Thu, 29 Sep 2016 05:09:32 -0400 Original-Received: from localhost (141.80.148.67 [141.80.148.67]) by mx.zohomail.com with SMTPS id 1475140166207351.8578283146097; Thu, 29 Sep 2016 02:09:26 -0700 (PDT) In-reply-to: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 74.201.84.163 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:207893 Archived-At: Stefan Monnier writes: >> I guessed that this odd behaviour must be a result of calling the >> callback procedure from C with “call1”. I thought that maybe this is >> expected behaviour when calling a procedure that interacts with the user >> through the mini-buffer (as read-string does) when it is not using the >> “interactive” form. > > read-string works just as well from outside an interactive spec. > > My crystal ball tells me that it suspects the culprit is that the code > calls the Elisp callback asynchronously, i.e. from a different thread. > IOW it thinks that the code doesn't bother to go through the Elisp event > queue to synchronize with the Elisp engine. Ah, this indeed seems to be the case here! I wasn’t aware of the Elisp event queue. Now that I am, I see that xwidget.c already contains code to create events of kind “XWIDGET_EVENT”, so I’ll try to use that. Thanks for the good hint! ~~ Ricardo