GNU bug report logs - #5852
23.1; Incorrect references in ses-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Göran Uddeborg <goeran@HIDDEN>; dated Wed, 7 Apr 2010 16:26:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 2 Aug 2021 21:02:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 02 17:02:34 2021
Received: from localhost ([127.0.0.1]:39373 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mAf50-0004Gy-Fx
	for submit <at> debbugs.gnu.org; Mon, 02 Aug 2021 17:02:34 -0400
Received: from mail-pj1-f51.google.com ([209.85.216.51]:44845)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1mAf4z-0004Gf-4r
 for 5852 <at> debbugs.gnu.org; Mon, 02 Aug 2021 17:02:33 -0400
Received: by mail-pj1-f51.google.com with SMTP id
 e2-20020a17090a4a02b029016f3020d867so1791203pjh.3
 for <5852 <at> debbugs.gnu.org>; Mon, 02 Aug 2021 14:02:33 -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; bh=Oxku49aSwqTjBGuv53OuEAXIphYLDTKTR8cLzzKM14o=;
 b=HoB68/AvJjJHtCKCbrm+yE4a2SIk+c6ohXiK0Om04U0qm5vMclCgI22DNQ9MZYeT3+
 hJz2ocClynZtvwgPObzc++3yiPxY/Voq2Qgc9VaoOpAwAunWQZyjOqotvZIVKKLE2RoF
 P9erbD9uZ/9YUlc/rGAkgZdAU+73dNpes5m/hjmVow1zady358KEO9r+xlccaRuulTKt
 SdFxAx2AD9ZMsXAXWRF0jvPjpAkl/ExOoNRMicb0jZXS4D515u6sHcaG77eoYkQct1J3
 c2J/Lz71W5z5+E2AhUR+8qL4RwMA7Bh+Nx+lLulDcJAkUwTK6kVhWrFfei/Zd46ui0Fb
 +ZnQ==
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;
 bh=Oxku49aSwqTjBGuv53OuEAXIphYLDTKTR8cLzzKM14o=;
 b=sRFYoEpL9RSz4Ax4RO2bkc/YHKogDrs0GlkzmQZprS7G0LQsorQRB7/9XFB4YYdo2N
 3lHZEdnEinbpLaki4pW0eZ14OT6yPRIpn7CIzymDbn+dXZ6CrzdXoU+0gOlJ+Tm+GlWG
 DxodnI7Ey5uhRu4sZzolWHJufGSG71gYjEUICa/JournmQWnHhVOzahdOnVRo3U9nAmc
 /5OyHS876Xu9EFYz/xHqACjyu/lsyiqjMrk32QojibuxlzyQj61v9LqLC6hDt7P77TvL
 gcWYHK4CRc/uVG6aHuhwG41sH/OjIU+ZkMPdLjO3aOau/yVOc9caPH80koz3j7lvGynp
 6O6A==
X-Gm-Message-State: AOAM530PsE2B24PqzYGI35JDnRTp1IVRp7ZsG7gUMym/P5vwuBYft1I7
 0/JOUIRhZJ4b3YtpBMV34idv2g95z3JTuqlfhTM=
X-Google-Smtp-Source: ABdhPJz+XGtvVBzSKQsjATgCjdKK9//kzsDdpawGUVfbAYShaqP2c1rW+fji0TJAG/uw3nx2Z+g2a5s2FvqNq8lWZRQ=
X-Received: by 2002:a05:6a00:cc1:b029:32b:8465:9b59 with SMTP id
 b1-20020a056a000cc1b029032b84659b59mr18688529pfv.66.1627938147335; Mon, 02
 Aug 2021 14:02:27 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
 <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
 <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
 <CAPAOBV8tRBmOW1WKFzHPTaB=jS3aB=3AJVYCfBm64VWt7=jrBQ@HIDDEN>
 <8735s2zydl.fsf@HIDDEN>
 <CAPAOBV-O=Ev5=FBJxpOjQVOW5Jf9aVwpUyQ27S=39rsH0cw7bw@HIDDEN>
 <jwv8s1nilza.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwv8s1nilza.fsf-monnier+emacs@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Mon, 2 Aug 2021 23:02:16 +0200
Message-ID: <CAPAOBV9wYvZJ0mCA0XLhvc7S+QR_mDFwMORr59oTbFvEMHj6bA@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: Stefan Kangas <stefan@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>,
 5852 <at> debbugs.gnu.org, =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Thank you for the feedback, I am afraid I will need to work again at
it, in order to create a systematic bug reporduction.

[...]

> > 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).
>
> Indeed, pointing directly at the cell's vector would probably be better
> (at least from the point of view of insertions/deletions but), but if
> so, each cell would probably need to contain its own name (or its
> coordinates).
>
>
>         Stefan
>
What you wrote confirms my gut feeling. I came to this conclusion as I
was thinking how to implement functions such as row transposition.

FYI, AFAIK, the cell already contains the corresponding symbol, and the
(row, col) coordinates can be derived from the symbol through the
ses-cell symbol property.
  V.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 30 Jul 2021 21:01:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jul 30 17:01:41 2021
Received: from localhost ([127.0.0.1]:32835 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m9ZdV-0001B9-G2
	for submit <at> debbugs.gnu.org; Fri, 30 Jul 2021 17:01:41 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22703)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1m9ZdT-0001Aw-MQ
 for 5852 <at> debbugs.gnu.org; Fri, 30 Jul 2021 17:01:40 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 93D8F100221;
 Fri, 30 Jul 2021 17:01:33 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id E13941001E8;
 Fri, 30 Jul 2021 17:01:30 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1627678890;
 bh=V3JrspgM5evauSTBI+GfTQxBmP2Gvnsy8FNwfouJHxA=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=jGoOPDjWiMuSBhA3qBcF+e8FtxXzwHH2Qfd9TceOheEeHvqXnoAxtCKMT/H8O+b3G
 3zno+0s/nsEOpYbJNo0fjIRJuwc0gwpTgoSCikuhHcpVXv3y89EuhnaqkXWOunLW8c
 IbtliyV0M/LHTT5zJbmL0I+7xXEXxwXs1zM/jogGEIUEYBYCCEgYl17Ym2I3CHLUQc
 8b0bVTEfxsFUNMC8VAVGWg62TE7BPmjv+ng6TmGsCjhv9bwW+8MnXcYkquPwOEkMRK
 kAN3B2vKJnukUBOa2z+qrg3ZTpMDAFCgWAK/jI38qFDFAnrQuX8fbSR8fsOhdpueE3
 CgwpJ3AbyirJw==
Received: from alfajor (unknown [216.154.29.138])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 93924120208;
 Fri, 30 Jul 2021 17:01:30 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Vincent =?windows-1252?Q?Bela=EFche?= <vincent.belaiche@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
Message-ID: <jwv8s1nilza.fsf-monnier+emacs@HIDDEN>
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
 <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
 <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
 <CAPAOBV8tRBmOW1WKFzHPTaB=jS3aB=3AJVYCfBm64VWt7=jrBQ@HIDDEN>
 <8735s2zydl.fsf@HIDDEN>
 <CAPAOBV-O=Ev5=FBJxpOjQVOW5Jf9aVwpUyQ27S=39rsH0cw7bw@HIDDEN>
Date: Fri, 30 Jul 2021 17:01:29 -0400
In-Reply-To: <CAPAOBV-O=Ev5=FBJxpOjQVOW5Jf9aVwpUyQ27S=39rsH0cw7bw@HIDDEN>
 ("Vincent =?windows-1252?Q?Bela=EFche=22's?= message of "Sun, 25 Jul 2021
 19:27:21 +0200")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.093 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5852
Cc: Stefan Kangas <stefan@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>,
 Vincent =?windows-1252?Q?Bela=EFche?= <vincentbelaiche@HIDDEN>,
 5852 <at> debbugs.gnu.org, =?windows-1252?Q?G=F6ran?= Uddeborg <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> are run sequentially in the command loop : post-command hook of
> command N does not overlap command N+1, please confirm =E2=80=A6

That's usually true, yes.  There can be exceptions when command N itself
can run commands during execution, via a recursive command-loop
(e.g. query&replace uses that, or minibuffer interactions).

> 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.

Hmm... no that doesn't sound right.  Emacs does try to do a few things
in the background, but it's quite limited (things like `font-lock`,
basically).  When a property like `cursor-intangible` is set, it
happens immediately.

> 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).

Indeed, pointing directly at the cell's vector would probably be better
(at least from the point of view of insertions/deletions but), but if
so, each cell would probably need to contain its own name (or its
coordinates).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 17:27:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 13:27:40 2021
Received: from localhost ([127.0.0.1]:49319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7hue-0001vm-EK
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 13:27:40 -0400
Received: from mail-pl1-f171.google.com ([209.85.214.171]:36850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7huc-0001vY-QW
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 13:27:39 -0400
Received: by mail-pl1-f171.google.com with SMTP id i10so5780097pla.3
 for <5852 <at> 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)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
 <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
 <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
 <CAPAOBV8tRBmOW1WKFzHPTaB=jS3aB=3AJVYCfBm64VWt7=jrBQ@HIDDEN>
 <8735s2zydl.fsf@HIDDEN>
In-Reply-To: <8735s2zydl.fsf@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 19:27:21 +0200
Message-ID: <CAPAOBV-O=Ev5=FBJxpOjQVOW5Jf9aVwpUyQ27S=39rsH0cw7bw@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 5852 <at> debbugs.gnu.org, =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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 <larsi@HIDDEN> a =
=C3=A9crit :
>
> Vincent Bela=C3=AFche <vincent.belaiche@HIDDEN> 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




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 06:44:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 02:44:20 2021
Received: from localhost ([127.0.0.1]:47427 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7Xs3-0008M2-V1
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:44:20 -0400
Received: from quimby.gnus.org ([95.216.78.240]:41504)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m7Xs2-0008Lp-Pf
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:44:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=BVwk9I59YfYQ+hfqMt+d4uO6ad67XrwLURkxlrExL4s=; b=rvuaQYvYh8BukK76mR7rX3y33m
 43uU11hvvXd5JHzI0s0MACzO+cxblJmr8jW53IGwcOPwc4GsY4h2WZH54w8RMPTwZV9mMqnyWpBpR
 mEbTt9EwE+3zDm6DhFjqN89ehSbjhZ03zPAEackhdkOe3U+M19xy6dd+/+2hZ9Gb4E40=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m7Xrr-0006EM-EB; Sun, 25 Jul 2021 08:44:09 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Vincent =?utf-8?Q?Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
 <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
 <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
 <CAPAOBV8tRBmOW1WKFzHPTaB=jS3aB=3AJVYCfBm64VWt7=jrBQ@HIDDEN>
X-Now-Playing: Prince's _Sign 'O' the Times (2)_: "Adore"
Date: Sun, 25 Jul 2021 08:44:06 +0200
In-Reply-To: <CAPAOBV8tRBmOW1WKFzHPTaB=jS3aB=3AJVYCfBm64VWt7=jrBQ@HIDDEN>
 ("Vincent =?utf-8?Q?Bela=C3=AFche=22's?= message of "Sun, 25 Jul 2021
 08:38:26 +0200")
Message-ID: <8735s2zydl.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Vincent Belaïche <vincent.belaiche@HIDDEN> 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. 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5852
Cc: Stefan Kangas <stefan@HIDDEN>,
 Vincent =?utf-8?Q?Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 5852 <at> debbugs.gnu.org, =?utf-8?Q?G=C3=B6ran?= Uddeborg <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Vincent Bela=C3=AFche <vincent.belaiche@HIDDEN> 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..

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 06:38:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 02:38:50 2021
Received: from localhost ([127.0.0.1]:47403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7Xmj-0008C2-Rz
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:38:50 -0400
Received: from mail-pj1-f45.google.com ([209.85.216.45]:40932)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7Xmd-0008BW-Np
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:38:45 -0400
Received: by mail-pj1-f45.google.com with SMTP id
 u9-20020a17090a1f09b029017554809f35so15058760pja.5
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 23:38:43 -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=4WSwi6bdmCkuPSMTXW+VCfDD8pv8bvH5rWdXWFGWgso=;
 b=ntj2IxztIohFR4muK/a/9552fsJZdy3cfWWhk/CPyA2HkD7N441UPFT8kNcAdUQHz9
 ExfPSur64ntn5WG2ljZ+e/zOhZcllgr+eX9MjOXLpo1ybdboUb/O3TCpaoGXdf9Ec3EN
 Lqe5XoRBFHWTMcMDRbE3R1zsQkYS2eNVXU4cHycvCIMH+vsHk/xDADJ15WuuKd8EIuTA
 qf8co9oVqxc4K6m9N/kvySfUHTKzRsP6G24Stuq6X5JfGnXhQUR3V4/7j8G1TtB8SNvl
 0EVwzHeeAWkNtU5scNJTWZc4dKeaJBXqiW41tCzeab+fI4YPRKtA6lfXAqnvSmlJVQDy
 Zb+w==
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=4WSwi6bdmCkuPSMTXW+VCfDD8pv8bvH5rWdXWFGWgso=;
 b=HqKQgvAmqAinW5DofGhXVVUBBrEZz46ylwNCUJL9ujAtaX5s2dCuTb004sGZh5aN8n
 bThjaKs7RRJXb0HLZ5tDDdeQgd2wrq/UitP2QBWBKPWdoEN0Jqk+V0RRtU14g1dAZtbK
 2Xn9bBJhLJGtj+mL2R9UUyDoDMvxn8G3V4kcQFTY8Yys1odj7hYSLU9TkIEKaEjbrkUO
 uhOi5CGrx7F/8cztubBA3Mj8zqT3JII53CAhK4KcwZkGltEg8vJKTMuvChsAZkET0AuQ
 xYuJ70Emug3ZdAUx29ky8IvXn6Rrkl+nf2yBkHcGI8lccWZlYFM59ZyI6gke5lK/llaQ
 RN0Q==
X-Gm-Message-State: AOAM530k53k3Ilz21X8THpwys8AYxC+x3YEofmVjQk5rh5IuNXSyF6uj
 i3YjQz+rVfmg/CiXSZN20ni1sywqhU7P9XyTa6Q=
X-Google-Smtp-Source: ABdhPJwW2fSKDZ7/649C4fQU4NmMcjr82XF8yPi9IVcyhRw+gcaCUyONHR/NurKqO5lUsNRhCh92b8ZWRqxMZ49A7H0=
X-Received: by 2002:aa7:87cd:0:b029:32e:7954:2872 with SMTP id
 i13-20020aa787cd0000b029032e79542872mr12297201pfo.0.1627195117851; Sat, 24
 Jul 2021 23:38:37 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
 <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
 <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
In-Reply-To: <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 08:38:26 +0200
Message-ID: <CAPAOBV8tRBmOW1WKFzHPTaB=jS3aB=3AJVYCfBm64VWt7=jrBQ@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

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.
  V.

Le dim. 25 juil. 2021 =C3=A0 08:32, Vincent Bela=C3=AFche
<vincent.belaiche@HIDDEN> a =C3=A9crit :
>
> By doing the test manually on my home PC I found some interesting
> difference. After
>
> 2 RET
>
> on my home PC the cursor goes to the end of buffer narrowed region,
> while on my office PC it goes to B2. This means that the TAB that
> follows won't the same effect. On my home PC it creates a 3rd row,
> while on my office PC it creates the 3rd column.
> I found the reason why so : my home PC had some customization for the
> ses-after-entry-functions. After erasing customization I had the same
> behaviour =E2=80=A6
> Anyway, that does not affect the bug-5852 test function as it only
> uses ses-jump for motion.
>   V.
>
> Le dim. 25 juil. 2021 =C3=A0 08:18, Vincent Bela=C3=AFche
> <vincent.belaiche@HIDDEN> a =C3=A9crit :
> >
> > The bug-5852 test function does not reproduce the bug on my home PC eit=
her =E2=80=A6
> >   V.
> >
> > Le dim. 25 juil. 2021 =C3=A0 08:17, Vincent Bela=C3=AFche
> > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > >
> > > The same test function, but with comments :
> > >
> > >
> > > (defun bug-5852 ();;---
> > >   "Check no irrelevant reference is created when a row is inserted an=
d
> > > a formula is yanked"
> > >   (interactive);;---
> > >   (let ((ses-initial-size '(3 . 3))); size before last row insertion,
> > > due to all preceding TAB & C-o
> > >   (with-temp-buffer
> > >     (ses-mode)
> > >     (dolist (val '(
> > >                    (ses-edit-cell 0 1 1) ; 1 RET
> > >                    (ses-edit-cell 1 0 2) ; 2 RET
> > >                    (ses-edit-cell 1 1 (+ B1 A2)) ; ( + SPC B1 SPC A2 =
RET
> > >                    (ses-edit-cell 2 0 3) ; 3 RET
> > >                    (ses-edit-cell 2 1 (+ B2 A3)) ; ( + SPC B2 SPC A3 =
RET
> > >                    (ses-jump A3) ; C-n
> > >                    (ses-insert-row 1) ; C-o
> > >                    (ses-edit-cell 2 0 4) ; 4 RET
> > >                    (ses-jump B2) ; C-p
> > >                    ))
> > >       (apply 'funcall-interactively  val)
> > >       (ses-command-hook))
> > >   (let ((beg (point-marker))); C-SPC
> > >     (ses-jump 'C2) ; C-f
> > >     (copy-region-as-kill beg (point) nil); M-w
> > >     (set-marker beg nil))
> > >   (dolist (val '(
> > >                  (ses-jump B3); C-n C-b
> > >                  (yank) ; C-y
> > >                  (ses-jump B4); C-n
> > >                  (yank); C-y
> > >                  ))
> > >     (apply 'funcall-interactively  val)
> > >     (ses-command-hook))
> > >   (ses-repair-cell-reference-all)
> > >   )))
> > >
> > > Le dim. 25 juil. 2021 =C3=A0 07:56, Vincent Bela=C3=AFche
> > > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > > >
> > > > On more significant difference between the function bug-5852 and th=
e
> > > > example is the the initial size is (3 . 3) instead of (1. 1). This =
is
> > > > because I speculated that only the last row insertion (C-o) plays a
> > > > role.
> > > >
> > > >   V.
> > > >
> > > > Le dim. 25 juil. 2021 =C3=A0 07:48, Vincent Bela=C3=AFche
> > > > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > > > >
> > > > > Just to add something : reading again SES code, and (info "(elisp=
)
> > > > > Command Overview") I am a bit skeptical about the explanation in =
my
> > > > > previous email.
> > > > > It seems that only key strokes are queue, but command execution a=
nd
> > > > > post command hook are in sequence, so not done concurrently.
> > > > > I wrote this function to try to reproduce the bug, and on my offi=
ce PC
> > > > > it does not reproduce it:
> > > > >
> > > > > (defun bug-5852 ();;---
> > > > >   "Check no irrelevant reference is created when a row is inserte=
d and
> > > > > a formula is yanked"
> > > > >   (interactive);;---
> > > > >   (let ((ses-initial-size '(3 . 3)))
> > > > >   (with-temp-buffer
> > > > >     (ses-mode)
> > > > >     (dolist (val '(
> > > > >                    (ses-edit-cell 0 1 1)
> > > > >                    (ses-edit-cell 1 0 2)
> > > > >                    (ses-edit-cell 1 1 (+ B1 A2))
> > > > >                    (ses-edit-cell 2 0 3)
> > > > >                    (ses-edit-cell 2 1 (+ B2 A3))
> > > > >                    (ses-jump A3)
> > > > >                    (ses-insert-row 1)
> > > > >                    (ses-edit-cell 2 0 4)
> > > > >                    (ses-jump B2)
> > > > >                    ))
> > > > >       (apply 'funcall-interactively  val)
> > > > >       (ses-command-hook))
> > > > >     (let ((beg (point-marker)))
> > > > >       (ses-jump 'C2) ; C-n
> > > > >       (copy-region-as-kill beg (point) nil)
> > > > >       (set-marker beg nil))
> > > > >     (dolist (val '(
> > > > >                    (ses-jump B3)
> > > > >                    (yank)
> > > > >                    (ses-jump B4)
> > > > >                    (yank)
> > > > >                    ))
> > > > >       (apply 'funcall-interactively  val)
> > > > >       (ses-command-hook))
> > > > >     (ses-repair-cell-reference-all)
> > > > >     )))
> > > > >
> > > > > Please note that the main difference with the provided example is=
 that
> > > > > motion is done with ses-jump, and not with motion commands. Also =
the
> > > > > save to keyring is not done interatively.
> > > > >    V.
> > > > >
> > > > > Le sam. 24 juil. 2021 =C3=A0 23:46, Vincent Bela=C3=AFche
> > > > > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > > > > >
> > > > > > Hello Lars,
> > > > > >
> > > > > > Sorry for not making any feedback for so long, actually I was j=
ust
> > > > > > distracted by some other business, and I somewhat had forgotten=
 about
> > > > > > it.
> > > > > >
> > > > > > I suspect a race condition between the post command hook and th=
e next
> > > > > > command. That is to say when one yanks the fomula (the first ya=
nk),
> > > > > > one relocates the reference but for this one uses current refer=
ences
> > > > > > that have not yet been relocated because the previous post-comm=
and
> > > > > > hook execution is not yet over.
> > > > > >
> > > > > > The bug does not show every time I do the experiment. I tried t=
his
> > > > > > morning with my office PC which is a fast machine, and it prove=
d out
> > > > > > quite hard to reproduce, even when I launched some big C progra=
m
> > > > > > compilation in parallel to eat the mips.
> > > > > >
> > > > > > Next week I will do some experiment with my home PC which is qu=
ite
> > > > > > quite slower, and I make some feedback. Unfortunateless both ma=
chine
> > > > > > do not have the same emacs version, but anyway all changes in S=
ES
> > > > > > since the version on my home PC are not related to this bug, so
> > > > > > nevertheless that will be a good indication whether my guess is
> > > > > > correct.
> > > > > >
> > > > > >   V.
> > > > > >
> > > > > > Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@gn=
us.org> a =C3=A9crit :
> > > > > > >
> > > > > > > Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
> > > > > > >
> > > > > > > > I will investigate why and feed back once I have a better i=
dea of what
> > > > > > > > is happening.
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > this was a year ago.  Did you make any progress on this issue=
?
> > > > > > >
> > > > > > > --
> > > > > > > (domestic pets only, the antidote for overdose, milk.)
> > > > > > >    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 06:32:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 02:32:33 2021
Received: from localhost ([127.0.0.1]:47391 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7Xgf-00082z-04
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:32:33 -0400
Received: from mail-pl1-f169.google.com ([209.85.214.169]:42877)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7XgZ-00082i-Uh
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:32:31 -0400
Received: by mail-pl1-f169.google.com with SMTP id i1so7938679plr.9
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 23:32:27 -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=kua4C2lfrYBbBYQtiymrsxKSFoLBD3Qk7j53aPWZDYU=;
 b=Qg78cC8oI3KPOPofCMfNsxgv4KvLIG7jMhu1qMBy5YtAe8jXXaU/DeUotMVJiXrcVc
 T/yC3SIkF9JlH5QBILS81ZHxSYr4ZSVTye1W+3EJtXC+WDsS5L/H9jh1isi8J2+miCnJ
 pabBgih+bTTcCyHSWkrcrHVJJ2eRLhtrN6ZegegPbYYWxEMDbVdU/K/u4YOcOvjmux28
 S1M6sz/hJ6GHPRi3DSQ+EN27cHIbV8HUEBEoAgwECQa6YpgIfvvWECZRBa699Nw/kaHJ
 CPJy2NTefXPky7FGJHB/TDgHbcYI3iNDGY1OM2+T8yOSf+J59jrBwlNIaYOeXnwd3/A/
 T3fA==
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=kua4C2lfrYBbBYQtiymrsxKSFoLBD3Qk7j53aPWZDYU=;
 b=SjQbtgvvYuXFt5opCfa6dSjOV/GGT1dsCirEHotIQLeTtAl5kyjgFZmUdkH03brXss
 ZFgtPru0DSJtm9c4/XE0qQI7x8bt78md7oBusMw86uHTxYMhx9OmwPRETTvifuEV0ucn
 MR2Ks6TUy1FTvHudtcpZweca61gAEz/N9KtD/tG15YyQ/430V9GmHbIqH6TpS28PE0Ok
 XriybPa/SdXaB5Hx9K2EYYeRTNujd8KbIC+ufzax+0OmdRDbYTkShqll35AQJLgEMjET
 3Q/SmL7dD8WJD+gbnaM3H4kdHdfiASqKDkjTUMqq7PrsOfcwMHbHFHBmU7vhbr6NovK9
 PAxw==
X-Gm-Message-State: AOAM532cZdoZYuoBVW2SUwqe+SS42qe+aac4yIIAOTe1YTTyd/gBAjK0
 ppstGyEe4od/aHrR1HXeB430G52UoRHMenE5SJ0=
X-Google-Smtp-Source: ABdhPJy1P0DVDuTY6JL8fVLxwjjmHUgUGSLJdbeK9j3fuVAFbdlSENFlcwSsUO8JPUtn2c4/S6Pd8pxX1c1S9IfmDT0=
X-Received: by 2002:a17:90a:ce02:: with SMTP id
 f2mr20740303pju.232.1627194742057; 
 Sat, 24 Jul 2021 23:32:22 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
 <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
In-Reply-To: <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 08:32:10 +0200
Message-ID: <CAPAOBV-VNa4RXG+igej20x=ykrh5xMfhLs2oAdj=4qvkuT9axQ@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

By doing the test manually on my home PC I found some interesting
difference. After

2 RET

on my home PC the cursor goes to the end of buffer narrowed region,
while on my office PC it goes to B2. This means that the TAB that
follows won't the same effect. On my home PC it creates a 3rd row,
while on my office PC it creates the 3rd column.
I found the reason why so : my home PC had some customization for the
ses-after-entry-functions. After erasing customization I had the same
behaviour =E2=80=A6
Anyway, that does not affect the bug-5852 test function as it only
uses ses-jump for motion.
  V.

Le dim. 25 juil. 2021 =C3=A0 08:18, Vincent Bela=C3=AFche
<vincent.belaiche@HIDDEN> a =C3=A9crit :
>
> The bug-5852 test function does not reproduce the bug on my home PC eithe=
r =E2=80=A6
>   V.
>
> Le dim. 25 juil. 2021 =C3=A0 08:17, Vincent Bela=C3=AFche
> <vincent.belaiche@HIDDEN> a =C3=A9crit :
> >
> > The same test function, but with comments :
> >
> >
> > (defun bug-5852 ();;---
> >   "Check no irrelevant reference is created when a row is inserted and
> > a formula is yanked"
> >   (interactive);;---
> >   (let ((ses-initial-size '(3 . 3))); size before last row insertion,
> > due to all preceding TAB & C-o
> >   (with-temp-buffer
> >     (ses-mode)
> >     (dolist (val '(
> >                    (ses-edit-cell 0 1 1) ; 1 RET
> >                    (ses-edit-cell 1 0 2) ; 2 RET
> >                    (ses-edit-cell 1 1 (+ B1 A2)) ; ( + SPC B1 SPC A2 RE=
T
> >                    (ses-edit-cell 2 0 3) ; 3 RET
> >                    (ses-edit-cell 2 1 (+ B2 A3)) ; ( + SPC B2 SPC A3 RE=
T
> >                    (ses-jump A3) ; C-n
> >                    (ses-insert-row 1) ; C-o
> >                    (ses-edit-cell 2 0 4) ; 4 RET
> >                    (ses-jump B2) ; C-p
> >                    ))
> >       (apply 'funcall-interactively  val)
> >       (ses-command-hook))
> >   (let ((beg (point-marker))); C-SPC
> >     (ses-jump 'C2) ; C-f
> >     (copy-region-as-kill beg (point) nil); M-w
> >     (set-marker beg nil))
> >   (dolist (val '(
> >                  (ses-jump B3); C-n C-b
> >                  (yank) ; C-y
> >                  (ses-jump B4); C-n
> >                  (yank); C-y
> >                  ))
> >     (apply 'funcall-interactively  val)
> >     (ses-command-hook))
> >   (ses-repair-cell-reference-all)
> >   )))
> >
> > Le dim. 25 juil. 2021 =C3=A0 07:56, Vincent Bela=C3=AFche
> > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > >
> > > On more significant difference between the function bug-5852 and the
> > > example is the the initial size is (3 . 3) instead of (1. 1). This is
> > > because I speculated that only the last row insertion (C-o) plays a
> > > role.
> > >
> > >   V.
> > >
> > > Le dim. 25 juil. 2021 =C3=A0 07:48, Vincent Bela=C3=AFche
> > > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > > >
> > > > Just to add something : reading again SES code, and (info "(elisp)
> > > > Command Overview") I am a bit skeptical about the explanation in my
> > > > previous email.
> > > > It seems that only key strokes are queue, but command execution and
> > > > post command hook are in sequence, so not done concurrently.
> > > > I wrote this function to try to reproduce the bug, and on my office=
 PC
> > > > it does not reproduce it:
> > > >
> > > > (defun bug-5852 ();;---
> > > >   "Check no irrelevant reference is created when a row is inserted =
and
> > > > a formula is yanked"
> > > >   (interactive);;---
> > > >   (let ((ses-initial-size '(3 . 3)))
> > > >   (with-temp-buffer
> > > >     (ses-mode)
> > > >     (dolist (val '(
> > > >                    (ses-edit-cell 0 1 1)
> > > >                    (ses-edit-cell 1 0 2)
> > > >                    (ses-edit-cell 1 1 (+ B1 A2))
> > > >                    (ses-edit-cell 2 0 3)
> > > >                    (ses-edit-cell 2 1 (+ B2 A3))
> > > >                    (ses-jump A3)
> > > >                    (ses-insert-row 1)
> > > >                    (ses-edit-cell 2 0 4)
> > > >                    (ses-jump B2)
> > > >                    ))
> > > >       (apply 'funcall-interactively  val)
> > > >       (ses-command-hook))
> > > >     (let ((beg (point-marker)))
> > > >       (ses-jump 'C2) ; C-n
> > > >       (copy-region-as-kill beg (point) nil)
> > > >       (set-marker beg nil))
> > > >     (dolist (val '(
> > > >                    (ses-jump B3)
> > > >                    (yank)
> > > >                    (ses-jump B4)
> > > >                    (yank)
> > > >                    ))
> > > >       (apply 'funcall-interactively  val)
> > > >       (ses-command-hook))
> > > >     (ses-repair-cell-reference-all)
> > > >     )))
> > > >
> > > > Please note that the main difference with the provided example is t=
hat
> > > > motion is done with ses-jump, and not with motion commands. Also th=
e
> > > > save to keyring is not done interatively.
> > > >    V.
> > > >
> > > > Le sam. 24 juil. 2021 =C3=A0 23:46, Vincent Bela=C3=AFche
> > > > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > > > >
> > > > > Hello Lars,
> > > > >
> > > > > Sorry for not making any feedback for so long, actually I was jus=
t
> > > > > distracted by some other business, and I somewhat had forgotten a=
bout
> > > > > it.
> > > > >
> > > > > I suspect a race condition between the post command hook and the =
next
> > > > > command. That is to say when one yanks the fomula (the first yank=
),
> > > > > one relocates the reference but for this one uses current referen=
ces
> > > > > that have not yet been relocated because the previous post-comman=
d
> > > > > hook execution is not yet over.
> > > > >
> > > > > The bug does not show every time I do the experiment. I tried thi=
s
> > > > > morning with my office PC which is a fast machine, and it proved =
out
> > > > > quite hard to reproduce, even when I launched some big C program
> > > > > compilation in parallel to eat the mips.
> > > > >
> > > > > Next week I will do some experiment with my home PC which is quit=
e
> > > > > quite slower, and I make some feedback. Unfortunateless both mach=
ine
> > > > > do not have the same emacs version, but anyway all changes in SES
> > > > > since the version on my home PC are not related to this bug, so
> > > > > nevertheless that will be a good indication whether my guess is
> > > > > correct.
> > > > >
> > > > >   V.
> > > > >
> > > > > Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@gnus=
.org> a =C3=A9crit :
> > > > > >
> > > > > > Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
> > > > > >
> > > > > > > I will investigate why and feed back once I have a better ide=
a of what
> > > > > > > is happening.
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > this was a year ago.  Did you make any progress on this issue?
> > > > > >
> > > > > > --
> > > > > > (domestic pets only, the antidote for overdose, milk.)
> > > > > >    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 06:19:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 02:19:18 2021
Received: from localhost ([127.0.0.1]:47382 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7XTq-0007iM-7l
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:19:18 -0400
Received: from mail-pl1-f177.google.com ([209.85.214.177]:46837)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7XTo-0007i8-8G
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:19:17 -0400
Received: by mail-pl1-f177.google.com with SMTP id t21so7794844plr.13
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 23:19:16 -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=PmPidB5ZQsHk9vi9cRazHsAK7jjj4CUV+Nu06ZvIgSQ=;
 b=qHxj/+c88LcY1AvkAEhuBK1ZxEf9SfIb5ZFPgSM1+Dfbz5GKJkeeZ5RV55lmWQNhrv
 e/JSxW42s9hk/WMFU4KmCdchdV53ThopRGziXBlrg9vlK/MwvETMMwS1fsfaIoRHqzNw
 hpRW0iHtvioGbgnrMP9fmI9C+H6nIfk2nRWK4lsCObpcew/9j8oLaFuiQqnqioG9Q7wo
 9ni8VVRsYxS8lpwX92UOKbW7+Cp16ZJX6FCR5zPiEtZ/3P6kwhPsYKNgltbhP7pL/zhI
 vBD29fV5RCQF1yLTeoh7ASAS31yFobcBRRI3HK3KP2qd8ZfoVcGWgRTAvYftfP8AkqI9
 GPWA==
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=PmPidB5ZQsHk9vi9cRazHsAK7jjj4CUV+Nu06ZvIgSQ=;
 b=Im3JHiCgqhCWWjxFc5I/xTiPjdPgeG6A2OvWLusBwPcF8jOkwsh4TynfYixXRQ2xXc
 ANHjQzvwZ+mgZgY3tSWJgHnAhTveGmOlYLSmrLsjPRGDgMA5ZGeEXy6ht1Wh4IheeOgK
 lw1U2pw9FI5+V2qVNHIA00cwfT7VYnSeIDN0DOJkkbpclx58UqEH6z1NEvfts15PFA5U
 uMtug1NACSRN3fCeOEfGHeFHjF09Y904487GoLNVn5XM78QOUTmn5vq+DkSeChme3ifx
 LNb++pJ0K+UaGxKUgPKa6gNk1zbv5/FYVeNPZk8c49a3aEIXqCZAIKssR9a3vYr+ydvU
 z3uw==
X-Gm-Message-State: AOAM533AWrM9l0wAFmYJEZxg3U6LAbvD067wAQNCJGHVEFxBrQMKwRsO
 fkpFOOcS0ZK0UJjua0o0KxjK3UbP2mHXRuC8dF8=
X-Google-Smtp-Source: ABdhPJzRCEH65GCxvXd4oK+LojGdf42DFfqi1zFIjtS3lJFSKqk8xRLh9UHFrNMhdde8B7LFDEapbPzXzi1rRXFhV70=
X-Received: by 2002:a17:903:300b:b029:12b:db40:2cfb with SMTP id
 o11-20020a170903300bb029012bdb402cfbmr6662000pla.59.1627193950539; Sat, 24
 Jul 2021 23:19:10 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
 <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
In-Reply-To: <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 08:18:59 +0200
Message-ID: <CAPAOBV9japu8S69P0GwHPNjwd4nc5VMYKfKKbX5uq9fZ3w5Mpw@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The bug-5852 test function does not reproduce the bug on my home PC either =
=E2=80=A6
  V.

Le dim. 25 juil. 2021 =C3=A0 08:17, Vincent Bela=C3=AFche
<vincent.belaiche@HIDDEN> a =C3=A9crit :
>
> The same test function, but with comments :
>
>
> (defun bug-5852 ();;---
>   "Check no irrelevant reference is created when a row is inserted and
> a formula is yanked"
>   (interactive);;---
>   (let ((ses-initial-size '(3 . 3))); size before last row insertion,
> due to all preceding TAB & C-o
>   (with-temp-buffer
>     (ses-mode)
>     (dolist (val '(
>                    (ses-edit-cell 0 1 1) ; 1 RET
>                    (ses-edit-cell 1 0 2) ; 2 RET
>                    (ses-edit-cell 1 1 (+ B1 A2)) ; ( + SPC B1 SPC A2 RET
>                    (ses-edit-cell 2 0 3) ; 3 RET
>                    (ses-edit-cell 2 1 (+ B2 A3)) ; ( + SPC B2 SPC A3 RET
>                    (ses-jump A3) ; C-n
>                    (ses-insert-row 1) ; C-o
>                    (ses-edit-cell 2 0 4) ; 4 RET
>                    (ses-jump B2) ; C-p
>                    ))
>       (apply 'funcall-interactively  val)
>       (ses-command-hook))
>   (let ((beg (point-marker))); C-SPC
>     (ses-jump 'C2) ; C-f
>     (copy-region-as-kill beg (point) nil); M-w
>     (set-marker beg nil))
>   (dolist (val '(
>                  (ses-jump B3); C-n C-b
>                  (yank) ; C-y
>                  (ses-jump B4); C-n
>                  (yank); C-y
>                  ))
>     (apply 'funcall-interactively  val)
>     (ses-command-hook))
>   (ses-repair-cell-reference-all)
>   )))
>
> Le dim. 25 juil. 2021 =C3=A0 07:56, Vincent Bela=C3=AFche
> <vincent.belaiche@HIDDEN> a =C3=A9crit :
> >
> > On more significant difference between the function bug-5852 and the
> > example is the the initial size is (3 . 3) instead of (1. 1). This is
> > because I speculated that only the last row insertion (C-o) plays a
> > role.
> >
> >   V.
> >
> > Le dim. 25 juil. 2021 =C3=A0 07:48, Vincent Bela=C3=AFche
> > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > >
> > > Just to add something : reading again SES code, and (info "(elisp)
> > > Command Overview") I am a bit skeptical about the explanation in my
> > > previous email.
> > > It seems that only key strokes are queue, but command execution and
> > > post command hook are in sequence, so not done concurrently.
> > > I wrote this function to try to reproduce the bug, and on my office P=
C
> > > it does not reproduce it:
> > >
> > > (defun bug-5852 ();;---
> > >   "Check no irrelevant reference is created when a row is inserted an=
d
> > > a formula is yanked"
> > >   (interactive);;---
> > >   (let ((ses-initial-size '(3 . 3)))
> > >   (with-temp-buffer
> > >     (ses-mode)
> > >     (dolist (val '(
> > >                    (ses-edit-cell 0 1 1)
> > >                    (ses-edit-cell 1 0 2)
> > >                    (ses-edit-cell 1 1 (+ B1 A2))
> > >                    (ses-edit-cell 2 0 3)
> > >                    (ses-edit-cell 2 1 (+ B2 A3))
> > >                    (ses-jump A3)
> > >                    (ses-insert-row 1)
> > >                    (ses-edit-cell 2 0 4)
> > >                    (ses-jump B2)
> > >                    ))
> > >       (apply 'funcall-interactively  val)
> > >       (ses-command-hook))
> > >     (let ((beg (point-marker)))
> > >       (ses-jump 'C2) ; C-n
> > >       (copy-region-as-kill beg (point) nil)
> > >       (set-marker beg nil))
> > >     (dolist (val '(
> > >                    (ses-jump B3)
> > >                    (yank)
> > >                    (ses-jump B4)
> > >                    (yank)
> > >                    ))
> > >       (apply 'funcall-interactively  val)
> > >       (ses-command-hook))
> > >     (ses-repair-cell-reference-all)
> > >     )))
> > >
> > > Please note that the main difference with the provided example is tha=
t
> > > motion is done with ses-jump, and not with motion commands. Also the
> > > save to keyring is not done interatively.
> > >    V.
> > >
> > > Le sam. 24 juil. 2021 =C3=A0 23:46, Vincent Bela=C3=AFche
> > > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > > >
> > > > Hello Lars,
> > > >
> > > > Sorry for not making any feedback for so long, actually I was just
> > > > distracted by some other business, and I somewhat had forgotten abo=
ut
> > > > it.
> > > >
> > > > I suspect a race condition between the post command hook and the ne=
xt
> > > > command. That is to say when one yanks the fomula (the first yank),
> > > > one relocates the reference but for this one uses current reference=
s
> > > > that have not yet been relocated because the previous post-command
> > > > hook execution is not yet over.
> > > >
> > > > The bug does not show every time I do the experiment. I tried this
> > > > morning with my office PC which is a fast machine, and it proved ou=
t
> > > > quite hard to reproduce, even when I launched some big C program
> > > > compilation in parallel to eat the mips.
> > > >
> > > > Next week I will do some experiment with my home PC which is quite
> > > > quite slower, and I make some feedback. Unfortunateless both machin=
e
> > > > do not have the same emacs version, but anyway all changes in SES
> > > > since the version on my home PC are not related to this bug, so
> > > > nevertheless that will be a good indication whether my guess is
> > > > correct.
> > > >
> > > >   V.
> > > >
> > > > Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@HIDDEN=
rg> a =C3=A9crit :
> > > > >
> > > > > Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
> > > > >
> > > > > > I will investigate why and feed back once I have a better idea =
of what
> > > > > > is happening.
> > > > >
> > > > > Hi,
> > > > >
> > > > > this was a year ago.  Did you make any progress on this issue?
> > > > >
> > > > > --
> > > > > (domestic pets only, the antidote for overdose, milk.)
> > > > >    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 06:18:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 02:17:59 2021
Received: from localhost ([127.0.0.1]:47370 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7XSZ-0007fU-GU
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:17:59 -0400
Received: from mail-pj1-f52.google.com ([209.85.216.52]:37391)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7XSU-0007fE-Un
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 02:17:58 -0400
Received: by mail-pj1-f52.google.com with SMTP id
 a4-20020a17090aa504b0290176a0d2b67aso6591206pjq.2
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 23:17:54 -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=ta8lLRl3/Q4O0JwjsmVIQudiqgwKLUJ1vS5cvpwtOd0=;
 b=aQW796CFTMNcGm6G4gXq3OPW2hUbWRByj82tmQJPTfTMTn1qiSmizwJIdfJhWJJILs
 EI648+unOF+LNzmVYuxGWJP7vpN6GhZmSvCSto32mv7xmMuJlZQIoUxe9fl6XajPunhg
 F/yWPsjWbOmMGyhSptpa7LtNiEioy9TYb8x5YQ4Yg+Ft7EXqsWEkI6SrprH4LmCIUKJ1
 +UfjS1zDvuWc7EeRYYPXBwVHTL4w20NKQ2kaV9SnNxIWUrrUIO/WCC8059IQViNkL+C3
 PrZXaOz5uD9gbh5eqMDGM/C3gZ9h2JwL+TaaUqFfur4y2PKvPHeXANMJUAwwrKm7kAb0
 LPUQ==
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=ta8lLRl3/Q4O0JwjsmVIQudiqgwKLUJ1vS5cvpwtOd0=;
 b=hg09cELP5w4esJ1LigoAJDkdm52JGb3Ockw3lof5WMdZenyojzSqhM/F+In2kMgzhZ
 cWhv1X7oNq/1u1BLfVzY9j/IqpDn/vGhyb36SB3FUk1ND+mWI9f3sxS0JkUrbZAxN1Kc
 YRh1lawxkfM/Iv/ITGHOUt6pCNhtLCfHww1HmjPx/jw1tK/XiwxB4CY0b8vCZjT/+X7J
 4PJHHz+ryTuQvEGK1iyxXopXMWt/yx3aJh80VRH5cBQprbYcwDUgYVMRdOKgvvYLyDbg
 nDAIevhadQskqjr72ci+Ca4XUW0nlEu5+xLIGdirE/xgPaEFtrnDMKD3q7kWitNabd12
 vKuQ==
X-Gm-Message-State: AOAM531ZIZlM8y4YBdqKeVFscYFaqI5Vzn19GF1SOXrFWDagT1xQMVF3
 1rR9oPRu69dFe4huvg7oLmukA1wZP3HiuBmgMHI=
X-Google-Smtp-Source: ABdhPJxBzegjR8Gm2KIOhRkQOPxoe6GlPUScpvpiZP7jAEb7naYbH4goPzt1GKe3Ycd7G6gMKFWFDwm1XC/EYlsp/Lo=
X-Received: by 2002:a17:90a:8410:: with SMTP id
 j16mr11710653pjn.111.1627193869131; 
 Sat, 24 Jul 2021 23:17:49 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
 <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
In-Reply-To: <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 08:17:37 +0200
Message-ID: <CAPAOBV_Ss0Wrt50ePP8AjKHEcKUsJjrGmWWA-N5OGMcirBhTXw@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

The same test function, but with comments :


(defun bug-5852 ();;---
  "Check no irrelevant reference is created when a row is inserted and
a formula is yanked"
  (interactive);;---
  (let ((ses-initial-size '(3 . 3))); size before last row insertion,
due to all preceding TAB & C-o
  (with-temp-buffer
    (ses-mode)
    (dolist (val '(
                   (ses-edit-cell 0 1 1) ; 1 RET
                   (ses-edit-cell 1 0 2) ; 2 RET
                   (ses-edit-cell 1 1 (+ B1 A2)) ; ( + SPC B1 SPC A2 RET
                   (ses-edit-cell 2 0 3) ; 3 RET
                   (ses-edit-cell 2 1 (+ B2 A3)) ; ( + SPC B2 SPC A3 RET
                   (ses-jump A3) ; C-n
                   (ses-insert-row 1) ; C-o
                   (ses-edit-cell 2 0 4) ; 4 RET
                   (ses-jump B2) ; C-p
                   ))
      (apply 'funcall-interactively  val)
      (ses-command-hook))
  (let ((beg (point-marker))); C-SPC
    (ses-jump 'C2) ; C-f
    (copy-region-as-kill beg (point) nil); M-w
    (set-marker beg nil))
  (dolist (val '(
                 (ses-jump B3); C-n C-b
                 (yank) ; C-y
                 (ses-jump B4); C-n
                 (yank); C-y
                 ))
    (apply 'funcall-interactively  val)
    (ses-command-hook))
  (ses-repair-cell-reference-all)
  )))

Le dim. 25 juil. 2021 =C3=A0 07:56, Vincent Bela=C3=AFche
<vincent.belaiche@HIDDEN> a =C3=A9crit :
>
> On more significant difference between the function bug-5852 and the
> example is the the initial size is (3 . 3) instead of (1. 1). This is
> because I speculated that only the last row insertion (C-o) plays a
> role.
>
>   V.
>
> Le dim. 25 juil. 2021 =C3=A0 07:48, Vincent Bela=C3=AFche
> <vincent.belaiche@HIDDEN> a =C3=A9crit :
> >
> > Just to add something : reading again SES code, and (info "(elisp)
> > Command Overview") I am a bit skeptical about the explanation in my
> > previous email.
> > It seems that only key strokes are queue, but command execution and
> > post command hook are in sequence, so not done concurrently.
> > I wrote this function to try to reproduce the bug, and on my office PC
> > it does not reproduce it:
> >
> > (defun bug-5852 ();;---
> >   "Check no irrelevant reference is created when a row is inserted and
> > a formula is yanked"
> >   (interactive);;---
> >   (let ((ses-initial-size '(3 . 3)))
> >   (with-temp-buffer
> >     (ses-mode)
> >     (dolist (val '(
> >                    (ses-edit-cell 0 1 1)
> >                    (ses-edit-cell 1 0 2)
> >                    (ses-edit-cell 1 1 (+ B1 A2))
> >                    (ses-edit-cell 2 0 3)
> >                    (ses-edit-cell 2 1 (+ B2 A3))
> >                    (ses-jump A3)
> >                    (ses-insert-row 1)
> >                    (ses-edit-cell 2 0 4)
> >                    (ses-jump B2)
> >                    ))
> >       (apply 'funcall-interactively  val)
> >       (ses-command-hook))
> >     (let ((beg (point-marker)))
> >       (ses-jump 'C2) ; C-n
> >       (copy-region-as-kill beg (point) nil)
> >       (set-marker beg nil))
> >     (dolist (val '(
> >                    (ses-jump B3)
> >                    (yank)
> >                    (ses-jump B4)
> >                    (yank)
> >                    ))
> >       (apply 'funcall-interactively  val)
> >       (ses-command-hook))
> >     (ses-repair-cell-reference-all)
> >     )))
> >
> > Please note that the main difference with the provided example is that
> > motion is done with ses-jump, and not with motion commands. Also the
> > save to keyring is not done interatively.
> >    V.
> >
> > Le sam. 24 juil. 2021 =C3=A0 23:46, Vincent Bela=C3=AFche
> > <vincent.belaiche@HIDDEN> a =C3=A9crit :
> > >
> > > Hello Lars,
> > >
> > > Sorry for not making any feedback for so long, actually I was just
> > > distracted by some other business, and I somewhat had forgotten about
> > > it.
> > >
> > > I suspect a race condition between the post command hook and the next
> > > command. That is to say when one yanks the fomula (the first yank),
> > > one relocates the reference but for this one uses current references
> > > that have not yet been relocated because the previous post-command
> > > hook execution is not yet over.
> > >
> > > The bug does not show every time I do the experiment. I tried this
> > > morning with my office PC which is a fast machine, and it proved out
> > > quite hard to reproduce, even when I launched some big C program
> > > compilation in parallel to eat the mips.
> > >
> > > Next week I will do some experiment with my home PC which is quite
> > > quite slower, and I make some feedback. Unfortunateless both machine
> > > do not have the same emacs version, but anyway all changes in SES
> > > since the version on my home PC are not related to this bug, so
> > > nevertheless that will be a good indication whether my guess is
> > > correct.
> > >
> > >   V.
> > >
> > > Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@HIDDEN=
> a =C3=A9crit :
> > > >
> > > > Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
> > > >
> > > > > I will investigate why and feed back once I have a better idea of=
 what
> > > > > is happening.
> > > >
> > > > Hi,
> > > >
> > > > this was a year ago.  Did you make any progress on this issue?
> > > >
> > > > --
> > > > (domestic pets only, the antidote for overdose, milk.)
> > > >    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 05:56:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 01:56:55 2021
Received: from localhost ([127.0.0.1]:47360 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7X8B-0007A4-9P
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 01:56:55 -0400
Received: from mail-pj1-f43.google.com ([209.85.216.43]:35652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7X88-00079q-JI
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 01:56:53 -0400
Received: by mail-pj1-f43.google.com with SMTP id
 pf12-20020a17090b1d8cb0290175c085e7a5so15042104pjb.0
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 22:56:52 -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=NLir9JcsbQ/n37SD+4IOa5DHQ05GLlgQkCszzpdxEr4=;
 b=C3ROuXNdiu3BbqffFjD2Ux6j1TKU8OF3X0ctOYiJrrRj8toIRYuhOqXAlOM1dAudWe
 1g0QqOUNfpQe5A4xnCMPou+v9sznrmHOoAExOE4nAQplHMnacmAZ7syHcbUkDo5CQo5K
 050YVJEwYLHMxUNpy2Ek5wCc4hMLiTe6LrBWvqeKtgg7hvnlCEMUaVYPnRnEQA0nje5Q
 7As7S2otGgHKQzzI5kIpSYwfoCPEc10itpTIuGaDlHq1NnzfgGbTWB1NOqa8Q43P2drt
 MKbAk2bsxPFwG0Kew2ZzbkW4VevIQkvLCwt9xCHls4MbcZ5oV4M4VRprKY+jBU6TKbt+
 ujDQ==
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=NLir9JcsbQ/n37SD+4IOa5DHQ05GLlgQkCszzpdxEr4=;
 b=TZjXlggo2P829yU+KOx8znSEw4USD41vWC8a9kct7kVE2Mm1M+h8OhWh1d2Thkyszl
 GJKrqF1+RpU3zXZHzNUeH7WC9J8Vh0CqK0HpKJ4KZ4z11P34H7oyFoCSbLzE5k/+nXuV
 rZM974akYOxvHyg6lSuXHHsBT4SnNiLMS6hdgky91CcDfg8nJjYFGwY/T5kzQOqDLDDv
 uO8s3iBgHJvEQQv1CvOwggBBnmXiJDowEOwm+E/5LzlbrZDHYuxcKtOEHfPhX65a3JPS
 SzGcKyF8QHlEttSXa7/c4nyzCQ14RI6CPV+G9bS7VTrgU0QeJVT+tHYX9rBiAvA1N3Rc
 VUYA==
X-Gm-Message-State: AOAM533D25WQeOLMSNoNJn2fLIHcS5wNr1Q+VjqO3gSG0Xu/12C4PIw7
 sB+MermaEiIbX28G9XWzRKWSf5ZG0Le0YyBc9qw=
X-Google-Smtp-Source: ABdhPJwKUa5PnRIS4ZR+CTIR1LTK7n8ejE+Ovl50NV4xp3Hu6msIny5KtpNGd16vyAshIYH9n0vWaoXo0wEpN4JGXEc=
X-Received: by 2002:aa7:87cd:0:b029:32e:7954:2872 with SMTP id
 i13-20020aa787cd0000b029032e79542872mr12187239pfo.0.1627192606635; Sat, 24
 Jul 2021 22:56:46 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
 <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
In-Reply-To: <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 07:56:35 +0200
Message-ID: <CAPAOBV-OLXb7rL56ry8bSwTMMu89SY3CkeVVQ09NdS5B49qDYw@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On more significant difference between the function bug-5852 and the
example is the the initial size is (3 . 3) instead of (1. 1). This is
because I speculated that only the last row insertion (C-o) plays a
role.

  V.

Le dim. 25 juil. 2021 =C3=A0 07:48, Vincent Bela=C3=AFche
<vincent.belaiche@HIDDEN> a =C3=A9crit :
>
> Just to add something : reading again SES code, and (info "(elisp)
> Command Overview") I am a bit skeptical about the explanation in my
> previous email.
> It seems that only key strokes are queue, but command execution and
> post command hook are in sequence, so not done concurrently.
> I wrote this function to try to reproduce the bug, and on my office PC
> it does not reproduce it:
>
> (defun bug-5852 ();;---
>   "Check no irrelevant reference is created when a row is inserted and
> a formula is yanked"
>   (interactive);;---
>   (let ((ses-initial-size '(3 . 3)))
>   (with-temp-buffer
>     (ses-mode)
>     (dolist (val '(
>                    (ses-edit-cell 0 1 1)
>                    (ses-edit-cell 1 0 2)
>                    (ses-edit-cell 1 1 (+ B1 A2))
>                    (ses-edit-cell 2 0 3)
>                    (ses-edit-cell 2 1 (+ B2 A3))
>                    (ses-jump A3)
>                    (ses-insert-row 1)
>                    (ses-edit-cell 2 0 4)
>                    (ses-jump B2)
>                    ))
>       (apply 'funcall-interactively  val)
>       (ses-command-hook))
>     (let ((beg (point-marker)))
>       (ses-jump 'C2) ; C-n
>       (copy-region-as-kill beg (point) nil)
>       (set-marker beg nil))
>     (dolist (val '(
>                    (ses-jump B3)
>                    (yank)
>                    (ses-jump B4)
>                    (yank)
>                    ))
>       (apply 'funcall-interactively  val)
>       (ses-command-hook))
>     (ses-repair-cell-reference-all)
>     )))
>
> Please note that the main difference with the provided example is that
> motion is done with ses-jump, and not with motion commands. Also the
> save to keyring is not done interatively.
>    V.
>
> Le sam. 24 juil. 2021 =C3=A0 23:46, Vincent Bela=C3=AFche
> <vincent.belaiche@HIDDEN> a =C3=A9crit :
> >
> > Hello Lars,
> >
> > Sorry for not making any feedback for so long, actually I was just
> > distracted by some other business, and I somewhat had forgotten about
> > it.
> >
> > I suspect a race condition between the post command hook and the next
> > command. That is to say when one yanks the fomula (the first yank),
> > one relocates the reference but for this one uses current references
> > that have not yet been relocated because the previous post-command
> > hook execution is not yet over.
> >
> > The bug does not show every time I do the experiment. I tried this
> > morning with my office PC which is a fast machine, and it proved out
> > quite hard to reproduce, even when I launched some big C program
> > compilation in parallel to eat the mips.
> >
> > Next week I will do some experiment with my home PC which is quite
> > quite slower, and I make some feedback. Unfortunateless both machine
> > do not have the same emacs version, but anyway all changes in SES
> > since the version on my home PC are not related to this bug, so
> > nevertheless that will be a good indication whether my guess is
> > correct.
> >
> >   V.
> >
> > Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@HIDDEN> =
a =C3=A9crit :
> > >
> > > Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
> > >
> > > > I will investigate why and feed back once I have a better idea of w=
hat
> > > > is happening.
> > >
> > > Hi,
> > >
> > > this was a year ago.  Did you make any progress on this issue?
> > >
> > > --
> > > (domestic pets only, the antidote for overdose, milk.)
> > >    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 05:49:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 25 01:49:16 2021
Received: from localhost ([127.0.0.1]:47354 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7X0m-0006nk-CI
	for submit <at> debbugs.gnu.org; Sun, 25 Jul 2021 01:49:16 -0400
Received: from mail-pl1-f182.google.com ([209.85.214.182]:41944)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7X0j-0006nU-Ce
 for 5852 <at> debbugs.gnu.org; Sun, 25 Jul 2021 01:49:15 -0400
Received: by mail-pl1-f182.google.com with SMTP id e14so7933038plh.8
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 22:49:13 -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=AHVBLn2JC6vH8bdu5ckWFOEJFNjJSt5UKTFrjgcgA98=;
 b=nNicTvu5peI48kjHxlIf/PCaAX1soB9Mbcv0Jn9NHnN7m8e+3oquTQql4i0mdPqTcs
 akExyqO2zgmsUsgIYEJaXkBc0lzOCdhW3FOm9V1Qt7FSJdMlviGPho9ysPOmMr94JAjc
 SBWTdKBecCb9gw/mh0NUKwv8T8CPipMIXMaKDzjhIJeqdF9UZ5Zz/MDnTowqyGg2XhZW
 Fe7oGEEK0pmg8GJ5RL552ui7gutpP3LQw9Y6gt1tSPQA6qYlAtW7ZxIe58V1BsQe6lBr
 NPa7hsVQmm5JNpNIURJWluIbc438+xFBEi0+9iMz+MiGFJcqDB1QusUnGUn2Xqg5f/uy
 Hcfg==
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=AHVBLn2JC6vH8bdu5ckWFOEJFNjJSt5UKTFrjgcgA98=;
 b=gPVR0Zne3/wc9AUGqcG9jAOuodKkS2bHUFCGojuEZbz0Hp+tWIpFxhV93GCobI7i0B
 WeT8UzCy6CZwflvIuOhQ/3ECc3hpRnDfGJ80vfu5i18DqDloSIBPC+5I7ZCJto0AiJPf
 NUs+BhiH+a3gxDBsr0aFwOEX0FGMg7DCk4DbeuMcWXWPtCNwKuxb42wL5HFLQq1MuNSA
 lLuT3joSOWr1MbMN73PNBSsxHkV8F0bCCwh+EJYGy7sP5AunzdD7FokAVViYhU3Kp7PU
 I4GK7p2uMsgeFYaV58FMhiwsgHK1fcui4Kgd8yXHvfqZJhyevd5tWBYyGHzMI5T0Q+9L
 Nt/w==
X-Gm-Message-State: AOAM531tpKHmSV6SBixO+iTEn6dAoX00HKGvqoQIrTwYyXzaOA9vNiCI
 48eSU6XYQqUdeBlhRvt6VUl9YAtfmCVr3z1Yj3U=
X-Google-Smtp-Source: ABdhPJz5BPpZaiIOkmqDJoJNjPLMtg6PB1u8Acb3dWjcINFRaXsuBpWsuNm8XgeDL37MSWHDGDxTP8pH9CL8+2ZbrwI=
X-Received: by 2002:a65:62da:: with SMTP id m26mr12411866pgv.370.1627192147454; 
 Sat, 24 Jul 2021 22:49:07 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
 <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
In-Reply-To: <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sun, 25 Jul 2021 07:48:55 +0200
Message-ID: <CAPAOBV8OCo660-4gu6KRoiq2TEkp_FoYOHpVhKwESBtqEnd-1Q@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Just to add something : reading again SES code, and (info "(elisp)
Command Overview") I am a bit skeptical about the explanation in my
previous email.
It seems that only key strokes are queue, but command execution and
post command hook are in sequence, so not done concurrently.
I wrote this function to try to reproduce the bug, and on my office PC
it does not reproduce it:

(defun bug-5852 ();;---
  "Check no irrelevant reference is created when a row is inserted and
a formula is yanked"
  (interactive);;---
  (let ((ses-initial-size '(3 . 3)))
  (with-temp-buffer
    (ses-mode)
    (dolist (val '(
                   (ses-edit-cell 0 1 1)
                   (ses-edit-cell 1 0 2)
                   (ses-edit-cell 1 1 (+ B1 A2))
                   (ses-edit-cell 2 0 3)
                   (ses-edit-cell 2 1 (+ B2 A3))
                   (ses-jump A3)
                   (ses-insert-row 1)
                   (ses-edit-cell 2 0 4)
                   (ses-jump B2)
                   ))
      (apply 'funcall-interactively  val)
      (ses-command-hook))
    (let ((beg (point-marker)))
      (ses-jump 'C2) ; C-n
      (copy-region-as-kill beg (point) nil)
      (set-marker beg nil))
    (dolist (val '(
                   (ses-jump B3)
                   (yank)
                   (ses-jump B4)
                   (yank)
                   ))
      (apply 'funcall-interactively  val)
      (ses-command-hook))
    (ses-repair-cell-reference-all)
    )))

Please note that the main difference with the provided example is that
motion is done with ses-jump, and not with motion commands. Also the
save to keyring is not done interatively.
   V.

Le sam. 24 juil. 2021 =C3=A0 23:46, Vincent Bela=C3=AFche
<vincent.belaiche@HIDDEN> a =C3=A9crit :
>
> Hello Lars,
>
> Sorry for not making any feedback for so long, actually I was just
> distracted by some other business, and I somewhat had forgotten about
> it.
>
> I suspect a race condition between the post command hook and the next
> command. That is to say when one yanks the fomula (the first yank),
> one relocates the reference but for this one uses current references
> that have not yet been relocated because the previous post-command
> hook execution is not yet over.
>
> The bug does not show every time I do the experiment. I tried this
> morning with my office PC which is a fast machine, and it proved out
> quite hard to reproduce, even when I launched some big C program
> compilation in parallel to eat the mips.
>
> Next week I will do some experiment with my home PC which is quite
> quite slower, and I make some feedback. Unfortunateless both machine
> do not have the same emacs version, but anyway all changes in SES
> since the version on my home PC are not related to this bug, so
> nevertheless that will be a good indication whether my guess is
> correct.
>
>   V.
>
> Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@HIDDEN> a =
=C3=A9crit :
> >
> > Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
> >
> > > I will investigate why and feed back once I have a better idea of wha=
t
> > > is happening.
> >
> > Hi,
> >
> > this was a year ago.  Did you make any progress on this issue?
> >
> > --
> > (domestic pets only, the antidote for overdose, milk.)
> >    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 24 Jul 2021 21:46:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 24 17:46:55 2021
Received: from localhost ([127.0.0.1]:47158 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m7PTz-0007jL-7R
	for submit <at> debbugs.gnu.org; Sat, 24 Jul 2021 17:46:55 -0400
Received: from mail-pj1-f52.google.com ([209.85.216.52]:38428)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.belaiche@HIDDEN>) id 1m7PTv-0007j5-IT
 for 5852 <at> debbugs.gnu.org; Sat, 24 Jul 2021 17:46:54 -0400
Received: by mail-pj1-f52.google.com with SMTP id
 j8-20020a17090aeb08b0290173bac8b9c9so14181898pjz.3
 for <5852 <at> debbugs.gnu.org>; Sat, 24 Jul 2021 14:46:51 -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=WFojmC4/3gTslR8Fxjn5LoL2rZwNrfyX/9pBNIngiGg=;
 b=ZP5aw/lXU4MuGHsqAda2+r36SAzwEvEcH1hozER257rW30XWTW7XL/1RjMLmucFKqC
 DphsItFpZgCWGKHZC7/fqtBp+CHbqXyuQbdYzfeFq7jVb/GtVXjCDHupn4UOjaHRy+Dg
 nzXhQ1SZPNYzw9WlEyjoB3QgTbMvRV79hCXBdxlppKZkpMcl1cDL3M+0ECotpzHI+/ye
 I8zU63BQDZZIAU8PKWqdsRVnx7TrojmnptAoJLzS6MgNiPwJTApw9WJ4C32P21loXWti
 pLqY5VN+E8ZBoe1Nuh0wmdDoL7kK9ZhZYH+p7/hDBlcUqKjo9wIfFtrsCWgjpp3IICjI
 4qmQ==
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=WFojmC4/3gTslR8Fxjn5LoL2rZwNrfyX/9pBNIngiGg=;
 b=DycPC2XtQ+cteReioLWq0//+bbYiGbCT3UBMxW4MyDXMPHWL0PTgV7ULhKCrcwKivw
 No/PU4fhwZzEcBOsopkPNfKHIJRzNqcrpkJ4w2/9NqqlqAHoDTNcrN/NX22Z/EnG9ppW
 fWFIhobc/HwNsgSVBwD24joLVwO6OY6rDf6Z1mVQy2cBpSkYvKUfq3HVZU0c0eEGOr6t
 o+Xi1ilt20It6sX5fgpvPbjQ9uxA+V5UAPBAwN/4bDlP3GyqtjQT88n6WvaD9rBDx/UN
 dAUa2IyVdC3ycyIb6xYdB8Qd8anCFLh9uFCqdV6e6ubnvXxrmd56BbEeDn36w8h69iBu
 HCEw==
X-Gm-Message-State: AOAM532/F8hzZpfJugFn5VXcAdITJlVF+8AM4qtAECFzKsH8pSDFzvs1
 E5yy5AfjURwMYa7ZYAsriNbCekp3ua7jHZ4EPck=
X-Google-Smtp-Source: ABdhPJzNygUoJp9GM5QYcL7l3m8RJcc4WKe87z2u402dHol3vX0HPlaY5kQREbYWd1iZ8NT9ifSwGQpaW+FON7D6gOI=
X-Received: by 2002:a65:5087:: with SMTP id r7mr4798555pgp.160.1627163205656; 
 Sat, 24 Jul 2021 14:46:45 -0700 (PDT)
MIME-Version: 1.0
References: <845zfpi242.fsf@HIDDEN> <871r7vrbez.fsf@HIDDEN>
In-Reply-To: <871r7vrbez.fsf@HIDDEN>
From: =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
Date: Sat, 24 Jul 2021 23:46:34 +0200
Message-ID: <CAPAOBV8LV+L2ivPjPB_7x8gtaRLbYhH4O-PNTdKZA4hBt4c-wA@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
To: Lars Ingebrigtsen <larsi@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?UTF-8?Q?Vincent_Bela=C3=AFche?= <vincentbelaiche@HIDDEN>,
 Stefan Kangas <stefan@HIDDEN>,
 =?UTF-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Lars,

Sorry for not making any feedback for so long, actually I was just
distracted by some other business, and I somewhat had forgotten about
it.

I suspect a race condition between the post command hook and the next
command. That is to say when one yanks the fomula (the first yank),
one relocates the reference but for this one uses current references
that have not yet been relocated because the previous post-command
hook execution is not yet over.

The bug does not show every time I do the experiment. I tried this
morning with my office PC which is a fast machine, and it proved out
quite hard to reproduce, even when I launched some big C program
compilation in parallel to eat the mips.

Next week I will do some experiment with my home PC which is quite
quite slower, and I make some feedback. Unfortunateless both machine
do not have the same emacs version, but anyway all changes in SES
since the version on my home PC are not related to this bug, so
nevertheless that will be a good indication whether my guess is
correct.

  V.

Le dim. 18 juil. 2021 =C3=A0 15:37, Lars Ingebrigtsen <larsi@HIDDEN> a =
=C3=A9crit :
>
> Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:
>
> > I will investigate why and feed back once I have a better idea of what
> > is happening.
>
> Hi,
>
> this was a year ago.  Did you make any progress on this issue?
>
> --
> (domestic pets only, the antidote for overdose, milk.)
>    bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 18 Jul 2021 13:37:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 18 09:37:03 2021
Received: from localhost ([127.0.0.1]:55487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1m56yd-00079g-En
	for submit <at> debbugs.gnu.org; Sun, 18 Jul 2021 09:37:03 -0400
Received: from quimby.gnus.org ([95.216.78.240]:34392)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1m56yc-000790-4B
 for 5852 <at> debbugs.gnu.org; Sun, 18 Jul 2021 09:37:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID
 :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=7TAx75c/s6UbtlxKzS+d82Jqy3nFu8XXlzMxwX0YtPM=; b=HOua4vacuH/7ivMLwALeyfhwS5
 opqvmJomVBR1LTR7YBArMJ4I59ju1xHf/TGlSz9XL37AiwF4RQE2v0iNea3/TVMoS1V3je2etzoSr
 vDBs82YLaZubaJqZrwsOcLrUqqVXwmh/eiiu34v9hPAbHKKi0+PL5fYcT6uUX57FgglY=;
Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1m56yT-00011R-2Y; Sun, 18 Jul 2021 15:36:55 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Vincent =?utf-8?Q?Bela=C3=AFche?= <vincentbelaiche@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
References: <845zfpi242.fsf@HIDDEN>
X-Now-Playing: Suicide's _Suicide_: "Frankie Teardrop"
Date: Sun, 18 Jul 2021 15:36:52 +0200
In-Reply-To: <845zfpi242.fsf@HIDDEN> ("Vincent =?utf-8?Q?Bela=C3=AFche?=
 =?utf-8?Q?=22's?= message of "Sat, 29 Feb 2020 21:13:01 +0100")
Message-ID: <871r7vrbez.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 
 Content preview:  Vincent Belaïche <vincentbelaiche@HIDDEN> writes: > I
   will investigate why and feed back once I have a better idea of what > is
   happening. Hi, 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org, stefan@HIDDEN,
 =?utf-8?Q?G=C3=B6ran?= Uddeborg <goeran@HIDDEN>,
 Vincent =?utf-8?Q?Bela=C3=AFche?= <vincent.belaiche@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Vincent Bela=C3=AFche <vincentbelaiche@HIDDEN> writes:

> I will investigate why and feed back once I have a better idea of what
> is happening.

Hi,

this was a year ago.  Did you make any progress on this issue?

--=20
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 29 Feb 2020 20:13:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 29 15:13:19 2020
Received: from localhost ([127.0.0.1]:35446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j88UA-0006Om-RZ
	for submit <at> debbugs.gnu.org; Sat, 29 Feb 2020 15:13:19 -0500
Received: from smtp06.smtpout.orange.fr ([80.12.242.128]:17992
 helo=smtp.smtpout.orange.fr)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincentbelaiche@HIDDEN>) id 1j88U8-0006OY-Bh
 for 5852 <at> debbugs.gnu.org; Sat, 29 Feb 2020 15:13:17 -0500
Received: from AigleRoyal ([90.32.173.209]) by mwinf5d41 with ME
 id 8kD62200A4XS2Fu03kD6z7; Sat, 29 Feb 2020 21:13:09 +0100
X-ME-Helo: AigleRoyal
X-ME-Auth: dmluY2VudGJlbGFpY2hlQG9yYW5nZS5mcg==
X-ME-Date: Sat, 29 Feb 2020 21:13:09 +0100
X-ME-IP: 90.32.173.209
From: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincentbelaiche@HIDDEN> 
To: stefan@HIDDEN
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
In-Reply-To: <874kva84pu.fsf@HIDDEN>
Date: Sat, 29 Feb 2020 21:13:01 +0100
Message-ID: <845zfpi242.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org,
 =?iso-8859-1?Q?G=F6ran?= Uddeborg <goeran@HIDDEN>,
 =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.belaiche@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: =?iso-8859-1?Q?Vincent_Bela=EFche?= <vincent.belaiche@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dear Stefan and G=C3=BCran,

I confirm that the bug still exists, I followed the instructions by
G=C3=BCran and I reproduced the same result.

Actually, after doing all these and typing:

M-x ses-repair-cell-reference-all

I get the following answer=C2=A0:

--8<----8<----8<----8<----8<-- begin -->8---->8---->8---->8---->8----
Warning (emacs): ----------------------------------------------------------=
------
Some references were corrupted.

The following is a list where each element ELT is such
that (car ELT) is the reference of cell CELL with corruption,
and (cdr ELT) is a property list where

* property =E2=80=98:corrupt-property=E2=80=99 means that
  property =E2=80=98:ses-repair-reference=E2=80=99 of cell CELL was initial=
ly non
  nil,

* property =E2=80=98:missing=E2=80=99 is a list of missing references

* property =E2=80=98:irrelevant=E2=80=99 is a list of non needed references

((B2 :irrelevant (B4)))
--8<----8<----8<----8<----8<--  end  -->8---->8---->8---->8---->8----


This shows that the cut and paste can actually breaks the reference list
in some cases.

Please note that 'ses-repair-cell-reference-all' is the command that I
added to SES after I became the maintainer in order to fix broken
reference lists, as this can still happen if you type C-g during some
cell editing post-commands. However I hadn't realized that even by
normal editing (no C-g) you can get broken references.

I will investigate why and feed back once I have a better idea of what
is happening.

VBR,
	Vincent.


Le 29/02/2020 =C3=A0 04:14, Stefan Kangas a =C3=A9crit :
> Hi Vincent,
>
> Could you please take a look at the below bug report?  It was reported
> in 2010, before you were listed as the maintainer of ses.el.
>
> Thanks in advance.
>
> Best regards,
> Stefan Kangas
>
>
> G=C3=B6ran Uddeborg <goeran@HIDDEN> writes:
>
>> I discovered this when emacs sometimes complains that I have circular
>> references in ses-mode files where there shouldn't be any.  When
>> investigating the ses file I've noticed some cells contain references
>> that are incorrect.  When I remove these incorrect references, the
>> complaints about circular references go away, so I strongly suspect
>> the problems are related.  And even if I'm wrong, the incorrect
>> references is a bug.
>>
>> While I haven't been able to create a simple test case where I get a
>> circular reference complaint, I can easily get to a state where there
>> are incorrect references.  Create a ses file with these keystrokes:
>>
>>     C-x C-f s . s e s <return> <tab> 1 <return> C-o 2 <return>
>>     <tab> <left> ( + SPC B 1 SPC A 2 <return>
>>     C-n C-o 3 <return> ( + SPC B 2 SPC A 3 <return> C-a
>>     C-o 4 <return> C-p C-SPC C-f M-w C-n C-b C-y C-n C-y
>>     C-x C-s
>>
>> In the resulting file, cell B2 has cell B4 incorrectly listed among
>> its references:
>>
>>     (ses-cell B2 3 (+ B1 A2) nil (B3 B4))
>>
>> Only B3 does actually reference B2.
>>
>>
>> In GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.3)
>>  of 2009-12-02 on x86-3.fedora.phx.redhat.com
>> Windowing system distributor `Fedora Project', version 11.0.10705000
>> configured using `configure  '--build=3Dx86_64-redhat-linux-gnu' '--host=
=3Dx86_64-redhat-linux-gnu' '--target=3Dx86_64-redhat-linux-gnu' '--program=
-prefix=3D' '--prefix=3D/usr' '--exec-prefix=3D/usr' '--bindir=3D/usr/bin' =
'--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/usr/share' '--i=
ncludedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libe=
xec' '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' '--mandir=3D/us=
r/share/man' '--infodir=3D/usr/share/info' '--with-dbus' '--with-gif' '--wi=
th-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm'=
 '--with-x-toolkit=3Dgtk' 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_ali=
as=3Dx86_64-redhat-linux-gnu' 'target_alias=3Dx86_64-redhat-linux-gnu' 'CFL=
AGS=3D-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexcep=
tions -fstack-protector --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric=
''
>>
>> Important settings:
>>   value of $LC_ALL: nil
>>   value of $LC_COLLATE: nil
>>   value of $LC_CTYPE: nil
>>   value of $LC_MESSAGES: nil
>>   value of $LC_MONETARY: nil
>>   value of $LC_NUMERIC: nil
>>   value of $LC_TIME: nil
>>   value of $LANG: sv_SE.utf8
>>   value of $XMODIFIERS: nil
>>   locale-coding-system: utf-8-unix
>>   default-enable-multibyte-characters: t
>>
>> Major mode: SES
>>
>> Minor modes in effect:
>>   tooltip-mode: t
>>   tool-bar-mode: t
>>   mouse-wheel-mode: t
>>   menu-bar-mode: t
>>   file-name-shadow-mode: t
>>   global-font-lock-mode: t
>>   font-lock-mode: t
>>   blink-cursor-mode: t
>>   global-auto-composition-mode: t
>>   auto-composition-mode: t
>>   auto-encryption-mode: t
>>   auto-compression-mode: t
>>   line-number-mode: t
>>   transient-mark-mode: t
>>
>> Recent input:
>> <tab> 1 <tab> <backspace> <return> C-o 2 <return> <tab>=20
>> <left> ( + SPC B 1 SPC A 2 <return> <return> <return>=20
>> C-n C-o 3 <return> ( + SPC B 2 SPC A 3 <return> C-n=20
>> C-o C-p C-o 4 <return> C-p C-SPC C-f M-w C-n C-b C-y=20
>> C-n C-y C-x C-s <help-echo> M-x r e p o r t - e m a=20
>> c s - b u g <return>
>>
>> Recent messages:
>>   [2 times]
>> Yanking...done
>> Mark set
>> Yanking...done
>>   [2 times]
>> Yanking...done
>>   [2 times]
>> Yanking...done
>> Saving file /home/g=3Df6ran/x.ses...
>> Wrote /home/g=3Df6ran/x.ses




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at 5852 <at> debbugs.gnu.org:


Received: (at 5852) by debbugs.gnu.org; 29 Feb 2020 03:14:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Feb 28 22:14:48 2020
Received: from localhost ([127.0.0.1]:34045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j7saW-0003Jf-Dc
	for submit <at> debbugs.gnu.org; Fri, 28 Feb 2020 22:14:48 -0500
Received: from ted.gofardesign.uk ([67.225.143.91]:55930)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefan@HIDDEN>) id 1j7saV-0003JO-04
 for 5852 <at> debbugs.gnu.org; Fri, 28 Feb 2020 22:14:47 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; 
 s=default;
 h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:
 Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe:
 List-Post:List-Owner:List-Archive;
 bh=YAo6QhERGoDcMJMuAwn61hMAR/5zdS8EYBKGGva7WDM=; b=eM++x+7iM1NJ0H0iDVKuWZWIL1
 a9zinIlWfA6e937mlNcUPH32VbxuRtZoPf4hufa3Nls3EhECXelRhVswhsvyGBfO0FoPATLx7//lQ
 70Qfpv8iQ9qr+UP81qUjkFjh0jmK/6N7nqMpgAy8HiYNaxVmg/3xtHCV2VhKmcJCc3xjthdR3nlMS
 BLUnLWD0vmnv8ff31uGgIym+lDy+3N5c9gPrp//OcCZSIDzIVNYqeG/7d3vIVOBUrjUZsqQ2vKNfn
 2GJkUUfaj+ls1N5JTygJeRwfeLMrZ/g65QpTYu90WXNdBxUZ7aI1VrPbX6LDUNA4m+gq3Kvz/cFte
 boUVJ8gg==;
Received: from h-4-70-69.a785.priv.bahnhof.se ([155.4.70.69]:49684
 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLS1.2) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93)
 (envelope-from <stefan@HIDDEN>)
 id 1j7saN-001SjK-LK; Fri, 28 Feb 2020 22:14:39 -0500
From: Stefan Kangas <stefan@HIDDEN>
To: Vincent =?utf-8?Q?Bela=C3=AFche?= <vincentb1@HIDDEN>
Subject: Re: bug#5852: 23.1; Incorrect references in ses-mode
In-Reply-To: <201004071615.o37GFETu010061@HIDDEN> (=?utf-8?Q?=22G?=
 =?utf-8?Q?=C3=B6ran?= Uddeborg"'s
 message of "Wed, 7 Apr 2010 18:15:14 +0200")
References: <201004071615.o37GFETu010061@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Date: Sat, 29 Feb 2020 04:14:37 +0100
Message-ID: <874kva84pu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - ted.gofardesign.uk
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - marxist.se
X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id:
 stefan@HIDDEN
X-Authenticated-Sender: ted.gofardesign.uk: stefan@HIDDEN
X-Source: 
X-Source-Args: 
X-Source-Dir: 
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 5852
Cc: 5852 <at> debbugs.gnu.org, =?utf-8?Q?G=C3=B6ran?= Uddeborg <goeran@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Vincent,

Could you please take a look at the below bug report?  It was reported
in 2010, before you were listed as the maintainer of ses.el.

Thanks in advance.

Best regards,
Stefan Kangas


G=C3=B6ran Uddeborg <goeran@HIDDEN> writes:

> I discovered this when emacs sometimes complains that I have circular
> references in ses-mode files where there shouldn't be any.  When
> investigating the ses file I've noticed some cells contain references
> that are incorrect.  When I remove these incorrect references, the
> complaints about circular references go away, so I strongly suspect
> the problems are related.  And even if I'm wrong, the incorrect
> references is a bug.
>
> While I haven't been able to create a simple test case where I get a
> circular reference complaint, I can easily get to a state where there
> are incorrect references.  Create a ses file with these keystrokes:
>
>     C-x C-f s . s e s <return> <tab> 1 <return> C-o 2 <return>
>     <tab> <left> ( + SPC B 1 SPC A 2 <return>
>     C-n C-o 3 <return> ( + SPC B 2 SPC A 3 <return> C-a
>     C-o 4 <return> C-p C-SPC C-f M-w C-n C-b C-y C-n C-y
>     C-x C-s
>
> In the resulting file, cell B2 has cell B4 incorrectly listed among
> its references:
>
>     (ses-cell B2 3 (+ B1 A2) nil (B3 B4))
>
> Only B3 does actually reference B2.
>
>
> In GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.3)
>  of 2009-12-02 on x86-3.fedora.phx.redhat.com
> Windowing system distributor `Fedora Project', version 11.0.10705000
> configured using `configure  '--build=3Dx86_64-redhat-linux-gnu' '--host=
=3Dx86_64-redhat-linux-gnu' '--target=3Dx86_64-redhat-linux-gnu' '--program=
-prefix=3D' '--prefix=3D/usr' '--exec-prefix=3D/usr' '--bindir=3D/usr/bin' =
'--sbindir=3D/usr/sbin' '--sysconfdir=3D/etc' '--datadir=3D/usr/share' '--i=
ncludedir=3D/usr/include' '--libdir=3D/usr/lib64' '--libexecdir=3D/usr/libe=
xec' '--localstatedir=3D/var' '--sharedstatedir=3D/var/lib' '--mandir=3D/us=
r/share/man' '--infodir=3D/usr/share/info' '--with-dbus' '--with-gif' '--wi=
th-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm'=
 '--with-x-toolkit=3Dgtk' 'build_alias=3Dx86_64-redhat-linux-gnu' 'host_ali=
as=3Dx86_64-redhat-linux-gnu' 'target_alias=3Dx86_64-redhat-linux-gnu' 'CFL=
AGS=3D-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=3D2 -fexcep=
tions -fstack-protector --param=3Dssp-buffer-size=3D4 -m64 -mtune=3Dgeneric=
''
>
> Important settings:
>   value of $LC_ALL: nil
>   value of $LC_COLLATE: nil
>   value of $LC_CTYPE: nil
>   value of $LC_MESSAGES: nil
>   value of $LC_MONETARY: nil
>   value of $LC_NUMERIC: nil
>   value of $LC_TIME: nil
>   value of $LANG: sv_SE.utf8
>   value of $XMODIFIERS: nil
>   locale-coding-system: utf-8-unix
>   default-enable-multibyte-characters: t
>
> Major mode: SES
>
> Minor modes in effect:
>   tooltip-mode: t
>   tool-bar-mode: t
>   mouse-wheel-mode: t
>   menu-bar-mode: t
>   file-name-shadow-mode: t
>   global-font-lock-mode: t
>   font-lock-mode: t
>   blink-cursor-mode: t
>   global-auto-composition-mode: t
>   auto-composition-mode: t
>   auto-encryption-mode: t
>   auto-compression-mode: t
>   line-number-mode: t
>   transient-mark-mode: t
>
> Recent input:
> <tab> 1 <tab> <backspace> <return> C-o 2 <return> <tab>=20
> <left> ( + SPC B 1 SPC A 2 <return> <return> <return>=20
> C-n C-o 3 <return> ( + SPC B 2 SPC A 3 <return> C-n=20
> C-o C-p C-o 4 <return> C-p C-SPC C-f M-w C-n C-b C-y=20
> C-n C-y C-x C-s <help-echo> M-x r e p o r t - e m a=20
> c s - b u g <return>
>
> Recent messages:
>   [2 times]
> Yanking...done
> Mark set
> Yanking...done
>   [2 times]
> Yanking...done
>   [2 times]
> Yanking...done
> Saving file /home/g=3Df6ran/x.ses...
> Wrote /home/g=3Df6ran/x.ses




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Apr 2010 16:25:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 07 12:25:03 2010
Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1NzY3q-0003dI-IO
	for submit <at> debbugs.gnu.org; Wed, 07 Apr 2010 12:25:02 -0400
Received: from mx10.gnu.org ([199.232.76.166])
	by debbugs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <goeran@HIDDEN>) id 1NzXue-0003YY-KB
	for submit <at> debbugs.gnu.org; Wed, 07 Apr 2010 12:15:33 -0400
Received: from lists.gnu.org ([199.232.76.165]:59143)
	by monty-python.gnu.org with esmtps
	(TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60)
	(envelope-from <goeran@HIDDEN>) id 1NzXuZ-0000Jg-EO
	for submit <at> debbugs.gnu.org; Wed, 07 Apr 2010 12:15:27 -0400
Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43)
	id 1NzXuY-0003yN-NV
	for bug-gnu-emacs@HIDDEN; Wed, 07 Apr 2010 12:15:26 -0400
Received: from [140.186.70.92] (port=41020 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1NzXuX-0003xB-15
	for bug-gnu-emacs@HIDDEN; Wed, 07 Apr 2010 12:15:26 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00
	autolearn=unavailable version=3.3.0
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69)
	(envelope-from <goeran@HIDDEN>) id 1NzXuV-0004yJ-05
	for bug-gnu-emacs@HIDDEN; Wed, 07 Apr 2010 12:15:24 -0400
Received: from smtprelay-h22.telenor.se ([195.54.99.197]:36243)
	by eggs.gnu.org with esmtp (Exim 4.69)
	(envelope-from <goeran@HIDDEN>) id 1NzXuU-0004xg-N0
	for bug-gnu-emacs@HIDDEN; Wed, 07 Apr 2010 12:15:22 -0400
Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165])
	by smtprelay-h22.telenor.se (Postfix) with ESMTP id 2F52BC3DC
	for <bug-gnu-emacs@HIDDEN>; Wed,  7 Apr 2010 18:15:17 +0200 (CEST)
X-SENDER-IP: [83.227.168.100]
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApZeAJ9MvEtT46hkPGdsb2JhbACED4NVh3EBi0sMAQEBATUtvFGFCQQ
X-IronPort-AV: E=Sophos;i="4.51,379,1267398000"; d="scan'208";a="60743808"
Received: from ua-83-227-168-100.cust.bredbandsbolaget.se (HELO
	mimmi.uddeborg.se) ([83.227.168.100])
	by ipb2.telenor.se with ESMTP; 07 Apr 2010 18:15:17 +0200
Received: from freddi.uddeborg (freddi.uddeborg [172.17.0.3])
	by mimmi.uddeborg.se (8.14.3/8.14.3) with ESMTP id o37GFETI010548
	for <bug-gnu-emacs@HIDDEN>; Wed, 7 Apr 2010 18:15:15 +0200
Received: from freddi.uddeborg (localhost.localdomain [127.0.0.1])
	by freddi.uddeborg (8.14.3/8.14.2) with ESMTP id o37GFE9U010062
	for <bug-gnu-emacs@HIDDEN>; Wed, 7 Apr 2010 18:15:14 +0200
Received: (from goeran@localhost)
	by freddi.uddeborg (8.14.3/8.14.2/Submit) id o37GFETu010061;
	Wed, 7 Apr 2010 18:15:14 +0200
Date: Wed, 7 Apr 2010 18:15:14 +0200
Message-Id: <201004071615.o37GFETu010061@HIDDEN>
From: =?utf-8?Q?G=C3=B6ran_Uddeborg?= <goeran@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 23.1; Incorrect references in ses-mode
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6,
	seldom 2.4 (older, 4)
X-Spam-Score: -6.6 (------)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 07 Apr 2010 12:25:00 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.11
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/pipermail/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.6 (------)

I discovered this when emacs sometimes complains that I have circular
references in ses-mode files where there shouldn't be any.  When
investigating the ses file I've noticed some cells contain references
that are incorrect.  When I remove these incorrect references, the
complaints about circular references go away, so I strongly suspect
the problems are related.  And even if I'm wrong, the incorrect
references is a bug.

While I haven't been able to create a simple test case where I get a
circular reference complaint, I can easily get to a state where there
are incorrect references.  Create a ses file with these keystrokes:

    C-x C-f s . s e s <return> <tab> 1 <return> C-o 2 <return>
    <tab> <left> ( + SPC B 1 SPC A 2 <return>
    C-n C-o 3 <return> ( + SPC B 2 SPC A 3 <return> C-a
    C-o 4 <return> C-p C-SPC C-f M-w C-n C-b C-y C-n C-y
    C-x C-s

In the resulting file, cell B2 has cell B4 incorrectly listed among
its references:

    (ses-cell B2 3 (+ B1 A2) nil (B3 B4))

Only B3 does actually reference B2.


In GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.18.3)
 of 2009-12-02 on x86-3.fedora.phx.redhat.com
Windowing system distributor `Fedora Project', version 11.0.10705000
configured using `configure  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-dbus' '--with-gif' '--with-jpeg' '--with-png' '--with-rsvg' '--with-tiff' '--with-xft' '--with-xpm' '--with-x-toolkit=gtk' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-DMAIL_USE_LOCKF -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: sv_SE.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: SES

Minor modes in effect:
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<tab> 1 <tab> <backspace> <return> C-o 2 <return> <tab> 
<left> ( + SPC B 1 SPC A 2 <return> <return> <return> 
C-n C-o 3 <return> ( + SPC B 2 SPC A 3 <return> C-n 
C-o C-p C-o 4 <return> C-p C-SPC C-f M-w C-n C-b C-y 
C-n C-y C-x C-s <help-echo> M-x r e p o r t - e m a 
c s - b u g <return>

Recent messages:
  [2 times]
Yanking...done
Mark set
Yanking...done
  [2 times]
Yanking...done
  [2 times]
Yanking...done
Saving file /home/g=f6ran/x.ses...
Wrote /home/g=f6ran/x.ses





Acknowledgement sent to Göran Uddeborg <goeran@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs@HIDDEN:
bug#5852; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 2 Aug 2021 21:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.