From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Severe regressions in context of keyboard macros Date: Sat, 28 Sep 2019 08:35:29 -0400 Message-ID: References: <83a7aztoq9.fsf@gnu.org> <6b147564-cfea-1824-701f-33495958d304@web.de> <83d0fusvjd.fsf@gnu.org> <83wodynkuo.fsf@gnu.org> <83wodvl40w.fsf@gnu.org> <65332ac9-0e3f-fbd4-ac84-5ae4e7126d37@web.de> <83v9tfl0lc.fsf@gnu.org> <830f19fe-20dd-b3a3-fc50-26573760dbff@web.de> <490eaf69-c3fe-6ea3-8f89-c0d4d56c5b88@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="266127"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Christoph Arenz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 28 14:36:03 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iEBxD-00174g-9F for ged-emacs-devel@m.gmane.org; Sat, 28 Sep 2019 14:36:03 +0200 Original-Received: from localhost ([::1]:60904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEBxB-0001U0-Ao for ged-emacs-devel@m.gmane.org; Sat, 28 Sep 2019 08:36:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36962) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEBwu-0001Tu-Nr for emacs-devel@gnu.org; Sat, 28 Sep 2019 08:35:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEBwt-0007ao-0b for emacs-devel@gnu.org; Sat, 28 Sep 2019 08:35:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9079) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iEBwp-0007V6-64; Sat, 28 Sep 2019 08:35:39 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7A79E81245; Sat, 28 Sep 2019 08:35:37 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E6B4180D78; Sat, 28 Sep 2019 08:35:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1569674131; bh=4BcqezgcBQZ4pcABRgSdL5E0D1yiP0Pv+P4XmQGh4zs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=QojhWQLNHAqiIjGbiXILHgP7Lg8fB2R2n2nt+y1MuTKVK9pqQB4EsJR2hkWLP6OAZ zNpwUxMvYIORTdchdrUvCglnLyZpzRlhyt8OV//ZqPvpuLjlF+qT7U028JH0GW66qX XqpPE8TH9XtPRd3MJM+khWaF1AZsyfxgWfTCZFjQbr5aqbCcysg5oXY43o4lX6p1I8 zlq9vfN6FkMjCQf97B2tD9PYzjkovfd/y9ooTRyFbM+lmbiafrWif5qhO0jQTJ8dGJ l+ddo2dZR2qj1lbjwZhVHoKmNs2JGpDSpwFlySvtzw7f6uO92vm+JAmTBuifasJggW sn+hhi/Vb2njw== Original-Received: from pastel (107-179-151-143.cpe.teksavvy.com [107.179.151.143]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DD62A120AA6; Sat, 28 Sep 2019 08:35:30 -0400 (EDT) In-Reply-To: <490eaf69-c3fe-6ea3-8f89-c0d4d56c5b88@web.de> (Christoph Arenz's message of "Sat, 28 Sep 2019 11:18:51 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:240367 Archived-At: > =A0(defun calc-unread-command (&optional input) > -=A0 (push (or input last-command-event) unread-command-events)) > +=A0 (let ((event (or input last-command-event))) > +=A0=A0=A0 ;; do not double-record key presses when defining a keyboard m= acro > +=A0=A0=A0 (when defining-kbd-macro > +=A0=A0=A0=A0=A0 (setq event (cons 'no-record event))) > +=A0=A0=A0 (push event unread-command-events))) Over the years, I have convinced myself that there is pretty much no way to put events back on unread-command-events for reprocessing without introducing corner case bugs. For this reason I introduced the `set-transient-map` function, which can be used in some cases to avoid "read + unread". Anyway, my point is that maybe a better fix is to try and understand why Calc does a read+unread and then figure out a way to get the same end result without needing to read+unread. Stefan