I wan to change the width of emacs which can fit the width of LCD.
-
If you meant "frame" instead of "window", then here is a link to a thread containing various solutions: http://stackoverflow.com/a/18711628/2112489 – lawlist Aug 16 '14 at 03:23
2 Answers
In addition to the details in the thread that @lawlist posted in his comment, the simplest way to get fullwidth is to set the frame parameter accordingly. The following will do it:
(set-frame-parameter (selected-frame) 'fullscreen 'fullwidth)
However, to have this happen automatically at startup, you should set the parameter in your initial-frame-alist
somewhere in your .emacs
file:
(setq initial-frame-alist
'((fullscreen . fullwidth)))

- 5,209
- 1
- 25
- 37
Beside elisp methods given in thread mentioned by @lawlist in the comment you can also set emacs geometry in ~/.Xdefaults
file, eg.:
Emacs.geometry: 100x29+-2+-2
These four numbers represent width, high and position of upper left corner (optional)
Now just run xrdb ~/.Xdefaults
and from now on emacs will always start with this geometry.
The good thing about .Xdefaults method is that you can set in one place parameters (not only geometry) for different programs but using similar syntax, for example
! geometry
Emacs.geometry: 100x29
xpdf.geometry: 80x25
xterm*geometry: 70x20
! foreground color
Emacs*foreground: white
xpdf*foreground: black
xterm*foreground: light grey
! background
Emacs*background: #445566
xpdf*background: white
xterm*background: #262729
! other stuff
xterm*toolBar: true
xpdf*urlCommand: /usr/bin/firefox %s