[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: save-excursion and multi-thread?
From: |
Richard Stallman |
Subject: |
Re: save-excursion and multi-thread? |
Date: |
Fri, 01 Oct 2021 18:35:42 -0400 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> IIUC what you mean by "keep ... point alone", this already happens.
> (But not for mark: for that, you need save-mark-and-excursion
> nowadays.) That is, when the save-excursion form is exited, point is
> guaranteed to be where it was when we entered save-excursion.
That's half of it. The other half of what I had in mind is that
changes in point, in other threads, should not affect point inside the
save-excursion form in this thread.
> Note that this might expose background point movements to the user,
> depending on which thread runs redisplay.
I see what you are getting at -- but I think it would be good to
make this controllable.
One idea: perhaps there should be a way to control which thread's
context redisplay should occur in. Perhaps on a per-window basis.
Perhaps each window should be "owned" by a thread, so that point for
that window will be displayed wherever that thread puts it. If we can
make this happen by default in a way that is usually right, it might
not take much additional work. Perhaps the default should be
whichever thread last operated on it, in some sense.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)