[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LOCK-BUFFER when two buffer visits the same buffer
From: |
Tassilo Horn |
Subject: |
Re: LOCK-BUFFER when two buffer visits the same buffer |
Date: |
Sat, 11 Dec 2021 12:29:48 +0100 |
User-agent: |
mu4e 1.7.5; emacs 29.0.50 |
Qiantan Hong <qhong@mit.edu> writes:
> 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!
More details, please. Do you just call (lock-buffer) or (lock-buffer
"~/file")? One emacs instance or two?
As I understand the docs, file locks are not associated with a buffer
but the emacs instance and (lock-buffer) is just a shorthand for
(when (buffer-modified-p)
(lock-file (buffer-file-name)))
Bye,
Tassilo