[OS X Emacs] Warning: Desktop file appears to be in use by PID ...

Hofert Jan Marius marius.hofert at math.ethz.ch
Thu Sep 22 02:23:56 EDT 2011


Dear Jack (and others),

A couple of minutes ago, I had an .R file running and it took far too long so I decided to kill it. Since I don't know (so far) how to properly stop a running R process, I used "Force kill" for Aquamacs in the dock. After a new start, the warning then showed up again. But choosing "yes" opened Aquamacs without flaws and all previously opened buffers opened again. I then quit normally and reopened Aquamacs and the warning wasn't there. So maybe it only appears after a hard kill [which one shouldn't do anyway].

Cheers,

Marius

On 2011-09-20, at 24:35 , Hofert Jan Marius wrote:

> 
> On 2011-09-19, at 20:36 , Jack Repenning wrote:
> 
>> On Sep 19, 2011, at 1:07 AM, Hofert Jan Marius wrote:
>> 
>>>> If you have some need to shut down without answering questions, then set desktop-save to t rather than 'ask or several other possibilities (again, the Customize menu is probably the easiest path).
>>> 
>>> okay, I will do that. 
>> 
>> Since  you report that you do, at least sometimes, get some sort of question, this is a very promising change, and may solve the whole problem for you.
> 
> Dear Jack,
> 
> thanks again. I try the new setup for a couple of days and get back to you in case the warning appears again. 
> 
>> 
>>>> Also, be sure that desktop-dirname and desktop-base-file-name are set sensibly.
>>> 
>>> the entry "Desktop Base File Name" says ".emacs.desktop". I couldn't find an entry for desktop-dirname. I tried to search for it via "C-h a", but there were no matches. How can I display that?
>> 
>> Try "C-h v" (describe-variable), since this is a variable. By default (and so, probably in your case), "C-h a" is "command-apropos," only shows you commands, not variables.
> 
> thanks a lot, I could check that desktop-dirname is set to "/Users/mhofert/" which seems reasonable [my home folder]
> 
>> 
>>> I also just saw this: http://www.emacswiki.org/emacs/DeskTop
>>> There is a section called "Auto-Saving the Desktop". Is this a good defun to use? 
>> 
>> There's some interesting stuff there, particularly in your context the "Stale Locks" stuff, but the dependence on "defadvice" is a red flag for the novice user. At the least, I'd suggest you not go there until you're sure the desktop-save change is inadequate.
>> 
>> (Here's why I warn against defadvice: the "advice" mechanism is a way to modify Elisp functions, without changing their actual text. So, for example, the "Stale Locks" example you cited has a "defadvice desktop-owner ... after ...." That means "change the existing desktop-owner function, so that this other code runs after the official version is done." There are also "before" and "around" structures available. There are several red flags here. For one, if you've "advised" a function and then ask for help because it's not behaving as expected, you're not likely to recall making that change, and someone trying to help you is likely to bust their brains trying to figure out why these other things are happening that just aren't in the function definition. As well, there are some tricky bits about loading functions and then defining them, which ultimately mean that there's a new failure mode possible: sometimes, it might happen that your advice gets applied,  sometimes not, and that's another big pain-in-the for debugging. And of course, there's always the possibility that the advised code itself has a bug.)
> 
> Nice explanation. Thanks.
> 
> Cheers,
> 
> Marius
> 
> 
>> 
>> -==-
>> Jack Repenning
>> Technologist
>> CollabNet Cloud Services
>> CollabNet, Inc.
>> 8000 Marina Boulevard, Suite 600
>> Brisbane, California 94005
>> office: +1 650.228.2562
>> twitter: http://twitter.com/jrep
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> _____________________________________________________________
>> MacOSX-Emacs mailing list
>> MacOSX-Emacs at email.esm.psu.edu
>> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
>> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx
> 
> ETH Zurich
> Dr. Marius Hofert
> RiskLab, Department of Mathematics
> HG E 65.2
> Rämistrasse 101
> 8092 Zurich
> Switzerland
> 
> Phone +41 44 632 2423
> marius.hofert at math.ethz.ch
> http://www.math.ethz.ch/~hofertj
> 
> _____________________________________________________________
> MacOSX-Emacs mailing list
> MacOSX-Emacs at email.esm.psu.edu
> http://email.esm.psu.edu/mailman/listinfo/macosx-emacs
> List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx

ETH Zurich
Dr. Marius Hofert
RiskLab, Department of Mathematics
HG E 65.2
Rämistrasse 101
8092 Zurich
Switzerland

Phone +41 44 632 2423
marius.hofert at math.ethz.ch
http://www.math.ethz.ch/~hofertj




More information about the MacOSX-Emacs mailing list