From: Samantha Skyler
Subject: EMACS and .lisp~ files?
Date: 
Message-ID: <7271dfd0.0205240833.7af4671b@posting.google.com>
Hello All,

I'm using Emacs to edit my lisp files.

Anyway, when I save them, Emacs saves both my file (as .lisp) and it
makes another file that seemes to be the same thing, but it ends in
.lisp~

Any one know why this is happening?  Anyway to stop it?  Can I delete
these files?

Thanks

-Samantha

From: Doug McNaught
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <m3r8k1tr8u.fsf@abbadon.mcnaught.org>
··············@hotmail.com (Samantha Skyler) writes:

> Hello All,
> 
> I'm using Emacs to edit my lisp files.
> 
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~
> 
> Any one know why this is happening?  Anyway to stop it?  Can I delete
> these files?

They're backup files.  Emacs creates them when you do a save.  There's
no harm in deleting them.  If you really don't like them, set
make-backup-files to nil in your Emacs.

-Doug
From: Coby Beck
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <RbuH8.130503$GG6.11016041@news3.calgary.shaw.ca>
"Samantha Skyler" <··············@hotmail.com> wrote in message
·································@posting.google.com...
> Hello All,
>
> I'm using Emacs to edit my lisp files.
>
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~
>
> Any one know why this is happening?  Anyway to stop it?  Can I delete
> these files?
>

[btw.  for other specific emacs questions you probably will get better help
from one of the emacs specific news groups]

I believe those are back-up files.  You can delete them after you close
emacs, but I wouldn't mess with them while they may be in use.  I'm sure
that with emacs it is possible to change almost any behaviour but you are
better off to just live with it, those files can save you alot of work in
crash situations.

--
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")
From: Christopher Browne
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <acm3ge$re8e3$2@ID-125932.news.dfncis.de>
Oops! "Coby Beck" <·····@mercury.bc.ca> was seen spray-painting on a wall:
> "Samantha Skyler" <··············@hotmail.com> wrote in message
> ·································@posting.google.com...
>> Hello All,
>>
>> I'm using Emacs to edit my lisp files.
>>
>> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
>> makes another file that seemes to be the same thing, but it ends in
>> .lisp~
>>
>> Any one know why this is happening?  Anyway to stop it?  Can I delete
>> these files?
>>
>
> [btw.  for other specific emacs questions you probably will get better help
> from one of the emacs specific news groups]
>
> I believe those are back-up files.  You can delete them after you close
> emacs, but I wouldn't mess with them while they may be in use.  I'm sure
> that with emacs it is possible to change almost any behaviour but you are
> better off to just live with it, those files can save you alot of work in
> crash situations.

Actually, what gets generated while "in use" are files with names like
#my-lisp-file.lisp# or #foo#.

If there's a crash, there is typically some useful recovery
information in those files.

The foo.lisp~ files are backup copies that are relatively safe to
delete at any point in time.  (Except, of course, just before
realizing you want to use them :-).)

It's a pretty OK idea to make them go away after a while.  I'd suggest
purging them after a few days, rather than _instantly_.
-- 
(concatenate 'string "cbbrowne" ·@acm.org")
http://www.cbbrowne.com/info/emacs.html
Signs  of a Klingon Programmer  -  13. "Our  users will  know fear and
cower before our software! Ship it! Ship it and let them flee like the
dogs they are!"
From: Erik Haugan
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <87vg9ds6i3.fsf@arequipa.haugan.no>
* "Coby Beck" <·····@mercury.bc.ca>
> I believe those are back-up files.  You can delete them after you close
> emacs, but I wouldn't mess with them while they may be in use.

These files are never in use by emacs.  They're written when you save
the buffer, but emacs doesn't care about them after that.

> I'm sure
> that with emacs it is possible to change almost any behaviour but you are
> better off to just live with it, those files can save you alot of work in
> crash situations.

I suspect you confuse backup files with auto save files (those whose
names start and end with a number sign).  The auto save files let you
recover after a crash, while the backup files let you restore the
previous version of a file.
From: Bill Clementson
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <wkn0upv5c8.fsf@attbi.com>
··············@hotmail.com (Samantha Skyler) writes:

> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~
> 
> Any one know why this is happening?  Anyway to stop it?  Can I delete
> these files?

Other responses have shown how you can eliminate these files. An
alternative is to send the backups to a single directory where they
accumulate and can be used (if necessary) or deleted. To do this, put
the following in your .emacs:

;; Specify where backup files are stored
(setq backup-directory-alist (quote ((".*" . "c:/.backups"))))
(defconst use-backup-dir t)

--
Bill Clementson
From: Andy
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <3CEE7598.CE2B6504@smi.de>
Bill Clementson wrote:
> 
> Other responses have shown how you can eliminate these files. An
> alternative is to send the backups to a single directory where they
> accumulate and can be used (if necessary) or deleted. To do this, put
> the following in your .emacs:
> 
> ;; Specify where backup files are stored
> (setq backup-directory-alist (quote ((".*" . "c:/.backups"))))
> (defconst use-backup-dir t)
> 
Be carefull with that pathname. It will only works with windows ;-)

Best regards
AHz
From: Kaz Kylheku
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <slrnaet12q.16d.kaz@localhost.localdomain>
On 24 May 2002 09:33:45 -0700, Samantha Skyler
<··············@hotmail.com> wrote:
>Hello All,
>
>I'm using Emacs to edit my lisp files.
>
>Anyway, when I save them, Emacs saves both my file (as .lisp) and it
>makes another file that seemes to be the same thing, but it ends in
>.lisp~
>
>Any one know why this is happening?  Anyway to stop it?  Can I delete
>these files?

I would like to add to the other helpful responses that you might also benefit
from knowing about these newsgroups:

	comp.editors
	comp.emacs
	gnu.emacs
From: Knut Anders Hatlen
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <868z694haf.fsf@stjernegris.hatlen.net>
Samantha Skyler wrote:
> Hello All,
> 
> I'm using Emacs to edit my lisp files.
> 
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~
> 
> Any one know why this is happening?  Anyway to stop it?  Can I
> delete these files?

They are backup files and can safely be deleted. If you don't want
Emacs to make backups, put (setq make-backup-files nil) in ~/.emacs.

-- 
Knut Anders
From: Edi Weitz
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <87ptzl5vm3.fsf@dyn164.dbdmedia.de>
··············@hotmail.com (Samantha Skyler) writes:

> I'm using Emacs to edit my lisp files.
> 
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~
> 
> Any one know why this is happening?  Anyway to stop it?  Can I
> delete these files?

These are backup files that are automatically generated by
Emacs. Emacs always does this by default (on most operating systems),
whether your file contains Lisp source code or not.

You can safely delete these '~' files if you think you don't need them
anymore. You can also disable this feature or change the way Emacs
makes backups. See the Emacs info pages, especially the chapter about
'Backup Files', for details.

Edi.
From: Chris Gilbreth
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <4DVH8.45082$db7.1737874@news2.west.cox.net>
Samantha Skyler wrote:

> Hello All,
> 
> I'm using Emacs to edit my lisp files.
> 
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~
> 
> Any one know why this is happening?  Anyway to stop it?  Can I delete
> these files?
> 
> Thanks
> 
> -Samantha

To add to the other resposes:

FWIW, I recall reading that those files are created at the beginning of a 
session (i.e. upon opening a file), so they could be useful if you want to 
undo everything you've done since you opened the file.
From: Donald Fisk
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <3CF1549B.625A7D59@enterprise.net>
Samantha Skyler wrote:
> 
> Hello All,
> 
> I'm using Emacs to edit my lisp files.
> 
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> .lisp~

It's the old version (when you last did ^X^S).

> Any one know why this is happening?  Anyway to stop it?  Can I delete
> these files?

I don't know why you'd want to.   Do you have a very small hard disk?
Long ago, operating systems had file version numbers, so that whenever
you
save a file, the previous version was still around in case you screwed
up, and then you could delete the most recent version and revert to
the older one.   Once you were sure you no longer needed the older
versions, you could get rid of them.   Operating systems which supported
this included ITS, Genera, VME/B and (I think) VMS.

In Unix, it's the responsibility of the application, and you can set
up Emacs to keep several old versions by adding some Lisp to your .emacs
file, which is what I generally do (the default of only one is not so
safe).

However, it's become a habit of people who like Unix to live dangerously
--
and so vi overwrites the previous version so that if you screw up you
live
to regret it.   This is presumably regarded as part of life's rich
tapestry
by vi users.   If you want to do likewise, you can but I'd advise
against it.

> Thanks
> 
> -Samantha

-- 
Le Hibou
You know you've been hacking too long if, when someone
asks you if you have a son, you reply, "No, but I've
got a Symbolics 3630".
From: Joel Ray Holveck
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <y7chekrin5k.fsf@sindri.juniper.net>
>> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
>> makes another file that seemes to be the same thing, but it ends in
>> .lisp~
> It's the old version (when you last did ^X^S).

To pick a nit: only one backup is made per session.  Consider opening
a file "quux" that contains "foo", then type the following:
 "bar^X^Sbaz^X^S"
then quux~ will only contain "foo", the backup from what there was
before your session.

> Long ago, operating systems had file version numbers,
[snip]
> Operating systems which supported this included ITS, Genera, VME/B
> and (I think) VMS.

Yes, VMS supports this.

It may be interesting to note that Genera would emulate this on
NFS-mounted Unix fileshares by appending ".~1~", ".~2~", etc.  (You
have to set the directory to end in ".sct" for this to happen.)  This
is the same convention used by Emacs.

> In Unix, it's the responsibility of the application, and you can set
> up Emacs to keep several old versions by adding some Lisp to your
> .emacs file, which is what I generally do (the default of only one
> is not so safe).

  (setq version-control t)
or
  setenv VERSION_CONTROL numbered

(The latter also control some other utilities, such as patch.)

Cheers,
joelh
From: Carl Shapiro
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <ouyu1ort19w.fsf@panix3.panix.com>
Donald Fisk <················@enterprise.net> writes:

> Long ago, operating systems had file version numbers, so that whenever
> you
> save a file, the previous version was still around in case you screwed
> up, and then you could delete the most recent version and revert to
> the older one.   Once you were sure you no longer needed the older
> versions, you could get rid of them.   Operating systems which supported
> this included ITS, Genera, VME/B and (I think) VMS.

The ISO9660 file system supports version numbers as well.
From: Christopher Browne
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <ad32vb$tkahd$2@ID-125932.news.dfncis.de>
In an attempt to throw the authorities off his trail, Carl Shapiro <·············@panix.com> transmitted:
> Donald Fisk <················@enterprise.net> writes:
>
>> Long ago, operating systems had file version numbers, so that whenever
>> you
>> save a file, the previous version was still around in case you screwed
>> up, and then you could delete the most recent version and revert to
>> the older one.   Once you were sure you no longer needed the older
>> versions, you could get rid of them.   Operating systems which supported
>> this included ITS, Genera, VME/B and (I think) VMS.
>
> The ISO9660 file system supports version numbers as well.

I'd be curious as to what happens if you actually _use_ those version
numbers...  

Hopefully the implementations make sure they attach the number to the
filename somewhere so that if there's a FOO.BAR;1 and FOO.BAR;2, they
are both accessible.

It wouldn't be too surprising if Some Famous OSes were to ignore the
number, thereby making one of the files forever hidden from view...
-- 
(reverse (concatenate 'string ········@" "enworbbc"))
http://www3.sympatico.ca/cbbrowne/sap.html
"Wow! You read  advocacy groups once in a  while, thinking you'll find
the occasional gem, but when you  unearth the Taj Mahal you still have
to stand back and gape a little." -- Paul Phillips <·····@go2net.com>
From: Carl Shapiro
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <ouybsaypz1t.fsf@panix3.panix.com>
Christopher Browne <········@acm.org> writes:

> I'd be curious as to what happens if you actually _use_ those version
> numbers...  

Well, it works as you'd expect on both VMS and the Lisp Machine.  I
have had no trouble reading versioned ISO-9660 file systems on UNIX
machines either.

> Hopefully the implementations make sure they attach the number to the
> filename somewhere so that if there's a FOO.BAR;1 and FOO.BAR;2, they
> are both accessible.

Of course.  What do you think happens?  FOO.BAR;1 and FOO.BAR;2 are
two distinct files.
From: Christopher Browne
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <ad3e0o$to4at$1@ID-125932.news.dfncis.de>
A long time ago, in a galaxy far, far away, Carl Shapiro <·············@panix.com> wrote:
> Christopher Browne <········@acm.org> writes:
>> I'd be curious as to what happens if you actually _use_ those
>> version numbers...
>
> Well, it works as you'd expect on both VMS and the Lisp Machine.  I
> have had no trouble reading versioned ISO-9660 file systems on UNIX
> machines either.
>
>> Hopefully the implementations make sure they attach the number to
>> the filename somewhere so that if there's a FOO.BAR;1 and
>> FOO.BAR;2, they are both accessible.
>
> Of course.  What do you think happens?  FOO.BAR;1 and FOO.BAR;2 are
> two distinct files.

Yes, I realize that they are distinct files.  I've purged old file
versions on VMS before, so I have _some_ clue about this.  (Never
bothered configuring "how many" versions get kept, but was aware that
that was configurable...)

The Famous Platforms about which I'd be curious weren't amongst the
ones you mentioned.

Remember, there are operating systems out there where, when given a
manifestly Right Way to do things, and a manifestly Stupid Way to do
things, the road actually taken is, all too often, the Stupid Way...

I'm not thinking of MVS, either...
-- 
(reverse (concatenate 'string ·············@" "sirhc"))
http://www3.sympatico.ca/cbbrowne/sap.html
"DTDs are  not common knowledge  because programming students  are not
taught markup.  A markup language is not a programming language."
-- Peter Flynn <········@m-net.arbornet.org>
From: Johan Ur Riise
Subject: Re: EMACS and .lisp~ files?
Date: 
Message-ID: <87n0ug6wsc.fsf@dill.topp.dyndns.com>
··············@hotmail.com (Samantha Skyler) writes:

> Hello All,
> 
> I'm using Emacs to edit my lisp files.
> 
> Anyway, when I save them, Emacs saves both my file (as .lisp) and it
> makes another file that seemes to be the same thing, but it ends in
> ..lisp~
> 
> Any one know why this is happening?  Anyway to stop it?  Can I delete
> these files?

Find the option make-backup-files, for instance via menu
Options/Customize Emacs/Options Matching Regexp 
and set it to off.