From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/exwm 0b8a373: Fix a `unread-command-events' issue for Emacs 24 Date: Thu, 14 Jul 2016 21:48:11 -0400 Message-ID: References: <20160715001351.14660.27588@vcs.savannah.gnu.org> <20160715001351.9FD2C22014B@vcs.savannah.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1468547344 29518 80.91.229.3 (15 Jul 2016 01:49:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 15 Jul 2016 01:49:04 +0000 (UTC) Cc: emacs-devel To: Chris Feng Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 15 03:48:53 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bNsFJ-0006tn-95 for ged-emacs-devel@m.gmane.org; Fri, 15 Jul 2016 03:48:53 +0200 Original-Received: from localhost ([::1]:57826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNsFI-00031F-Ls for ged-emacs-devel@m.gmane.org; Thu, 14 Jul 2016 21:48:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46074) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNsEl-000318-8q for emacs-devel@gnu.org; Thu, 14 Jul 2016 21:48:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNsEh-0001kw-QX for emacs-devel@gnu.org; Thu, 14 Jul 2016 21:48:18 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:15616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNsEh-0001ks-M4 for emacs-devel@gnu.org; Thu, 14 Jul 2016 21:48:15 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A+FgA731xV/3mcpUVcgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWHAcFCws0EhQYDSSINwjPIwEBAQcBAQEBHos6hDpLB4QtAQSZbYUqkhSCFIFFI4FmVYFZIoJ4AQEB X-IPAS-Result: A0A+FgA731xV/3mcpUVcgxCEAoVVwwsEAgKBPD0QAQEBAQEBAYEKQQWDXQEBAwFWHAcFCws0EhQYDSSINwjPIwEBAQcBAQEBHos6hDpLB4QtAQSZbYUqkhSCFIFFI4FmVYFZIoJ4AQEB X-IronPort-AV: E=Sophos;i="5.13,465,1427774400"; d="scan'208";a="248008565" Original-Received: from 69-165-156-121.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.165.156.121]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 14 Jul 2016 21:48:12 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id AC75DAE0ED; Thu, 14 Jul 2016 21:48:11 -0400 (EDT) In-Reply-To: (Chris Feng's message of "Fri, 15 Jul 2016 09:03:23 +0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 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:205695 Archived-At: > My concern was that the function would get called very frequently (on > every key event in certain circumstances) so I made them inline. I don't think "every key event" (human scale) can be "very frequently" at the computer's scale. And in any case, the time to process the event later on will completely dwarf this. > As for your the problem you pointed out, my understanding is that > bytecodes for Emacs 24 and 25 are largely not compatible, at least for > this package which heavily relies on EIEIO. So even if we can choose > between the two functions at run time the compiled code still won't > run correctly. Oh, indeed if it uses EIEIO it's quite possible that recompilation will be needed anyway. > The events are received directly from X server (rather than Emacs) in > chronological order so I think it makes sense to append them to > `unread-command-events', in case previous events added not processed > timely. Say you have (X Y Z) in unread-command-events, and Emacs comes takes X out and processes it. If during processing you push the new event A at the end, that means it'll be processed in a different order than if Y and Z had been received a bit later. The right choice depends on the nature of the event you're pushing (A) and its relationship to the current event (X), so it has to be decided on a case-by-case basis according to the specific details. So maybe that's indeed the behavior you want (and I don't know nearly enough about the events you're manipulating to be able to tell), but usually in my experience you want to push to the front. > Also there're related bugs with `unread-command-events' (bug#23980). > Could you take a look? I'll take a look, Stefan