all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Setting geometry for second frame ??
@ 2009-09-12 12:03 William Case
  2009-09-12 18:49 ` Kevin Rodgers
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: William Case @ 2009-09-12 12:03 UTC (permalink / raw)
  To: Emacs Help List

Hi;

How do you set the size of a secondary frame?

My Xresources file is set to 'Emacs.Geometry: 80x55+96+35'.  That size,
generally speaking, is the default size I am most comfortable with.
However, I have a key binding that opens a second frame containing a
text file in which I keep my notes as I am working.

(global-set-key [(super f1)] (lambda() 
     (interactive)(find-file-other-frame
"~/Documents/C/Text/C-Notes.txt")))

I want this second frame to open with a geometry of 75x55 so that I can
fit two frames, side-by-side, on my desktop.  I don't want to change my
Xresources file unless there is a safe way to write a conditional
command in Xresources, nor compromise on my default setting.  

Is there a way to do this using a key binding to an existing function or
do I have to write my own function?  If I have to write my own function,
could you outline which functions and/or variables I might need to use?
 
-- 
Regards Bill
Fedora 11, Gnome 2.26.3
Evo.2.26.3, Emacs 23.1.1





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

* Re: Setting geometry for second frame ??
@ 2009-09-12 12:24 martin rudalics
  0 siblings, 0 replies; 7+ messages in thread
From: martin rudalics @ 2009-09-12 12:24 UTC (permalink / raw)
  To: billlinux; +Cc: help-gnu-emacs

 > I want this second frame to open with a geometry of 75x55 so that I can
 > fit two frames, side-by-side, on my desktop.  I don't want to change my
 > Xresources file unless there is a safe way to write a conditional
 > command in Xresources, nor compromise on my default setting.
 >
 > Is there a way to do this using a key binding to an existing function or
 > do I have to write my own function?  If I have to write my own function,
 > could you outline which functions and/or variables I might need to use?

You might want to look at the functions `dframe-frame-mode' and
`dframe-reposition-frame' and how the speedbar uses them.

martin




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

* Re: Setting geometry for second frame ??
  2009-09-12 12:03 Setting geometry for second frame ?? William Case
@ 2009-09-12 18:49 ` Kevin Rodgers
  2009-09-13  2:13   ` Wang Lei
  2009-09-13 19:10 ` Setting geometry for second frame ?? [SOLVED - with Thanks] William Case
       [not found] ` <mailman.6599.1252869121.2239.help-gnu-emacs@gnu.org>
  2 siblings, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2009-09-12 18:49 UTC (permalink / raw)
  To: help-gnu-emacs

William Case wrote:
> Hi;
> 
> How do you set the size of a secondary frame?
> 
> My Xresources file is set to 'Emacs.Geometry: 80x55+96+35'.  That size,
> generally speaking, is the default size I am most comfortable with.
> However, I have a key binding that opens a second frame containing a
> text file in which I keep my notes as I am working.
> 
> (global-set-key [(super f1)] (lambda() 
>      (interactive)(find-file-other-frame
> "~/Documents/C/Text/C-Notes.txt")))
> 
> I want this second frame to open with a geometry of 75x55 so that I can
> fit two frames, side-by-side, on my desktop.  I don't want to change my
> Xresources file unless there is a safe way to write a conditional
> command in Xresources, nor compromise on my default setting.  
> 
> Is there a way to do this using a key binding to an existing function or
> do I have to write my own function?  If I have to write my own function,
> could you outline which functions and/or variables I might need to use?

(let ((default-frame-alist `((height . 75) (width . 55) ,@default-frame-alist)))
   (find-file-other-frame "~/Documents/C/Text/C-Notes.txt"))

-- 
Kevin Rodgers
Denver, Colorado, USA





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

* Re: Setting geometry for second frame ??
  2009-09-12 18:49 ` Kevin Rodgers
@ 2009-09-13  2:13   ` Wang Lei
  0 siblings, 0 replies; 7+ messages in thread
From: Wang Lei @ 2009-09-13  2:13 UTC (permalink / raw)
  To: help-gnu-emacs

Maybe you can have a look at

default-frame-alist and initial-frame-alist.

On 9/13/09, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
> William Case wrote:
>> Hi;
>>
>> How do you set the size of a secondary frame?
>>
>> My Xresources file is set to 'Emacs.Geometry: 80x55+96+35'.  That size,
>> generally speaking, is the default size I am most comfortable with.
>> However, I have a key binding that opens a second frame containing a
>> text file in which I keep my notes as I am working.
>>
>> (global-set-key [(super f1)] (lambda()
>>      (interactive)(find-file-other-frame
>> "~/Documents/C/Text/C-Notes.txt")))
>>
>> I want this second frame to open with a geometry of 75x55 so that I can
>> fit two frames, side-by-side, on my desktop.  I don't want to change my
>> Xresources file unless there is a safe way to write a conditional
>> command in Xresources, nor compromise on my default setting.
>>
>> Is there a way to do this using a key binding to an existing function or
>> do I have to write my own function?  If I have to write my own function,
>> could you outline which functions and/or variables I might need to use?
>
> (let ((default-frame-alist `((height . 75) (width . 55)
> ,@default-frame-alist)))
>    (find-file-other-frame "~/Documents/C/Text/C-Notes.txt"))
>
> --
> Kevin Rodgers
> Denver, Colorado, USA
>
>
>
>


-- 
Regards
Lei




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

* Re: Setting geometry for second frame ?? [SOLVED - with Thanks]
  2009-09-12 12:03 Setting geometry for second frame ?? William Case
  2009-09-12 18:49 ` Kevin Rodgers
@ 2009-09-13 19:10 ` William Case
       [not found] ` <mailman.6599.1252869121.2239.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 7+ messages in thread
From: William Case @ 2009-09-13 19:10 UTC (permalink / raw)
  To: Emacs Help List

On Sat, 2009-09-12 at 08:03 -0400, William Case wrote:
> Hi;
> 

I ended up using 
(setq default-frame-alist '((width . 75) (height . 55) (menu-bar-lines .
1))  -- in my ~/.emacs as suggested by customize.  However, Keven
Rodgers suggested 

(let ((default-frame-alist `((width . 75) (height .
55) ,@default-frame-alist)))
   (find-file-other-frame "~/Documents/C/Text/C-Notes.txt"))

which I fooled around with quite a bit but I couldn't find a meaning for
@default-frame-alist.  Is this a typo or am I missing some good stuff I
should be learning (i.e. the '@'prefix on a variable).  I checked info
etc.
-- 
Regards Bill
Fedora 11, Gnome 2.26.3
Evo.2.26.3, Emacs 23.1.1





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

* Re: Setting geometry for second frame ?? [SOLVED - with Thanks]
       [not found] ` <mailman.6599.1252869121.2239.help-gnu-emacs@gnu.org>
@ 2009-09-13 19:50   ` Joost Kremers
  2009-09-14 14:22     ` William Case
  0 siblings, 1 reply; 7+ messages in thread
From: Joost Kremers @ 2009-09-13 19:50 UTC (permalink / raw)
  To: help-gnu-emacs

William Case wrote:
> On Sat, 2009-09-12 at 08:03 -0400, William Case wrote:
> (let ((default-frame-alist `((width . 75) (height .
> 55) ,@default-frame-alist)))
>    (find-file-other-frame "~/Documents/C/Text/C-Notes.txt"))
>
> which I fooled around with quite a bit but I couldn't find a meaning for
> @default-frame-alist.  Is this a typo or am I missing some good stuff I
> should be learning (i.e. the '@'prefix on a variable).  I checked info
> etc.

it's not `@', the comma goes with it:

(info "(elisp) Backquote")


-- 
Joost Kremers                                      joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)


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

* Re: Setting geometry for second frame ?? [SOLVED - with Thanks]
  2009-09-13 19:50   ` Joost Kremers
@ 2009-09-14 14:22     ` William Case
  0 siblings, 0 replies; 7+ messages in thread
From: William Case @ 2009-09-14 14:22 UTC (permalink / raw)
  To: Joost Kremers; +Cc: help-gnu-emacs

Thanks Joost;

On Sun, 2009-09-13 at 19:50 +0000, Joost Kremers wrote:
> William Case wrote:

> it's not `@', the comma goes with it:
> 
> (info "(elisp) Backquote")
> 

I looked up ',@'' in the elisp manual as you suggested.  It took me a
few minutes to get my head around its use.  But being able to insert a
list within a list will be handy little thing to know.

-- 
Regards Bill
Fedora 11, Gnome 2.26.3
Evo.2.26.3, Emacs 23.1.1





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

end of thread, other threads:[~2009-09-14 14:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-12 12:03 Setting geometry for second frame ?? William Case
2009-09-12 18:49 ` Kevin Rodgers
2009-09-13  2:13   ` Wang Lei
2009-09-13 19:10 ` Setting geometry for second frame ?? [SOLVED - with Thanks] William Case
     [not found] ` <mailman.6599.1252869121.2239.help-gnu-emacs@gnu.org>
2009-09-13 19:50   ` Joost Kremers
2009-09-14 14:22     ` William Case
  -- strict thread matches above, loose matches on Subject: below --
2009-09-12 12:24 Setting geometry for second frame ?? martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.