Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 07-20-2004, 11:59 PM   #1
Registered: Jul 2002
Location: nowhere
Distribution: GNU
Posts: 118

Rep: Reputation: 15
emacs buffer !

hi all~

I am start using emacs these days, and because I was with windows texteditor before(ie, EditPlus) and got confused when transfered myself to emacs. i noticed when i was coding with somewhat file it will automatically create a temporaly buffer file like myFile.cpp~, what did it mean and can emacs avoid creating them ?

thanx in advance~
Old 07-21-2004, 12:57 AM   #2
LQ Newbie
Registered: Jul 2004
Posts: 16

Rep: Reputation: 2
Open or create a file called .emacs on your home directory and add the line below:

(setq make-backup-files nil)
Then files~ will not be created anymore.

Notice that the ~ suffix is the equivalent of the .BAK in Windows/DOS world. In case you acidentally change and save an important file, you can always revert back from the ~ file. This already saved me from big headaches.

In other words, emacs create those files for your own protection, so I advise you to think twice before disabling this feature. It's so easy to do a "rm *~" at the end of the day, so why risk?
Old 07-21-2004, 01:46 AM   #3
Registered: Jul 2002
Location: nowhere
Distribution: GNU
Posts: 118

Original Poster
Rep: Reputation: 15
thanx afm i think i may keep backup files as they were.

and here are some new problems i'd appreciate your help

1 now i am editing c++ file with emacs, is there any way to make emacs highlighted for c++ or other syntax ?

2 and, when i save a c++ source file test.cpp, how to invoke certain compiler to compile it ?

3 in windows i can select certain region by pressing Shift key and moveing cursor together, and how can we select region in emacs ?

4 cut, copy and paste have no shortcut keys ??? i can only see something like "(<cut>)" etc.

5 some commands like colose file etc are usually used, but by default there are no shortcut keys for them, can i customize it ?

6 anywhere can i change indent size ??? default seems to be 8 spaces, but i prefer 4 instead~

Last edited by black; 07-21-2004 at 03:33 AM.
Old 07-21-2004, 10:57 PM   #4
Registered: Jul 2002
Location: nowhere
Distribution: GNU
Posts: 118

Original Poster
Rep: Reputation: 15
question 4 solved, how about others ? help~~~~~~~~~~~~~~


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
where is the .emacs file in the emacs source code tarball? aizkorri Programming 2 01-13-2007 03:05 PM
emacs not responding to .emacs file in Mandriva 2005 LE. Please help LaptopLinux Mandriva 1 06-08-2005 09:36 AM
Lisp/Emacs: How to do a macro on a buffer-name with another extension LuisG Linux - Software 3 10-25-2004 10:26 PM
IO Buffer Haafiz Linux - General 1 07-14-2004 04:24 PM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 08:31 AM > Forums > Linux Forums > Linux - Software

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

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