Path: utzoo!attcan!uunet!cbmvax!ditto
From: ditto@cbmvax.UUCP (Michael "Ford" Ditto)
Newsgroups: comp.emacs
Subject: Re: Terminal width for emacs
Summary: (describe-function 'set-screen-width)
Keywords: startup file for emacs
Message-ID: <4790@cbmvax.UUCP>
Date: 21 Sep 88 08:51:46 GMT
References: <2402@uhccux.uhcc.hawaii.edu>
Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto)
Organization: Commodore Technology, West Chester, PA
Lines: 38

In article <2402@uhccux.uhcc.hawaii.edu> dillon@uhccux.uhcc.hawaii.edu (Ian Dillon) writes:
>				is it possible to switch from
>80 to 132 columns while in emacs.  I use a vt100 clone, and it
>would be nice to have emacs automatically switch the number of
>columns available as soon as you edit a file.  

You don't say which Emacs, so my example will be for Gnu Emacs.

If you want to automatically switch to 132 columns whenever you run Emacs,
I suggest making a script that outputs the escape sequence, sets $TERM,
runs emacs, and restores the screen size.

If you want to manually change the screen width while in Emacs, just do
M-x eval-expression (probably ESC-ESC) and type (set-screen-width 132).

If you are trying to have Emacs switch to 132 columns only when you visit
certain files, you could try appending to those files something like this:

Local Variables:
eval: (progn (send-string-to-terminal "\033w") (set-screen-width 132))
End:


(I just made up the "\033w"; replace it with the appropriate escape
sequence.)  It might be necessary to enclose the above lines in a comment
of some sort if the file is meant to be read by a program.

I like the first suggestion better (making a script for starting a
132-column Emacs) because it keeps the terminal dependency out of your
files.  It also would probably work for any program or version of Emacs.

-- 
					-=] Ford [=-

	.		.		(In Real Life: Mike Ditto)
.	    :	       ,		ford@kenobi.cts.com
This space under construction,		...!ucsd!elgar!ford
pardon our dust.			ditto@cbmvax.commodore.com