From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#42028: [Feature Request] 27.0.91; Provide the ability dynamic modules to post events in emacs event loop Date: Wed, 24 Jun 2020 17:44:42 +0300 Message-ID: <83bll8ttet.fsf@gnu.org> References: <875zbh0wbf.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="46044"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 42028@debbugs.gnu.org To: Ivan Yonchovski Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 24 16:46:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jo6fC-000Bp7-I8 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 16:46:10 +0200 Original-Received: from localhost ([::1]:49942 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo6fB-0001mN-1r for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 24 Jun 2020 10:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42768) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo6f4-0001jx-Dv for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 10:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jo6f4-0003r4-3x for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 10:46:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jo6f4-0004q7-1H for bug-gnu-emacs@gnu.org; Wed, 24 Jun 2020 10:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jun 2020 14:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42028 X-GNU-PR-Package: emacs Original-Received: via spool by 42028-submit@debbugs.gnu.org id=B42028.159300990718536 (code B ref 42028); Wed, 24 Jun 2020 14:46:01 +0000 Original-Received: (at 42028) by debbugs.gnu.org; 24 Jun 2020 14:45:07 +0000 Original-Received: from localhost ([127.0.0.1]:38646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo6eB-0004ou-CW for submit@debbugs.gnu.org; Wed, 24 Jun 2020 10:45:07 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56192) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jo6e8-0004o5-TH for 42028@debbugs.gnu.org; Wed, 24 Jun 2020 10:45:05 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50929) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo6e3-0003Cz-IK; Wed, 24 Jun 2020 10:44:59 -0400 Original-Received: from [176.228.60.248] (port=2205 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jo6e2-0005zc-VB; Wed, 24 Jun 2020 10:44:59 -0400 In-Reply-To: <875zbh0wbf.fsf@gmail.com> (message from Ivan Yonchovski on Wed, 24 Jun 2020 10:14:44 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182338 Archived-At: > From: Ivan Yonchovski > Date: Wed, 24 Jun 2020 10:14:44 +0300 > > This is needed for the cases when the module is listening for extenal > events and wants to call back emacs to process them. ATM this is kind of > possible by using signals on linux and using WM_INPUTLANGCHANGE as > described in https://nullprogram.com/blog/2017/02/14/ but this looks > more a hack for a missing feature. It is almost trivial to let modules insert events into the event queue. The problem is that I expect a module that inserts such events to want to be called to process those events as well. Is that expectation correct? If it is, then we need to think about extending the mechanism that calls event handlers, not just about exposing the likes of kbd_buffer_store_event to modules. We should also consider how a module could define its own events. IOW, this calls for a slightly more detailed specification, before someone could sit down and code the stuff. I suggest to take a look at how existing events are handled, and propose such a detailed specification. Thanks.