I use Emacs (version 28.1 on Windows 11-64bits) with AUCTeX to work with my LaTeX documents. The directory of files on which I'm working is synchronized in real time with a Dropbox cloud. This means that after each C-x C-s when a given file is saved, there is immediately a synchronization with Dropbox version of that file on the cloud. It seems to me that this synchronization introduces some kind of lock on the given file for a short period of time and because of this, on average, once in three times, right after the file saving, emacs shows automatically the *Warnings* buffer with the following message:

Warning (unlock-file): Unlocking file: Permission denied, C:/Dropbox/Documents/Latex/examples/example-01/auto/example-01.el, ignored Disable showing Disable logging

I clicked on both Disable showing and Disable logging links at the end of the above-mentioned message. But that didn't change anything and Emacs keeps showing me this buffer and each time I have to hide it manually which has become very annoying.

Is there any way to disable this automatic behaviour of the Emacs at least for the current session?

1 Answer 1


If you don't need the creation of lock files you can just disable it completely. This can be done by adding the following line to your .emacs or init.el file:

(setq create-lockfiles nil)

If it is not your case, you can set minimum severity level for displaying the warning buffer to :error or :emergency:

(setq warning-minimum-level :error)

Finally, make sure that both warning-suppress-log-types and warning-suppress-types include the unlock-file type.

(add-to-list 'warning-suppress-log-types '(unlock-file))
(add-to-list 'warning-suppress-types '(unlock-file))
  • Awesome! By setting (setq create-lockfiles nil) the problem was solved. I don't think this should be a problem, given that I work in a mono user environment. Many thanks for your help.
    – user17911
    Sep 10, 2023 at 13:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.