bug-gnu-emacs
[Top][All Lists]
Advanced

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

blast, overwrote another forgotten *compilation* buffer


From: Dan Jacobson
Subject: blast, overwrote another forgotten *compilation* buffer
Date: 26 Dec 2001 16:13:53 +0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

Gentlemen, I have thought up a bad "shituation": You start one of
those 3 hour M-x compile jobs.  You go to the disco and come back and
it's 5 hours later and you forgot and you do some other puny M-x
compile job, which overwrites all that hard-earned info in the
*compilation* buffer.  It's like drat^2.

[note: we are talking about fear of overwriting a *compilation* buffer
_after_ a compilation has already stopped.  If we do this when a
compilation is still running, we are duly warned (as it will ruin the
compilation itself, not just the buffer record), _but_ not after a
compilation has stopped.]

OK, 1. yes I could have redirected the output, renamed the buffer,
etc. etc. but the point is __I didn't think I would forget when I
started__

2. in Help we notice
        The name used for the buffer is actually whatever is returned by
        the function in `compilation-buffer-name-function', so you can set that
        to a function that generates a unique name.

This sounds like a way to avoid the problem...

Hmmm... I know: make unique *compilation* buffers one per
directory.... one probably wouldn't have 2 makefiles in the same
directory... [at least simple me].  Also, a simple "M-x compile
date" would be enough to wipe it out if done in the same current
directory.

OK, fellas, so, need a child-guard cap so as not to overwrite
forgotten *compilation* buffers.

Another method would be to ask in cases when the last *compilation*
buffer hasn't been looked at yet and we want to start a new
compilation... but maybe I did indeed look at it but something else
came up and i switched buffers and forgot about it.

Another method is to make unique names for each compilation, perhaps
with the time and directory in them, via
compilation-buffer-name-function ... but that might leave emacs
cluttered with useless buffers... hmm, but I don't feel that bad about
all those *sent mail* buffers...

[Mom says I'm management material because I always report top
[surface] level bugs whilst never getting my hands dirty with actual
coding :-)]

By the way, there also then is the problem of the default compile
command prompting with the last compile command done by
default... perhaps this history should be separate for separate
compile commands run in different directories.

And then what of course if emacs dies, are *compilation* buffers worth
doing autosaves by default... probably not, as you've got bigger
problems to deal with.  However, in normal circumstances perhaps we
still can have one of those futuristic voices appear, upon exit-emacs
"Sir, you have a *compilation* buffer that you may not have looked at
yet, do you really want to exit emacs?" ... [you know like the HAL
2001 movie computer voice]
-- 
http://www.geocities.com/jidanni/ Tel+886-4-25854780



reply via email to

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