[comp.emacs] Gnu backup files

creps@silver.bacs.indiana.edu (Steve Creps) (01/03/88)

    Does anyone know if there is a way to tell Gnu Emacs not to create
 a backup file? That is, when you save "file" it renames the last version
 of it to "file~". I'm looking for an option or flag to tell Gnu not to
 do this, just leave the new version.

-	-	-	-	-	-	-	-	-
Steve Creps on the VAX 8650 running Ultrix 2.0-1 at Indiana University.
	creps@silver.bacs.indiana.edu
"F-14 Tomcat! There IS no substitute."

karl@tut.cis.ohio-state.edu (Karl Kleinpaste) (01/04/88)

creps@silver.bacs.indiana.edu writes:
       Does anyone know if there is a way to tell Gnu Emacs not to create
    a backup file?

Try
	M-x apropos RET backup RET
and then
	C-h v make-backup-files
and
	C-h v version-control
-- 
Karl

ugkevink@sunybcs.uucp (Kevin Kubek) (01/04/88)

In article <595@silver.bacs.indiana.edu> creps@silver.UUCP (Steve Creps) writes:
>
>    Does anyone know if there is a way to tell Gnu Emacs not to create
> a backup file? That is, when you save "file" it renames the last version
> of it to "file~". I'm looking for an option or flag to tell Gnu not to
> do this, just leave the new version.
>
>-	-	-	-	-	-	-	-	-

make-backup-files's value is t

Documentation:
*Create a backup of each file when it is saved for the first time.
This can be done by renaming the file or by copying.

Renaming means that Emacs renames the existing file so that it is a
backup file, then writes the buffer into a new file.  Any other names
that the old file had will now refer to the backup file.
The new file is owned by you and its group is defaulted.

Copying means that Emacs copies the existing file into the backup file,
then writes the buffer on top of the existing file.  Any other names
that the old file had will now refer to the new (edited) file.
The file's owner and group are unchanged.

The choice of renaming or copying is controlled by the variables
backup-by-copying, backup-by-copying-when-linked and
backup-by-copying-when-mismatch.
------------------------------------------------------------------------
Kevin Kubek                               SUNY/Buffalo Computer Science
UUCP:          	  ..!{ames,boulder,decvax,rutgers}!sunybcs!ugkevink
Internet: ugkevink@cs.Buffalo.EDU	BITNET: ugkevink@sunybcs.BITNET

loafman@convex.UUCP (01/05/88)

Steve,

In your .emacs config file enter the following:

(setq make-backup-files nil)

That will turn off the making of backup files.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kenneth W. Loafman @ CONVEX Computer Corp, Dallas, Texas | All opinions
Voice:	  work: (214) 952-0829  home: (214) 964-1250     | are my own,
USPSnail: 1705 Coit Rd #2101, Plano, Tx 75075		 | of course.
UUCP:	  ihnp4!convex!loafman				 |        ...KWL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

wombat@ccvaxa.UUCP (01/05/88)

You might try adding (setq buffer-backed-up t) to find-file-hooks. I
have a nosave mode I use when looking at large logfiles on crowded
filesystems that uses this.

  "I think you should kill him and eat his brain," Mr. Frostee said quickly.
  "That's not the answer to *every* problem in interpersonal relations,"
Cobb said.				*Software*, Rudy Rucker
	Wombat	ihnp4!uiucdcs!ccvaxa!wombat, wombat@gswd-vms.Gould.COM

nate@cpocd2.UUCP (Nathan Hess) (01/08/88)

In article <595@silver.bacs.indiana.edu> creps@silver.UUCP (Steve Creps) writes:
>    Does anyone know if there is a way to tell Gnu Emacs not to create
> a backup file? That is, when you save "file" it renames the last version
> of it to "file~". I'm looking for an option or flag to tell Gnu not to
> do this, just leave the new version.

When your current buffer is the one you don't want a backup file for,
try the following:

M-x set-variable RET make-backup-files RET nil RET

This should do the trick.
--woodstock

P.S.  Here is a portion of the GNU Emacs manual that talks about the
appropriate variable:

[ Copyright (C) 1986, 1987 by Free Software Foundation, Inc. ]

Backup Files
------------

  Because Unix does not provide version numbers in file names, rewriting a
file in Unix automatically destroys all record of what the file used to
contain.  Thus, saving a file from Emacs throws away the old contents of
the file---or it would, except that Emacs carefully copies the old contents
to another file, called the "backup" file, before actually saving.
(Provided the variable `make-backup-files' is non-`nil'.
Backup files are not written if this variable is `nil').
-- 
	   "How did you get your mind to tilt like your hat?"

...!{decwrl|hplabs!oliveb|pur-ee|qantel|amd}!intelca!mipos3!cpocd2!nate
<domainish> :   nate@cpocd2.intel.com		ATT :    (602) 961-2037