[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Adding more columns to width of frame
From: |
Drew Adams |
Subject: |
RE: Adding more columns to width of frame |
Date: |
Tue, 8 Jul 2008 22:36:44 -0700 |
> I have been searching for the right commands to resize the width of
> the frames. I am using Emacs v21.3.1 under x86_64-linux.
>
> I load ESS because I like running R within emacs, but I would like
> to resize the display that appears in the R buffer. I handle data
> frames with many columns and although I am able to resize the window,
> the display is istill restricted to the same width, which seems to be
> approximately 80 characters. What confuses me is the fact that this
> restriction doesn't apply to the buffer containing the R script. I am
> guessing that I need to make changes somewhere else andnot to .emacs?
>
> I tried the following command in .emacs without success.
> (setq initial-frame-alist '(width .150))
To set the width of the current frame:
(set-frame-width nil 150)
Or make it a command:
(defun my-set-frame-width (width)
"..."
(interactive "nWidth: ")
(set-frame-width nil width))
Or use commands `enlarge-frame-horizontally' and `shrink-frame-horizontally':
http://www.emacswiki.org/cgi-bin/wiki/frame-cmds.el
Or use command `fit-frame' to fit a one-window frame to its buffer:
http://www.emacswiki.org/cgi-bin/wiki/fit-frame.el
If you want to always set the same frame to a given width:
(set-frame-width my-frame 150)
If you only know the buffer name, not the frame name, display the buffer, select
its window, and then set the selected frame's width:
(select-window (get-buffer-window my-buffer 'visible))
(set-frame-width (selected-frame) 150)