[comp.emacs] GNU emacs beginner question.

bdo8650@cec2.wustl.edu (Bryan Dennis O'Connor) (10/25/89)

	I am a new user to GNU EMACS, (I used to be a die hard VI fan.) and I
had a few (probably stupid) questions:

	1)  Is there a way to force EMACS not to make backups?  (eg. file~)

	2)  Is there a way to set the number of spaces for a tab?

	I have looked for documentation on this but have been unable to find
any.  Thanks for your help.


===============================================================================
Bryan O'Connor        |  ARPA:   bdo8650@cec2.wustl.edu | ******************** 
Washington University |  USENET: wucs1!cec2!bdo8650     | *UNDER CONSTRUCTION*
Saint Louis, MO       |                                 | ******************** 

mesard@bbn.com (Wayne Mesard) (10/26/89)

bdo8650@cec2.wustl.edu.wustl.edu (Bryan Dennis O'Connor) writes:
> I am a new user to GNU EMACS, (I used to be a die hard VI fan.)

Nobody's perfect.  I used to listen to Kiss.  [Followups to a.r.c.]

> 1)  Is there a way to force EMACS not to make backups?  (eg. file~)

Set the variable make-backup-files to nil.  To disable backup files for
this session type:

	<Esc> X set-variable <Return> make-backup-files <Return> nil <Return>

To make this permanent add the following line to your $HOME/.emacs file:

	(setq make-backup-files nil)

> 2)  Is there a way to set the number of spaces for a tab?

Well, you could mean either (or both) of two things here.  If you're
referring to how many spaces are inserted on the screen for each TAB
character in a text file, you want the variables:

	default-tab-width - to make changes to Emacs behavior in general

	  and

	tab-width - to change the appearance of a specific buffer.

If you want to customize the location of tab stops (which effects how
many spaces get inserted when you press the Tab key) see:

	tab-stop-list

> I have looked for documentation on this but have been unable to find any.

For future reference, I found the information above by typing:

	<Esc> X apropos <Return> backup <Return>

and

	<Esc> X apropos <Return> tab <Return>

I then looked through the list of relevant functions and variables,
noting ones which looked interesting.  To get more information about
them I typed "Ctrl-H F" (for functions) and "Ctrl-H V" (for variables).
No better way to learn Emacs!  And it's always at your fingertips.



-- 
unsigned *Wayne_Mesard();        "[Y]ou seem to have an accute hostility
Mesard@BBN.COM                    toward the very subject of aquariums."
BBN, Cambridge, MA                    -Oleg Kiselev, <21241@gryphon.COM>

jka@hpfcso.HP.COM (Jay Adams) (10/27/89)

/ hpfcso:comp.emacs / bdo8650@cec2.wustl.edu (Bryan Dennis O'Connor) / 10:25 am  Oct 25, 1989 /

	I am a new user to GNU EMACS, (I used to be a die hard VI fan.) and I
had a few (probably stupid) questions:

	1)  Is there a way to force EMACS not to make backups?  (eg. file~)

	2)  Is there a way to set the number of spaces for a tab?

	I have looked for documentation on this but have been unable to find
any.  Thanks for your help.


===============================================================================
Bryan O'Connor        |  ARPA:   bdo8650@cec2.wustl.edu | ******************** 
Washington University |  USENET: wucs1!cec2!bdo8650     | *UNDER CONSTRUCTION*
Saint Louis, MO       |                                 | ******************** 
----------

montnaro@sprite.crd.ge.com (Skip Montanaro) (10/27/89)

In article <8970003@hpfcso.HP.COM> jka@hpfcso.HP.COM (Jay Adams) writes:

	   1)  Is there a way to force EMACS not to make backups?  (eg. file~)

Try (setq make-backup-files nil). 

	   2)  Is there a way to set the number of spaces for a tab?

Not that I'm aware of. Having it set to anything but 8 seems odd, if for no
other reason than that most other software assumes that relationship. If
you're worried about indenting your source code by different amounts, use
one of the many language-specific modes (C, C++, FORTRAN, Lisp, Ada, Pascal,
...). Most bind the TAB key to re-indent the current line according to the
current context. Relative indentation between blocks is usually settable by
a mode-specific variable.
--
Skip Montanaro (montanaro@crdgw1.ge.com)

ben@nsf1.mth.msu.edu (Ben Lotto) (10/27/89)

>>>>> On 26 Oct 89 18:35:45 GMT, jka@hpfcso.HP.COM (Jay Adams) said:

Jay> 	1) Is there a way to force EMACS not to make backups?  (eg.
Jay> file~)

Set the value of the variable make-backup-files to nil, either by using
M-x set-variable or by evaluating (setq make-backup-files nil), say by
putting it in you .emacs file.

Jay> 	2) Is there a way to set the number of spaces for a tab?

You can set the number of spaces for a tab locally or globally.
Locally, you can set the value of the variable tab-width.  Globally, you
can change the value of default-tab-width.  For example, putting (setq
default-tab-width 4) in your .emacs file with change all tabs to width
4.

--

-B. A. Lotto  (ben@nsf1.mth.msu.edu)
Department of Mathematics/Michigan State University/East Lansing, MI  48824

eliot@phoenix.Princeton.EDU (Eliot Handelman) (10/28/89)

In article <MONTNARO.89Oct27100133@sprite.crd.ge.com> <montanaro@crdgw1.ge.com> (Skip Montanaro) writes:
;In article <8970003@hpfcso.HP.COM> jka@hpfcso.HP.COM (Jay Adams) writes:
;
;	   1)  Is there a way to force EMACS not to make backups?  (eg. file~)
;
;Try (setq make-backup-files nil). 
;
;	   2)  Is there a way to set the number of spaces for a tab?
;
;Not that I'm aware of.

use edit-tab-stops-note-changes