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: Stuart D. Herring
Subject: Re: A few questions about desktop.el
Date: Fri, 28 Apr 2006 21:57:25 -0700 (PDT)
User-agent: SquirrelMail/1.4.3a-11.EL3

>  - Emacs process the desktop file, loading buffers and all, and only
> then asks about it being in use. Can this be changed so the question
> is asked at the beginning? (I imagine this could be difficult because
> of the way the desktop file is loaded.)

Well, the reason for it is really quite simple in my implementation -- the
use tag is added at the end of the file!  The other code has already run. 
Doing it this way let me do the file update with a single `write-region'
append call.  But (see other email) Richard wants that done in a separate
file, and I don't blame him.  So I'll move the check before the desktop
file is ever opened when I do that (Monday or so).

>   - If you decide *not* to load the desktop file in use, on exit
> you're still asked about saving a new desktop file; at least, for
> certain values of `desktop-save'. My main use case is that I'm
> starting a fresh Emacs by accident (I have Emacs on another virtual
> desktop, or just too many open apps), and I'm going to do C-x C-c
> immediately, so it's a bit cumbersome to "M-x set-variable
> desktop-save nil RET". Perhaps a  desktop-not-loaded-hook could be
> useful there.

I thought this was buggy when I first saw it too.  But I realized that
there's no assumption made by desktop.el that you have only one file; just
because this Emacs session isn't associated with the desktop file you
originally tried to load doesn't mean it shouldn't be associated with
another.  But since it doesn't know which other one, it asks!  It's really
a feature... sorta.  I realize that for the common "oh wait, already have
Emacs" case, it's annoying; there could be a customization option to
disable Desktop if you refuse to re-load the file.

I might point out, though, that I've carefully written it so that if you
attempt to overwrite the file that you chose not to load (typically just
pressing Enter when it offers "~/" as the save location) it'll note that
you're overwriting a file that you didn't load, and if you decline to
overwrite it, Emacs will still exit.  Admittedly, this is still annoying,
but pressing C-x C-c RET n o RET is a lot faster than doing
`set-variable'.

>   - Not a problem with your implementation, but on Windows, using
> gnuserv/gnuclient, the second Emacs instance shows a message "Server
> subprocess exited" (because it wasn't able to run gnuserv a second
> time) which hides the desktop question...

Pressing C-l will clear this up, so long as you realize that you're in the
minibuffer and need it redrawn.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.




reply via email to

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