[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A few questions about desktop.el
From: |
Juri Linkov |
Subject: |
Re: A few questions about desktop.el |
Date: |
Mon, 11 Jun 2007 23:54:57 +0300 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
>> Overwriting the desktop of another Emacs instance is not a good thing to do.
>
> Well, that's exactly what happens without this patch.
>
>> Not writing the desktop would be acceptable if it displayed a message
>> about this failure.
>
> What is the exact use case?
Something like a message saying "Can't write the desktop because it is
locked by another Emacs instance". Not a good solution either.
>> Another alternative is to write the desktop file with a different name.
>
> You can already do that, with or without the patch. The patch offers
> you the alternative of detecting the conflict when you run the second
> Emacs instance, so you chose not to load the desktop, and then
> manually set another name for it or create it in another directory.
But this requires complicate configuration on the user's part.
>> All on all, we could leave this to the user's discretion. The user
>> should be careful about not creating a configuration where two Emacs
>> instances automatically write to the same file.
>
> I'm not sure what this means: are you proposing not installing the
> patch? Because the point (to me anyway) is not having a configuration
> where two instances write to the same file, but detecting the case
> when that happens by accident.
No, I propose installing this patch. I had only doubts how it would
behave with my configuration. But with the functions Davis implemented
in his patch, it is easy to write a configuration which won't fail, e.g.:
(unless (desktop-owner)
(run-at-time 3600 3600 'desktop-save "~"))
that starts automatic saving only when the desktop is not locked in
another Emacs session.
> The patch is very useful and works quite well (though I've added it an
> option to configure whether the second instance should automatically
> overwrite a conflicting desktop file, automatically skip loading it,
> or ask the user, instead of always asking as Davis' original patch
> does).
Such an option would be useful.
> I propose installing it and seeing what other people thinks of it.
I agree.
--
Juri Linkov
http://www.jurta.org/emacs/