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: Tue, 2 May 2006 08:42:18 -0700 (PDT)
User-agent: SquirrelMail/1.4.3a-11.EL3

>> It seems to me that
>> (add-hook 'desktop-not-loaded-hook (lambda () (setq desktop-save nil)))
>> ...would be cumbersome (especially for non-Lispy users).
>
> You could always do M-x customize-variable desktop-not-loaded-hook,
> couldn't you?

Hey, you're right -- the answer is to give (the new, trivial function)
`disable-desktop-save-mode' as an :option in the defcustom for
`desktop-not-loaded-hook'.

>> Is there any
>> other use for such a hook (maybe `kill-emacs'? ;)
>
> Certainly, running an external app (likely gnuclient) to bring the
> other Emacs instance to focus and then killing the current one would
> be my first use, yes.

I'll also put `save-buffers-kill-emacs' in the :options.

>> Or instead to ask,
>> when the user chooses to honor a lock, whether to then disable Desktop?
>
> I hate being asked (by a program :-) about things that could be automated.

The only problem I see is how to inform the user (aside from etc/NEWS)
that the hook exists, since the behavior with it uncustomized can be
annoying but it's not an obvious customization locus.  Certainly it could
be given an obnoxious default value like
'(announce-the-presence-of-this-hook), but that's silly.  Any ideas?

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]