emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A few questions about desktop.el


From: Richard M. Stallman
Subject: Re: A few questions about desktop.el
Date: Wed, 27 Jul 2005 23:20:46 -0400

    It'd be very useful to try to detect it and at least stop the second
    instance from loading and using the desktop file if it's already in
    use. There's no way to do that from Emacs, is there?

It needs to use file-locking together with testing of the file modtime.
There are primitives to do this: lock-file and unlock-file,
and file-attributes.  So when you restore an old desktop, you
record the modtime of the file.  When you update the desktop file,
you lock it, them see if its modtime is the same as it was
when you restored the desktop.  If not, you do whatever.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]