From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Severe lossage from unread-command-events Date: Thu, 06 Aug 2015 17:46:28 +0200 Message-ID: <87bnek2ze3.fsf@fencepost.gnu.org> References: <87egjh4u1h.fsf@fencepost.gnu.org> <83pp30sd5l.fsf@gnu.org> <87k2t831gf.fsf@fencepost.gnu.org> <83io8ssakw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438881728 24104 80.91.229.3 (6 Aug 2015 17:22:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Aug 2015 17:22:08 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 06 19:22:07 2015 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 1ZNOrn-0007iJ-LH for ged-emacs-devel@m.gmane.org; Thu, 06 Aug 2015 19:22:07 +0200 Original-Received: from localhost ([::1]:45621 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNNNX-0000dF-R6 for ged-emacs-devel@m.gmane.org; Thu, 06 Aug 2015 11:46:47 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44272) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNNNH-0000cv-PL for emacs-devel@gnu.org; Thu, 06 Aug 2015 11:46:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNNNG-00038l-6g for emacs-devel@gnu.org; Thu, 06 Aug 2015 11:46:31 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNNNG-00038h-3I for emacs-devel@gnu.org; Thu, 06 Aug 2015 11:46:30 -0400 Original-Received: from localhost ([127.0.0.1]:40120 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.82) (envelope-from ) id 1ZNNNF-0006Ne-D2; Thu, 06 Aug 2015 11:46:29 -0400 Original-Received: by lola (Postfix, from userid 1000) id B06BCE0E47; Thu, 6 Aug 2015 17:46:28 +0200 (CEST) In-Reply-To: <83io8ssakw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 06 Aug 2015 18:25:35 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188510 Archived-At: Eli Zaretskii writes: > To see what's going on, I instrumented the code with special > printouts, and clearly saw that we only record the events that are > taken from unread-command-events in one of two possible places in the > code, where we have fragments such as this one: > > if (CONSP (Vunread_command_events)) > { > [...] > c = XCAR (Vunread_command_events); > Vunread_command_events = XCDR (Vunread_command_events); > > One such fragment is at the beginning of read_char, around line 2430 > of keyboard.c -- the events taken there are not recorded, because we > jump over the code that records them. That's bad because that sounds _intentional_. >> Or whether the code is in need of reorganization before one can hope >> to get it right anyway. > > It's next to impossible to reorganize code one doesn't fully > understand, and do a good job. In particular when it contains "somebody must have had a good reason for this, so let's try to preserve some of those semantics" passages. There are several #if 0 passages in keyboard.c with various rationales in them that might have applied at some point of time. So my suspicion is that this change might result in problems that the old code arrangement was intended to avoid. But one will probably not get new input on this without trying. -- David Kastrup