From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Newsgroups: gmane.emacs.bugs Subject: bug#5852: 23.1; Incorrect references in ses-mode Date: Sun, 25 Jul 2021 19:27:21 +0200 Message-ID: References: <845zfpi242.fsf@gmail.com> <871r7vrbez.fsf@gnus.org> <8735s2zydl.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14066"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 5852@debbugs.gnu.org, Vincent =?UTF-8?Q?Bela=C3=AFche?= , Stefan Kangas , =?UTF-8?Q?G=C3=B6ran?= Uddeborg To: Lars Ingebrigtsen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 25 19:28:10 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7hv7-0003Q1-98 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 19:28:09 +0200 Original-Received: from localhost ([::1]:32862 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7hv5-0001wK-Sz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 13:28:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7hv0-0001wB-Fx for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 13:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37773) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7hv0-0003zo-8n for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 13:28:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7huz-0001wN-Vc for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 13:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 17:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5852 X-GNU-PR-Package: emacs Original-Received: via spool by 5852-submit@debbugs.gnu.org id=B5852.16272340607431 (code B ref 5852); Sun, 25 Jul 2021 17:28:01 +0000 Original-Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 17:27:40 +0000 Original-Received: from localhost ([127.0.0.1]:49319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7hue-0001vm-EK for submit@debbugs.gnu.org; Sun, 25 Jul 2021 13:27:40 -0400 Original-Received: from mail-pl1-f171.google.com ([209.85.214.171]:36850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7huc-0001vY-QW for 5852@debbugs.gnu.org; Sun, 25 Jul 2021 13:27:39 -0400 Original-Received: by mail-pl1-f171.google.com with SMTP id i10so5780097pla.3 for <5852@debbugs.gnu.org>; Sun, 25 Jul 2021 10:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1ckkBBG1DgYjhQKZ7ebJrQfX01GcFmbVhtDCmpPug2E=; b=GGlO3Ce3e/dU7rFUdluNfq9Dabma+8XQsl86xyOt1tNdz1NfFFq1NtGdMk/UIr9pc7 q2l5JYgsb6Myy/+JgHhQunqUaNt3yD3NEhI11f4bTKsx1N/9qKxFyXvkBd/oSWKRDgNQ x5O/E75zEkPaIHvMTHZOQT0kDLxtZuKSjYfPu8IBwySxw1Ubhpmu7dGj+7QrXFNfcmMr eNP7yNBnmxmkFXdIg4B8wPlJdrzRnTh6xhCPj+kjexrQaYHQFPUpUpkFGfsGcHeBD4wY ln2afqYNIaNA6p026zS4QIWX2N5OE0m+uxoCZPp2OnLxlxGAwLE0vNWgt6gzLL4+66Sq rlGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1ckkBBG1DgYjhQKZ7ebJrQfX01GcFmbVhtDCmpPug2E=; b=X5me9edxFeuDchrM/Xf5mjU7dVDTFZb/rOtwD4455AqnHQ5MuZvTEPKYtNApzyysYs EpcsgS0KJ/Eea6x0IZdJTUDWlgCzvTshpkHQf6cQrmKdg6GVmJ5X1maS6D6/lrZ6Gott lQxNX4wHibNl//MqEO1Dz6e9WofLHaw04XMOw7F/V7l5XtG4a3qj4Xqrx/VWJ7baD/Ox LEBc7tNaVPc1NjmK/vHqsOzGBD8mP1Q7WJ7A1/jCKnfxnrpvtEIAyR1veKi7i+IEj6yC GXOOnPLoQ8ZCGSaDv7zBKdBrKG99Eh1wFJ4fievKePaHRZxzdEICUH3T1wbfvATMNtY5 E6UA== X-Gm-Message-State: AOAM531EWBizYRAXyN7BX/yCwXajaWBnXpLQkGfjKdfOD+I17abpepO4 5GuijppqVuKNxM8bNeZq4elIVfO2W526NGIRne4= X-Google-Smtp-Source: ABdhPJx+vrdhsvLHe5t/mrnSsXP75rwP2Sc0TgDHDiQnOWRlULGB2VEpglebLekD7Yja2w4vaCYZFdk+Cj77J+kajRA= X-Received: by 2002:a05:6a00:cc1:b029:32b:8465:9b59 with SMTP id b1-20020a056a000cc1b029032b84659b59mr14237027pfv.66.1627234052720; Sun, 25 Jul 2021 10:27:32 -0700 (PDT) In-Reply-To: <8735s2zydl.fsf@gnus.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210725 Archived-At: Dear Stefan (Monnier), I am calling to your deep knowledge of Emacs internals. We have a bug which seems to be real time dependant, which makes me think that there is some race condition somewhere. I think it can't be any race between the command and the post-command hook, because they are run sequentially in the command loop : post-command hook of command N does not overlap command N+1, please confirm =E2=80=A6 Now, I have another speculation : SES gets the current cell from the cursor position by reading some buffer text property 'cursor-intangible. I speculate that the radix of the bug is that when a command sets this cursor property, then the buffer is actually modified in the backgroun, and the change may not be yet in effect when the next command runs. Could you confirm / infirm this speculation. One more thing is the following : in SES the cursor-intangile property is the symbol corresponding to the cell object (which under the hood is a vector), not the cell object itself. This means that the property has to change when there are row/column insertion / deletion, which also inherently change the buffer, because of symbol relocation. I think this might be some bad design choice, and pointing directly at the cell object would have saved some troubles (and probably would also create a bunch of other problems, so do not take my statement for sure). Of course the idea of using symbols makes sense as they make it easy for the formulas, and as such some sort of relocation is unavoidable. On the other hand, the cell index (say (0 0) for A1, (0 1) for B1, (1 0) for A2, etc=E2=80=A6), is retrieved from a property of the cell symbol, so things are a bit intricate =E2=80=A6 Vincent. Le dim. 25 juil. 2021 =C3=A0 08:44, Lars Ingebrigtsen a = =C3=A9crit : > > Vincent Bela=C3=AFche writes: > > > Just to say that I did the test manually on my home PC a couple of > > time, and I could not reproduce the problem. > > That is quite annoying, yesterday I reproduced it on my office PC once. > > Yeah, timing dependent bugs are really annoying to try to debug.. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no