home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / gnu / emacs / help / 3518 < prev    next >
Encoding:
Text File  |  1992-07-27  |  1.6 KB  |  46 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.92Jul28091425@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. Distribution: gnu
  15. Date: 28 Jul 92 09:14:24
  16.  
  17.  
  18.  > >>>>>(Juergen Nickelsen) said:
  19.  > > On a related issue, I think someone a while back asked how one can
  20.  > > get emacs to ask the user about saving *scratch* buffers when
  21.  > > exiting emacs.
  22.  
  23.  >   Juergen> Put the following into your ~/.emacs:
  24.  
  25.  >   Juergen> (save-excursion
  26.  >   Juergen>   (set-buffer "*scratch*")
  27.  >   Juergen>   (setq buffer-file-name "~/*scratch*"))
  28.  
  29.  > This seems to work great for *scratch* but is there a way to set it up for all
  30.  > buffers not attached to files?
  31.  
  32. Yes. Just issue the following command (in your .emacs for example)
  33.  
  34.     (set-default 'buffer-offer-save t)
  35.  
  36. Consult the documentation of 'buffer-offer-save.
  37.  
  38. Cheers,
  39.     Michael
  40. --
  41. ------------------------------------------------------------------------------
  42.                  /| |  | |  |    Michael Smith
  43.                 /_| |\ | |  |    Mathematics Research Section
  44. smith@pell.anu.edu.au       /  | | \| |_/|    Australian National University
  45. ------------------------------------------------------------------------------
  46.