[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LOCK-BUFFER when two buffer visits the same buffer
From: |
Eli Zaretskii |
Subject: |
Re: LOCK-BUFFER when two buffer visits the same buffer |
Date: |
Sat, 11 Dec 2021 13:39:29 +0200 |
> From: Qiantan Hong <qhong@mit.edu>
> Date: Sat, 11 Dec 2021 10:00:00 +0000
> Accept-Language: en-US
>
> I do lock-buffer in the first buffer, then in the second buffer,
> and I killed the second buffer, the lock is gone — even it seems
> that buffer one should hold the lock!
lock-buffer doesn't support what you are evidently trying to do. Its
intended use is to prevent simultaneous modifications of a file by two
users, or by a single user from two separate instances of Emacs. You
want reference counting (and probably also locking the file in the
filesystem), and that isn't supported.