unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Programmatically setting the frame size and position
@ 2014-11-20  2:46 Davin Pearson
  2014-11-20  3:12 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Davin Pearson @ 2014-11-20  2:46 UTC (permalink / raw)
  To: help-gnu-emacs

I would like to know how you go about setting the
size and position of a given frame using Elisp instead
of the mouse.

I am interested in using the speedbar.el but it currently
appears in a maximised state.

I don't want to use the mouse to resize and reposition 
the frames so that they sit beside each other every
time I start speedbar.el

Here is the Elisp code that I have written (based on the built in
Emacs manual) but doesn't work. 

(progn
   (setq fc (current-frame-configuration))
   (setq w (assq 'width (cadadr fc))
   (setcdr w 20)
   (set-frame-configuration fc))

What code do I need to write to get it to work?

Please advise me as I am stuck at the moment.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Programmatically setting the frame size and position
  2014-11-20  2:46 Programmatically setting the frame size and position Davin Pearson
@ 2014-11-20  3:12 ` Drew Adams
  2014-12-01  1:03 ` Davin Pearson
  2014-12-01 10:07 ` Pascal J. Bourguignon
  2 siblings, 0 replies; 4+ messages in thread
From: Drew Adams @ 2014-11-20  3:12 UTC (permalink / raw)
  To: Davin Pearson, help-gnu-emacs

> I would like to know how you go about setting the
> size and position of a given frame using Elisp instead
> of the mouse.

Just use functions `set-frame-position', `set-frame-height',
and `set-frame-width'.  Or use function `set-frame-parameter'
or function `modify-frame-parameters'.

See the Elisp manual, node `Size and Position'.
https://www.gnu.org/software/emacs/manual/html_node/elisp/Size-and-Position.html#Size-and-Position

You can get to that node in Emacs, using `C-h i', choosing
the Elisp manual, and then using g `Size and Position'.

Or once in the manual, type `i set-frame TAB' to see these
and related functions, and choose one of those mentioned
to get to the information about them.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Programmatically setting the frame size and position
  2014-11-20  2:46 Programmatically setting the frame size and position Davin Pearson
  2014-11-20  3:12 ` Drew Adams
@ 2014-12-01  1:03 ` Davin Pearson
  2014-12-01 10:07 ` Pascal J. Bourguignon
  2 siblings, 0 replies; 4+ messages in thread
From: Davin Pearson @ 2014-12-01  1:03 UTC (permalink / raw)
  To: help-gnu-emacs

On Thursday, November 20, 2014 3:46:08 PM UTC+13, Davin Pearson wrote:
> I would like to know how you go about setting the
> size and position of a given frame using Elisp instead
> of the mouse.
> 
> I am interested in using the speedbar.el but it currently
> appears in a maximised state.
> 
> I don't want to use the mouse to resize and reposition 
> the frames so that they sit beside each other every
> time I start speedbar.el
> 
> Here is the Elisp code that I have written (based on the built in
> Emacs manual) but doesn't work. 
> 
> (progn
>    (setq fc (current-frame-configuration))
>    (setq w (assq 'width (cadadr fc))
>    (setcdr w 20)
>    (set-frame-configuration fc))
> 
> What code do I need to write to get it to work?
> 
> Please advise me as I am stuck at the moment.

Thanks for your help.  I personally prefer to use Emacs
windows rather than frames as windows are easier to manipulate.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Programmatically setting the frame size and position
  2014-11-20  2:46 Programmatically setting the frame size and position Davin Pearson
  2014-11-20  3:12 ` Drew Adams
  2014-12-01  1:03 ` Davin Pearson
@ 2014-12-01 10:07 ` Pascal J. Bourguignon
  2 siblings, 0 replies; 4+ messages in thread
From: Pascal J. Bourguignon @ 2014-12-01 10:07 UTC (permalink / raw)
  To: help-gnu-emacs

Davin Pearson <davin.pearson@gmail.com> writes:

> I would like to know how you go about setting the
> size and position of a given frame using Elisp instead
> of the mouse.
>
> I am interested in using the speedbar.el but it currently
> appears in a maximised state.
>
> I don't want to use the mouse to resize and reposition 
> the frames so that they sit beside each other every
> time I start speedbar.el
>
> Here is the Elisp code that I have written (based on the built in
> Emacs manual) but doesn't work. 

Have a look at my full-frame command.

https://gitorious.org/com-informatimago/emacs/source/pjb-emacs.el#L1218

-- 
__Pascal Bourguignon__                 http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-01 10:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-20  2:46 Programmatically setting the frame size and position Davin Pearson
2014-11-20  3:12 ` Drew Adams
2014-12-01  1:03 ` Davin Pearson
2014-12-01 10:07 ` Pascal J. Bourguignon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).