Discussion:
default window size on aquamacs
Jeff Templon
2005-11-07 21:19:38 UTC
Permalink
Hi

just installed aquamacs and like it.

one thing that bothers me: the window it starts up with is too big. the
bottom of the window is just under the dock so i can't see what i am
doing. there are all sorts of hints on how to change this behavior, but
i didn't find a very clear description of exactly what to do anywhere.
by that i mean

put the following lines in the file /exact/path/to/file/here:

(some-interesting-emacs-function '(some-other-junk NNN MMM))

where NNN is the desired default window width and MMM is the desired
default window height.

I would probably be very happy if somebody would send me such a
description or post it here (so google will find it too).

Thanks a lot,

J "python font lock here I come" T
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
David Charlap
2005-11-07 21:31:25 UTC
Permalink
Post by Jeff Templon
one thing that bothers me: the window it starts up with is too big. the
bottom of the window is just under the dock so i can't see what i am
doing. there are all sorts of hints on how to change this behavior, but
i didn't find a very clear description of exactly what to do anywhere.
by that i mean
(some-interesting-emacs-function '(some-other-junk NNN MMM))
where NNN is the desired default window width and MMM is the desired
default window height.
Put this in your .emacs file:

(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist))

Width and height are in terms of characters. The actual window size
will be a function of this and the selected font.

-- David
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Jeff Templon
2005-11-07 21:46:28 UTC
Permalink
Hi

it seems to have the desired effect, after adding what was apparently a
missing paren at the end. however now i get in addition to the window
size change, error messages like (wrong-type-argument listp
default-frame-alist).

To be clear, in order to get around the initial error message I got by
pasting in your text verbatim (unbalanced parens) I now have in my .emacs

(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist)))

Thanks

JT
Post by David Charlap
Post by Jeff Templon
one thing that bothers me: the window it starts up with is too big.
the bottom of the window is just under the dock so i can't see what i
am doing. there are all sorts of hints on how to change this
behavior, but i didn't find a very clear description of exactly what
to do anywhere. by that i mean
(some-interesting-emacs-function '(some-other-junk NNN MMM))
where NNN is the desired default window width and MMM is the desired
default window height.
(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist))
Width and height are in terms of characters. The actual window size
will be a function of this and the selected font.
-- David
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
David Charlap
2005-11-07 22:20:04 UTC
Permalink
Post by Jeff Templon
it seems to have the desired effect, after adding what was apparently a
missing paren at the end. however now i get in addition to the window
size change, error messages like (wrong-type-argument listp
default-frame-alist).
To be clear, in order to get around the initial error message I got by
pasting in your text verbatim (unbalanced parens) I now have in my .emacs
(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist)))
My mistake. My default-frame-alist has more than just these appended.
I stripped the extraneous parts but removed one too many parens. You
got the error because you added it back to the wrong place. Try this:

(setq default-frame-alist
(append
'((width . 80)
(height . 45))
default-frame-alist))

-- David
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Jeff Templon
2005-11-07 22:26:40 UTC
Permalink
augh.

now the error is gone away, but changing the numbers no longer has an
effect on the window size :(

JT
Post by Jeff Templon
it seems to have the desired effect, after adding what was apparently
a missing paren at the end. however now i get in addition to the
window size change, error messages like (wrong-type-argument listp
default-frame-alist).
To be clear, in order to get around the initial error message I got by
pasting in your text verbatim (unbalanced parens) I now have in my .emacs
(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist)))
My mistake. My default-frame-alist has more than just these appended. I
stripped the extraneous parts but removed one too many parens. You got
(setq default-frame-alist
(append
'((width . 80)
(height . 45))
default-frame-alist))
-- David
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
David Charlap
2005-11-07 22:50:43 UTC
Permalink
We're probably running differebt builds/distributions.

Although the lines I posted work for me on my Mac, on my Linux PC, this
change only affects new frames, not the one created at application startup.

If you open a new frame (C-x 5 2), does the new one open at the right size?

If it does, then add this as well:

(setq initial-frame-alist
(append
'((width . 80)
(height . 45))
initial-frame-alist))

The initial-frame-alist controls the first window that opens (overriding
values that are hard-coded or derived from X defaults.) For some Emacs
builds, changing the default-frame-alist will change the initial window.
Apparently not for yours.
Post by Jeff Templon
augh.
now the error is gone away, but changing the numbers no longer has an
effect on the window size :(
JT
Post by David Charlap
Post by Jeff Templon
it seems to have the desired effect, after adding what was apparently
a missing paren at the end. however now i get in addition to the
window size change, error messages like (wrong-type-argument listp
default-frame-alist).
To be clear, in order to get around the initial error message I got
by pasting in your text verbatim (unbalanced parens) I now have in my
.emacs
(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist)))
My mistake. My default-frame-alist has more than just these appended.
I stripped the extraneous parts but removed one too many parens. You
(setq default-frame-alist
(append
'((width . 80)
(height . 45))
default-frame-alist))
-- David
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Jeff Templon
2005-11-07 22:59:59 UTC
Permalink
Perfect!!

Thanks 10^6

JT
Post by David Charlap
We're probably running differebt builds/distributions.
Although the lines I posted work for me on my Mac, on my Linux PC, this
change only affects new frames, not the one created at application startup.
If you open a new frame (C-x 5 2), does the new one open at the right size?
(setq initial-frame-alist
(append
'((width . 80)
(height . 45))
initial-frame-alist))
The initial-frame-alist controls the first window that opens (overriding
values that are hard-coded or derived from X defaults.) For some Emacs
builds, changing the default-frame-alist will change the initial window.
Apparently not for yours.
Post by Jeff Templon
augh.
now the error is gone away, but changing the numbers no longer has an
effect on the window size :(
JT
Post by David Charlap
Post by Jeff Templon
it seems to have the desired effect, after adding what was
apparently a missing paren at the end. however now i get in
addition to the window size change, error messages like
(wrong-type-argument listp default-frame-alist).
To be clear, in order to get around the initial error message I got
by pasting in your text verbatim (unbalanced parens) I now have in
my .emacs
(setq default-frame-alist
(append
'((width . 80)
(height . 45)
default-frame-alist)))
My mistake. My default-frame-alist has more than just these
appended. I stripped the extraneous parts but removed one too many
parens. You got the error because you added it back to the wrong
(setq default-frame-alist
(append
'((width . 80)
(height . 45))
default-frame-alist))
-- David
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Stefanos Folias
2005-11-09 04:17:04 UTC
Permalink
i never quit figure out how this occurs, nor how to stop it once it
starts.
Basically, i am using a recent version of aquamacs, and i get a
persistent

Find file: ~

at the bottom of the window, that doesn't go away.

C-g causes it to disappear for all of 1 sec then it reappears.

i don't remember this occurring on previous versions. can someone
tell me what i am doing
to cause it and what i can do to stop it?

thanks

stefanos
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>

Edward O'Connor
2005-11-07 21:47:41 UTC
Permalink
one thing that bothers me: the window it starts up with is too big. the
bottom of the window is just under the dock so i can't see what i am
doing.
Here's what I do.

(when (and (eq system-type 'darwin) (not (featurep 'xemacs)))
(add-to-list 'default-frame-alist '(top . 0)))


Ted
--
Edward O'Connor
***@gmail.com

Ense petit placidam sub libertate quietem.

---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Tim Bray
2005-11-07 22:08:20 UTC
Permalink
Post by Edward O'Connor
Here's what I do.
You guys are so fancy:

(set-frame-size (window-frame (selected-window)) 80 60)

Been using it for years. -Tim

---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Jeff Templon
2005-11-07 22:17:00 UTC
Permalink
Yo

This one does very bad things to both standard Os X emacs (/usr/bin) as
well as to aquamacs... i had to force a quit to aquamacs after using
this as init file!! it locked up with some weird font-lock error.

J "guess it's not as easy as it looks" T
Post by Tim Bray
Post by Edward O'Connor
Here's what I do.
(set-frame-size (window-frame (selected-window)) 80 60)
Been using it for years. -Tim
---------------------------- Info -----------------------------
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Terry Jones
2005-11-08 21:23:33 UTC
Permalink
I set my initial and default frame params using something on the "fancy"
side, with sizes chosen depending on the host I'm on (i.e., I use the same
.emacs everywhere). Below is an excerpt:

Terry

---

(cond
((string-match my-host "mallet")
(setq
my-initial-height 40
my-default-height 40
my-initial-width 125
my-default-width 125))
((string-match my-host "terry")
(setq
my-initial-height 45
my-default-height 45
my-initial-width 90
my-default-width 90))
((string-match my-host "tapdance")
(setq
my-initial-height 63
my-default-height 63
my-initial-width 100
my-default-width 100)))

(setq

initial-frame-alist (append
(assq-delete-all 'height
(assq-delete-all 'width initial-frame-alist))

`((width . ,my-initial-width)
(height . ,my-initial-height)))

default-frame-alist (append
(assq-delete-all 'height
(assq-delete-all 'width default-frame-alist))

`((width . ,my-default-width)
(height . ,my-default-height))))
---------------------------- Info -----------------------------
List Post: <mailto:macosx-***@email.esm.psu.edu>
List Archives: <http://dir.gmane.org/gmane.emacs.macintosh.osx>
Loading...