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: Thu, 26 Sep 2019 12:46:20 +0200 Message-ID: References: <83a7aztoq9.fsf@gnu.org> <6b147564-cfea-1824-701f-33495958d304@web.de> <83d0fusvjd.fsf@gnu.org> <83wodynkuo.fsf@gnu.org> 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="149784"; 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 Thu Sep 26 12:47:12 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 1iDRIm-000cse-Hd for ged-emacs-devel@m.gmane.org; Thu, 26 Sep 2019 12:47:12 +0200 Original-Received: from localhost ([::1]:33714 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDRIk-0002Qk-AT for ged-emacs-devel@m.gmane.org; Thu, 26 Sep 2019 06:47:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43063) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iDRI6-0002MR-I9 for emacs-devel@gnu.org; Thu, 26 Sep 2019 06:46:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iDRI5-0000ET-5L for emacs-devel@gnu.org; Thu, 26 Sep 2019 06:46:30 -0400 Original-Received: from mout.web.de ([212.227.15.14]:35623) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iDRI4-0000A2-Nj; Thu, 26 Sep 2019 06:46:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1569494781; bh=jjFf7bcO4jp56v2+R8sX3/KMRe9kdJBb/wuN5RdPzKA=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=cw/xxxAh/Ps5/5Og6KxEY2Lggyv+K8DoW+J1PAyhDoMBUt6TuqcPXPlbzfLWnq5wC 7Ie8RZfOaVh9HuhmERRS7yr6HFtpIp04GEQna1EebVrMkO+9hks1nsAQSNhl3QvgyZ SXSZXyRCyA+CrGmGtocZNEDRlH51Iao/slQszeIY= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from oc3710058320.ibm.com ([94.16.134.55]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MQc7J-1iav8y0whR-00U5jU; Thu, 26 Sep 2019 12:46:21 +0200 In-Reply-To: <83wodynkuo.fsf@gnu.org> Content-Language: en-US X-Provags-ID: V03:K1:Eqhx9Tp1gg6tSRw0VquyT2AlRKoyDSBO1t7aUC3IF0dYditBTua Kie5arHG7alRcYu60HcWFBzUS9MINPXKaihKwcDZafE8KTVJbw8tJDohxjrzr7GCRggFZR1 H29VodnzksFELBDF/hhboqWRBogIb4kY0gtsxxWX68g8d5FebsS978rNk9bhXZwEMlOsSrb K1YDUZ9qJbZRo19gxiEQA== X-UI-Out-Filterresults: notjunk:1;V03:K0:8bE+rJa6OcM=:m/loabw/iHhVDFr5ci5dum SEvJ7giyQA9jlkC1hi6U3IEuSbhy9q4dAcSRzKzdq0a4iGOohD3dW+UWOSoE7Pa75KVVRFttw rhe/rbBV7lg1TW+pn4Xdw52g1G7J8i/PLtrZZdpGURWUWzzIxfkssXZ0ZbjkVbFWlEHXb4Ud/ C4uy8qfajq8RzW8Gb/n99hsz/R6Zmr9+SgaQvhozOFlQLdE1RCXWozg/spgLjCP0X2TO8WNQ0 XkXdFMOSo/A9BAhFKnDfAbnHk5ZEuUAfsht38DleEa2VRGZ8OuWXhepoAlB29ZTPSg+bbyWpr zfqjYNwghL3rcgUy+QxkuNAf9yeOQoeFKOYzua1zdH91s8flaSDZhGoA5bRmVrH3MN0oOzHv5 LXuHKxXnyjKmYWMwYM+rmJhEbl6k1QZooEkyHg7Rgdg590ddoBOwsvkE3qk0pGpT6ybuHBFvC asddLeFimG5FXb3Xqqxnx2HOPWuPHTRKhTj9Ni0R9nehFx7pIifbL3qW6a7ZViypt5gpXtk6G CxgszJwcP8H+iYwpUbiDpUYhboE90PIXNvGwp04FKqaT+XU9gNVXwG4rMuLWWNGZiuTL1CL8M R0Xu+4hWlAztZPSk1rTlDgb+lojiiVQfh7TWp/nZhOfUdE14tKkvzHPPHN7GIA20SvdChiwBW yNM0hCzPktfDmPWhH5F0Xkz2M1e5LPNkRVLePTOYKDKedck6FX/sX4jg92XknOkZ9a0SElguJ 2Oh3uhGn1Q7vTFbNpMidZfNodTeCzUGXtx/2A5rzTQs9W7JqtXJNH84VnxxThjneKKNq++U1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.14 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:240301 Archived-At: On 9/24/19 10:45 AM, Eli Zaretskii wrote: >> How about the following patch? It solved the calc bug for me and I coul= d not find other regressions so far. >> Running make check showed no difference. >> As mentioned, I do not understand all potential effects, so it should b= e given some thoughts and tests. > Thanks, but I'd like to avoid changes in keyboard.c on behalf of input > recording issues, unless such changes are really a must. In this > case, we already have 2 facilities to deal with unwanted repeated > recording of keys: Thanks for the pointers! > . a Lisp program can bind inhibit--record-char to a non-nil value to > avoid recording input events while some Lisp form is executed (you > can see an example of using this in quail.el:quail-start-translatio= n > . a Lisp program can push onto unread-command-events a cons cell of > the form '(no-record . KEY) to avoid recording KEY more than once > (you can see an example of using this in > cua-base.el:cua--prefix-override-replay) > > Can you use one of these facilities to solve the issue in Calc? Note > that you will need to build Emacs from the Git master branch to be > able to use these facilities, they are not available before Emacs 27. I think we are on to something here! The sample in quail.el sounded fitting for me at first, but I could not get it working for the calc case. So I took a closer look at input-methods -- that is what quail is used for, right? I tried some simple tests using the french word for brother (`fr=C3=A8re' = -- the first `e' is with a ``' on top of it -- hopefully my mailer does not screw this up...) using various french input methods: french-prefix, french-postfix and french-azerty -- all in context of keyboard macro recording and playback. The calc case should fit nicely with the -postfix case, I thought. However, on master branch 07367e5b95fe31f3d4e994b42b081075501b9b60, I got this: french-prefix: keys pressed: f r ` e r e , text inserted in buffer: "fr=C3=A8re, fr=C3=A8re,=C2=A0 fr=C3=A8re=C2=A0 " last-kbd-macro: "fr`ere,=C2=A0 " =2D-> Note the two(!) recorded after the `,' though only one was typed in! french-postfix: keys pressed: f r e ` r e , text inserted in buffer: "fr=C3=A8re, fr=C3=A8rre,, fr=C3=A8rre,, " last-kbd-macro: "fre`rre,, " =2D-> Note the double recording of `r' and `,' ! =2D-> This closely resembles the reported symptoms for the calc package! french-azerty: keys pressed (on US keyboard-layout): f r e 7 r e m text inserted in buffer: "fr=C3=A8re, fr=C3=A8re, fr=C3=A8re, " last-kbd-macro: "fr7rem " =2D-> This looks as I would expect it. A quick check on emacs-24.5 showed that all cases were handled correctly back then. So, some of the new ways of handling this are not covering all corner cases, and work wrong with -postfix and calc prefix handling. Does this give any clues what still needs to be fixed? I am lost in the complexity of how the code should handle this... N.B. For what it's worth, I am physically using a german keyboard with a US layout in GNOME. Probably this should not matter and be equivalent to a US keyboard... Thanks!