unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Vincent Belaïche" <vincent.belaiche@gmail.com>
To: Lars Ingebrigtsen <larsi@gnus.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5852@debbugs.gnu.org,
	"Vincent Belaïche" <vincentbelaiche@orange.fr>,
	"Stefan Kangas" <stefan@marxist.se>,
	"Göran Uddeborg" <goeran@uddeborg.se>
Subject: bug#5852: 23.1; Incorrect references in ses-mode
Date: Sun, 25 Jul 2021 19:27:21 +0200	[thread overview]
Message-ID: <CAPAOBV-O=Ev5=FBJxpOjQVOW5Jf9aVwpUyQ27S=39rsH0cw7bw@mail.gmail.com> (raw)
In-Reply-To: <8735s2zydl.fsf@gnus.org>

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 …

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…), is retrieved from a property of the
cell symbol, so things are a bit intricate …

  Vincent.



Le dim. 25 juil. 2021 à 08:44, Lars Ingebrigtsen <larsi@gnus.org> a écrit :
>
> Vincent Belaïche <vincent.belaiche@gmail.com> 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





  reply	other threads:[~2021-07-25 17:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-07 16:15 bug#5852: 23.1; Incorrect references in ses-mode Göran Uddeborg
2020-02-29  3:14 ` Stefan Kangas
2020-02-29 20:13   ` Vincent Belaïche
2021-07-18 13:36     ` Lars Ingebrigtsen
2021-07-24 21:46       ` Vincent Belaïche
2021-07-25  5:48         ` Vincent Belaïche
2021-07-25  5:56           ` Vincent Belaïche
2021-07-25  6:17             ` Vincent Belaïche
2021-07-25  6:18               ` Vincent Belaïche
2021-07-25  6:32                 ` Vincent Belaïche
2021-07-25  6:38                   ` Vincent Belaïche
2021-07-25  6:44                     ` Lars Ingebrigtsen
2021-07-25 17:27                       ` Vincent Belaïche [this message]
2021-07-30 21:01                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-08-02 21:02                           ` Vincent Belaïche
2023-12-29 12:03                       ` Vincent Belaïche
2023-12-29 12:36                         ` Stefan Kangas
2023-12-29 14:19                           ` Eli Zaretskii
2023-12-29 15:19                             ` Vincent Belaïche
2023-12-29 22:01                         ` Göran Uddeborg
2024-01-14 13:17 ` Mattias Engdegård
2024-01-14 13:35   ` Mattias Engdegård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPAOBV-O=Ev5=FBJxpOjQVOW5Jf9aVwpUyQ27S=39rsH0cw7bw@mail.gmail.com' \
    --to=vincent.belaiche@gmail.com \
    --cc=5852@debbugs.gnu.org \
    --cc=goeran@uddeborg.se \
    --cc=larsi@gnus.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=stefan@marxist.se \
    --cc=vincentbelaiche@orange.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).