home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / emacs / help / 3517 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.5 KB  |  45 lines

  1. Newsgroups: gnu.emacs.help
  2. Path: sparky!uunet!munnari.oz.au!manuel!newshost!smith
  3. From: smith@pell.anu.edu.au (Michael Smith)
  4. Subject: Re: Save *scratch* on exit (Was Re: #XXX# file remains ...)
  5. In-Reply-To: dodd@mycenae.cchem's message of 27 Jul 92 08:36:27
  6. Message-ID: <SMITH.92Jul28093103@lamb.anu.edu.au>
  7. Followup-To: gnu.emacs.help
  8. Lines: 23
  9. Sender: news@newshost.anu.edu.au
  10. Organization: Australian National University
  11. References: nickel@cs.tu-berlin.DE (Juergen Nickelsen)
  12.     <NICKEL.92Jul26152853@desaster.cs.tu-berlin.de>
  13.     <DODD.92Jul27083627@mycenae.cchem>
  14. Date: 28 Jul 92 09:31:03
  15.  
  16.  
  17.  > >>>>>(Juergen Nickelsen) said:
  18.  > > On a related issue, I think someone a while back asked how one can
  19.  > > get emacs to ask the user about saving *scratch* buffers when
  20.  > > exiting emacs.
  21.  
  22.  >   Juergen> Put the following into your ~/.emacs:
  23.  
  24.  >   Juergen> (save-excursion
  25.  >   Juergen>   (set-buffer "*scratch*")
  26.  >   Juergen>   (setq buffer-file-name "~/*scratch*"))
  27.  
  28.  > This seems to work great for *scratch* but is there a way to set it up for all
  29.  > buffers not attached to files?
  30.  
  31. Yes. Just issue the following command (in your .emacs for example)
  32.  
  33.     (set-default 'buffer-offer-save t)
  34.  
  35. Consult the documentation of 'buffer-offer-save.
  36.  
  37. Cheers,
  38.     Michael
  39. --
  40. ------------------------------------------------------------------------------
  41.                  /| |  | |  |    Michael Smith
  42.                 /_| |\ | |  |    Mathematics Research Section
  43. smith@pell.anu.edu.au       /  | | \| |_/|    Australian National University
  44. ------------------------------------------------------------------------------
  45.