From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Christoph Arenz Newsgroups: gmane.emacs.devel Subject: Re: Severe regressions in context of keyboard macros Date: Sat, 28 Sep 2019 11:18:51 +0200 Message-ID: <490eaf69-c3fe-6ea3-8f89-c0d4d56c5b88@web.de> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="22236"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 28 11:19:44 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 1iE8tD-0005dZ-6F for ged-emacs-devel@m.gmane.org; Sat, 28 Sep 2019 11:19:43 +0200 Original-Received: from localhost ([::1]:59660 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iE8tB-0005LR-3x for ged-emacs-devel@m.gmane.org; Sat, 28 Sep 2019 05:19:41 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42526) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iE8sU-0005L0-B5 for emacs-devel@gnu.org; Sat, 28 Sep 2019 05:19:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iE8sT-0006kt-9A for emacs-devel@gnu.org; Sat, 28 Sep 2019 05:18:58 -0400 Original-Received: from mout.web.de ([212.227.15.4]:40425) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iE8sR-0006e9-Gr; Sat, 28 Sep 2019 05:18:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569662333; bh=suHV3k5s88PC7H22b8RSWVf7+VAH+OoP9tQHW1MWoAU=; h=X-UI-Sender-Class:Subject:From:To:Cc:References:Date:In-Reply-To; b=qEU/hbUpX/jMYkEaeGfDrA4Q12xql/wvA5xUZx95Nf24PiCEaE1jqa8VqjHXUfPjG N6SAMQJicvu1oAzQf14B9QsHPStAjYV5oR8pn8ht3B6tAQd3Ac2c7vt7mBYGE8waxq Yhw3CGx3F2+Yq2LbImoVPXjl35dljUKZEaqxEPAg= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from [192.168.1.106] ([185.44.135.237]) by smtp.web.de (mrweb002 [213.165.67.108]) with ESMTPSA (Nemesis) id 0M5flQ-1hyyX72wOm-00xYsc; Sat, 28 Sep 2019 11:18:53 +0200 In-Reply-To: <830f19fe-20dd-b3a3-fc50-26573760dbff@web.de> Content-Language: en-US X-Provags-ID: V03:K1:IWXsMX/seZIX3CX1PlwygXzAlVh4TWBvHLdkrvL+r9vCFDQZpGK HO/N6Lgt+VY4CR3FI2s8s6RJQsAq9C2SQN3ZW8kFFih9SOihXe5+Epdk+S9PGrTJaMdrYug 1Xh6A44A0Zeb0qEZMPcYk5jEif097AkMU8H0zkaL0iNZNQY5J3SuiUb4kMLTtgBfvLbenA5 tU3y1r9Uc6wCsNNKu/maw== X-UI-Out-Filterresults: notjunk:1;V03:K0:8h6iIOi4xSc=:DgPbkvj4CFXpH4CGOt0oak 4u3jNa4hn6PYzwqOBFdwIYIhqcx4Dz35ouD7dkpObnSVbN8oCAWaC+WNuGnSsZhuDNRRllCJ4 yd6GHtUBfb2hjg3AK91ghlqEdRCBYuIf1s5eqLwG0srDfBrY7SudZ5fEXv3DrdkltEjlRP8wD 1oW+YIGo+HUloVmvRt4qz8J0F/9D2qTaMyzBtxC9kBrFmc9LnJ8uKgfnC157lLATXKDWm8YUv CfJWe0/B38nlruHqcw4mVxTGNatnmMj5QHHQQZKDYY4Qg7ILAn1qEu/UTe5cODwRjEu6nUEAU B3cxZW+oKXBu6lx+wHx4L1lp9jfpJrvTDxbDHXLUSsVYm+EW6O8Fa4mUN8We4ejZ9xdm3NmvM k3QKenZ0g0uffdKFGNcZlni97ydycxIjk53ovQLiQGua4tCWRTowAY0B2OaiLXanTEMW/IDPJ +EtalzAtK6abFE08Nihve//Klo/Fse6YoI6r3j0BcknE5ib0M+pCI5u3bm3s9uw3ISypGesVu kXWyjCu1uEj/xATcvuRONx8hKHN/U+thFpBO6zFkIPjem9EonA/iaYxh53Yy6FWSgoBFvU1pJ NiKotTf4A31Qyk1xi574rtT0VkAIkAHXuvPVjotBJ1soH4N78av2RECiLAuDwitUnGSUNdcSC DAPBbn5xt7YRw1u9ORX2Oz8IOkgcuRhFU7Vhac/K9uHFAiKSE6jtRSOxU8hN3lQFF9v0KanvT 3BrEmukVmE5bCaecmYh/QbDbL820pSnOSt6ZuvdaXUdOKQjXHL/06YVTCYqjkGL8hwMVWmaB X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.227.15.4 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:240363 Archived-At: On 26.09.19 20:27, Christoph Arenz wrote: > > Now, I started to get a closer look at the other facility you mentioned: > '(no-record . KEY): > Here is my current result. I did not have much time for tests, though. > Does this go in the right direction? I spent some more time on this. The problem is bigger than stated in the original bug report: Any function key that follows a digit and is not separated by a or is recorded twice in calc when defining a keyboard macro, e.g. `1 2 + ' records "2++". I am getting more confident that the patch below fixes this bug.Itfixes a severe issue with macros in calc, does not make things worse and does not interfere in case no macro is being defined. Your thoughts? Thanks, Christoph Author:=C2=A0=C2=A0=C2=A0=C2=A0 Christoph Arenz AuthorDate: Fri Sep 27 20:47:18 2019 +0200 Calc: prevent double-recording of keys in keyboard macros. 1 file changed, 5 insertions(+), 1 deletion(-) lisp/calc/calc.el | 6 +++++- modified=C2=A0=C2=A0 lisp/calc/calc.el @@ -3400,7 +3400,11 @@ calc-read-key =C2=A0=C2=A0=C2=A0=C2=A0 (cons key key))) =C2=A0(defun calc-unread-command (&optional input) -=C2=A0 (push (or input last-command-event) unread-command-events)) +=C2=A0 (let ((event (or input last-command-event))) +=C2=A0=C2=A0=C2=A0 ;; do not double-record key presses when defining a ke= yboard macro +=C2=A0=C2=A0=C2=A0 (when defining-kbd-macro +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (setq event (cons 'no-record event))) +=C2=A0=C2=A0=C2=A0 (push event unread-command-events))) =C2=A0(defun calc-clear-unread-commands () =C2=A0=C2=A0 (setq unread-command-events nil))