* Protecting buffers which aren't visiting files
@ 2010-10-24 12:01 Otto Maddox
2010-10-25 15:28 ` Andrea Crotti
2010-10-25 16:24 ` Arnaldo Mandel
0 siblings, 2 replies; 7+ messages in thread
From: Otto Maddox @ 2010-10-24 12:01 UTC (permalink / raw
To: help-gnu-emacs
I use a lot of scratch buffers (which don't visit files), and I've lost
a lot of work due to accidentally quitting Emacs or killing those
buffers, because Emacs doesn't ask for confirmation. Is there a way of
configuring Emacs to treat buffers which don't visit files the same way
as file-visiting buffers, for this situation?
Thanks.
--
http://www.fastmail.fm - Email service worth paying for. Try it for free
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Protecting buffers which aren't visiting files
[not found] <mailman.8.1288013451.788.help-gnu-emacs@gnu.org>
@ 2010-10-25 13:41 ` Pascal J. Bourguignon
2010-12-09 22:15 ` Drew Adams
2010-10-25 14:04 ` Ralf Fassel
1 sibling, 1 reply; 7+ messages in thread
From: Pascal J. Bourguignon @ 2010-10-25 13:41 UTC (permalink / raw
To: help-gnu-emacs
"Otto Maddox" <ottomaddox@fastmail.fm> writes:
> I use a lot of scratch buffers (which don't visit files), and I've lost
> a lot of work due to accidentally quitting Emacs or killing those
> buffers, because Emacs doesn't ask for confirmation. Is there a way of
> configuring Emacs to treat buffers which don't visit files the same way
> as file-visiting buffers, for this situation?
I just create scratch _files_.
C-x C-f scratch1.txt RET
^
instead of:
C-x b scratch1.buf RET
--
__Pascal Bourguignon__ http://www.informatimago.com/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Protecting buffers which aren't visiting files
[not found] <mailman.8.1288013451.788.help-gnu-emacs@gnu.org>
2010-10-25 13:41 ` Pascal J. Bourguignon
@ 2010-10-25 14:04 ` Ralf Fassel
1 sibling, 0 replies; 7+ messages in thread
From: Ralf Fassel @ 2010-10-25 14:04 UTC (permalink / raw
To: help-gnu-emacs
* "Otto Maddox" <ottomaddox@fastmail.fm>
| buffers, because Emacs doesn't ask for confirmation. Is there a way of
| configuring Emacs to treat buffers which don't visit files the same way
| as file-visiting buffers, for this situation?
See variable 'buffer-offer-save':
Documentation:
Non-nil in a buffer means always offer to save buffer on exit.
Do so even if the buffer is not visiting a file.
HTH
R'
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Protecting buffers which aren't visiting files
2010-10-24 12:01 Protecting buffers which aren't visiting files Otto Maddox
@ 2010-10-25 15:28 ` Andrea Crotti
2010-10-25 15:37 ` Jeff Rancier
2010-10-25 16:24 ` Arnaldo Mandel
1 sibling, 1 reply; 7+ messages in thread
From: Andrea Crotti @ 2010-10-25 15:28 UTC (permalink / raw
To: help-gnu-emacs
"Otto Maddox" <ottomaddox@fastmail.fm> writes:
> I use a lot of scratch buffers (which don't visit files), and I've lost
> a lot of work due to accidentally quitting Emacs or killing those
> buffers, because Emacs doesn't ask for confirmation. Is there a way of
> configuring Emacs to treat buffers which don't visit files the same way
> as file-visiting buffers, for this situation?
>
> Thanks.
Actually I also did but nothing important luckily, I always saved
somewhere before...
I can't find any but there should be a variable somewhere to set this.
And I also always thought that those scratch buffers where saved
somewhere in /tmp, but I can't find that either...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Protecting buffers which aren't visiting files
2010-10-25 15:28 ` Andrea Crotti
@ 2010-10-25 15:37 ` Jeff Rancier
0 siblings, 0 replies; 7+ messages in thread
From: Jeff Rancier @ 2010-10-25 15:37 UTC (permalink / raw
To: Andrea Crotti, help-gnu-emacs
Can you configure 'desktop' to save these buffers?
----- Original Message ----
From: Andrea Crotti <andrea.crotti.0@gmail.com>
To: help-gnu-emacs@gnu.org
Sent: Mon, October 25, 2010 11:28:07 AM
Subject: Re: Protecting buffers which aren't visiting files
"Otto Maddox" <ottomaddox@fastmail.fm> writes:
> I use a lot of scratch buffers (which don't visit files), and I've lost
> a lot of work due to accidentally quitting Emacs or killing those
> buffers, because Emacs doesn't ask for confirmation. Is there a way of
> configuring Emacs to treat buffers which don't visit files the same way
> as file-visiting buffers, for this situation?
>
> Thanks.
Actually I also did but nothing important luckily, I always saved
somewhere before...
I can't find any but there should be a variable somewhere to set this.
And I also always thought that those scratch buffers where saved
somewhere in /tmp, but I can't find that either...
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Protecting buffers which aren't visiting files
2010-10-24 12:01 Protecting buffers which aren't visiting files Otto Maddox
2010-10-25 15:28 ` Andrea Crotti
@ 2010-10-25 16:24 ` Arnaldo Mandel
1 sibling, 0 replies; 7+ messages in thread
From: Arnaldo Mandel @ 2010-10-25 16:24 UTC (permalink / raw
To: help-gnu-emacs
On Sun, Oct 24, 2010 at 10:01 AM, Otto Maddox <ottomaddox@fastmail.fm> wrote:
> I use a lot of scratch buffers (which don't visit files), and I've lost
> a lot of work due to accidentally quitting Emacs or killing those
> buffers, because Emacs doesn't ask for confirmation. Is there a way of
> configuring Emacs to treat buffers which don't visit files the same way
> as file-visiting buffers, for this situation?
There are lots of ways of implementing buffer-saving policies; quite
likely you don't want all
scratch buffers to ask to be saved (as per the buffer-offer-save local
variable).
Look up the command save-some-buffers in the elisp manual for the
route to solving your problem.
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: Protecting buffers which aren't visiting files
2010-10-25 13:41 ` Pascal J. Bourguignon
@ 2010-12-09 22:15 ` Drew Adams
0 siblings, 0 replies; 7+ messages in thread
From: Drew Adams @ 2010-12-09 22:15 UTC (permalink / raw
To: 'Pascal J. Bourguignon', help-gnu-emacs
> I just create scratch _files_.
> C-x C-f scratch1.txt RET
> instead of:
> C-x b scratch1.buf RET
FWIW, me too, most of the time (but typically *.el).
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-09 22:15 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-24 12:01 Protecting buffers which aren't visiting files Otto Maddox
2010-10-25 15:28 ` Andrea Crotti
2010-10-25 15:37 ` Jeff Rancier
2010-10-25 16:24 ` Arnaldo Mandel
[not found] <mailman.8.1288013451.788.help-gnu-emacs@gnu.org>
2010-10-25 13:41 ` Pascal J. Bourguignon
2010-12-09 22:15 ` Drew Adams
2010-10-25 14:04 ` Ralf Fassel
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.