[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
save-excursion and multi-thread?
From: |
Qiantan Hong |
Subject: |
save-excursion and multi-thread? |
Date: |
Sun, 26 Sep 2021 17:41:17 +0000 |
I tried
(make-thread
(lambda ()
(save-excursion (goto-char (point-min)) (sleep-for 1))))
In *scratch*.
It seems that after the thread yields (because of sleep-for)
it doesn’t restore point position, and after 1 second
cursor is reseted to the original position, discarding
any of my movements during this 1 second.
Is this how save-excursion supposed to work?
It’s inconsistent with the behavior of special variable + dynamic bindings,
which works currently under multi-thread.
What’s the supposed way to have “thread-local” movements?
Best,
Qiantan
- save-excursion and multi-thread?,
Qiantan Hong <=
- Re: save-excursion and multi-thread?, Eli Zaretskii, 2021/09/26
- Re: save-excursion and multi-thread?, Qiantan Hong, 2021/09/26
- Re: save-excursion and multi-thread?, Qiantan Hong, 2021/09/26
- Re: save-excursion and multi-thread?, Eli Zaretskii, 2021/09/26
- Re: save-excursion and multi-thread?, Qiantan Hong, 2021/09/26
- Re: save-excursion and multi-thread?, Eli Zaretskii, 2021/09/26
- Re: save-excursion and multi-thread?, Qiantan Hong, 2021/09/26