LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2005, 12:20 AM   #1
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Red face Embarassing emacs file~ question


I've got a really silly question about emacs. I usually use pico but I've decided to get a little more GNUy and delve into emacs and vi.

I'm a bit confused about how emacs deals with buffers though. Sometimes when I edit a file I end up with a (temp?) file~, but sometimes I don't.

So: What is this file ? How do I clear it if it's present (without using rm) ?
 
Old 03-18-2005, 03:18 AM   #2
shobhit
Member
 
Registered: Sep 2003
Location: kolkata
Distribution: Fedora 7
Posts: 60

Rep: Reputation: 15
file~ is the backup file emacs creates automatically for you, when you edit a file.
this way you can step back one edit of the file if you want to undo your changes.
file~ is created only when you edit the file. if you open the file and simply read it without editing, then no file~ is created.
also file~ is not a temporary file, its just a copy of your old file.

using emacs you can safely edit system files to try new settings, if they don't work then getting the default sys file is as easy as
mv file~ file
 
Old 03-18-2005, 03:31 AM   #3
CARTMAN
Member
 
Registered: Feb 2002
Location: Turkiye
Distribution: Pardus
Posts: 147

Rep: Reputation: 16
Thats a backup file when you modify a file that has a revision ( like in a cvs,svn repo. copy ) it will backup file as file.~revision~ which is quite useful.
 
Old 03-18-2005, 09:08 AM   #4
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Original Poster
Rep: Reputation: 30
Why didn't I assume Stallman would include something so clever.

This is actually very, very useful for what I'm doing.

Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
emacs not responding to .emacs file in Mandriva 2005 LE. Please help LaptopLinux Mandriva 1 06-08-2005 08:36 AM
emacs #filename# file question Guvvy Linux - Newbie 3 01-31-2005 06:26 PM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM
embarassing hosts question ryedunn Linux - Newbie 2 03-30-2004 12:43 PM
most embarassing question ever bandofmercy Slackware 10 03-24-2003 05:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration