From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Newsgroups: gmane.emacs.bugs Subject: bug#5852: 23.1; Incorrect references in ses-mode Date: Sun, 25 Jul 2021 07:48:55 +0200 Message-ID: References: <845zfpi242.fsf@gmail.com> <871r7vrbez.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4423"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , Vincent =?UTF-8?Q?Bela=C3=AFche?= , 5852@debbugs.gnu.org, =?UTF-8?Q?G=C3=B6ran?= Uddeborg To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 25 07:50:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7X1c-0000x4-SU for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 07:50:08 +0200 Original-Received: from localhost ([::1]:36514 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7X1b-0002wj-E4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 25 Jul 2021 01:50:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39758) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7X1W-0002wZ-C4 for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 01:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:35808) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7X1W-0001mp-2Y for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 01:50:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7X1V-0006ow-W9 for bug-gnu-emacs@gnu.org; Sun, 25 Jul 2021 01:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Vincent =?UTF-8?Q?Bela=C3=AFche?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 05:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 5852 X-GNU-PR-Package: emacs Original-Received: via spool by 5852-submit@debbugs.gnu.org id=B5852.162719215626152 (code B ref 5852); Sun, 25 Jul 2021 05:50:01 +0000 Original-Received: (at 5852) by debbugs.gnu.org; 25 Jul 2021 05:49:16 +0000 Original-Received: from localhost ([127.0.0.1]:47354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7X0m-0006nk-CI for submit@debbugs.gnu.org; Sun, 25 Jul 2021 01:49:16 -0400 Original-Received: from mail-pl1-f182.google.com ([209.85.214.182]:41944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7X0j-0006nU-Ce for 5852@debbugs.gnu.org; Sun, 25 Jul 2021 01:49:15 -0400 Original-Received: by mail-pl1-f182.google.com with SMTP id e14so7933038plh.8 for <5852@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) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:210676 Archived-At: 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 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 a = =C3=A9crit : > > > > Vincent Bela=C3=AFche 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