From: tpeplt <tpeplt@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Problem with new frame not recognizing `default-frame-alist' width and height
Date: Mon, 26 Feb 2024 22:11:13 -0500 [thread overview]
Message-ID: <87zfvmbnzi.fsf@gmail.com> (raw)
The following problem seems like it is an error in Emacs that needs to
be reported, but it ought to be so common that it would have been
noticed already. Since it hasn’t, perhaps it is a user error with
something I am overlooking.
The problem is happening when running Emacs 29.2 on GNU/Linux running
GNOME window manager.
In brief, the problem is that when a new frame is created, the new
frame’s default width and height are both small, and overriding the
default width and height cannot be done before creating the new frame
(but can be changed after the new frame has been created).
1. Start Emacs from a shell prompt, with all customization turned off:
$ emacs -Q
2. Create a new frame using ‘make-frame-command’: Type C-x 5 2
The new frame only has about 8 lines and about 20 columns.
Delete the frame using ‘delete-frame’: Type C-x 5 0
4. Set the width and height to larger values by setting the value of
the association list ‘default-frame-alist’. Evaluate the
expression:
(setq default-frame-alist '((width . 80) (height . 25)))
Again, create a new frame by typing C-x 5 2. The new frame’s
default width and height are unchanged. Change the frame’s width
using the command:
M-x set-frame-width
The frame’s width is adjusted to the new value. Repeat for the new
frame’s height:
M-x set-frame-height
Again, the frame’s height is adjusted accordingly. So it is
possible for Emacs to adjust the height and width of the new frame,
but it is not possible make the adjustment before the new frame is
created.
Delete the new frame: Type C-x 5 0
Check the *Messages* buffer. Emacs does not report any problems with
creating a new frame even though it did not accept the new values for
the frame’s width and height.
5. Change other frame parameters. Turn off the vertical scroll bars and
set the location of the upper-left corner of the new frame. Evaluate
the expression:
(setq default-frame-alist
'((width . 80) (height . 25)
(vertical-scroll-bars . nil)
(top . 50) (left . 50)))
Create a new frame using C-x 5 2. The vertical scroll bar is now
turned off and the upper-left corner of the new frame has been
adjusted, but the width and height are still not adjusted to the new
values. Delete the new frame: type C-x 5 0
6. Try the ‘clone-frame’ command that was introduced in Emacs 28: Type
C-x 5 c. The new frame does not clone the current frame’s width
and height, but instead keeps the small 8x20 size as all other
newly-created frames.
This problem with the frame width and height also occurs when using
‘emacsclient’.
Note: I do not have either a ~/.Xdefaults or ~/.Xresources file, so
values in those files cannot be interfering with the default behavior of
Emacs.
Are other Emacs 28/29 users able to reproduce this problem?
If not, can you point to something erroneous that I am doing?
--
next reply other threads:[~2024-02-27 3:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 3:11 tpeplt [this message]
2024-02-27 3:31 ` Problem with new frame not recognizing `default-frame-alist' width and height tpeplt
2024-02-27 3:56 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-02-27 16:13 ` tpeplt
2024-02-27 8:14 ` Joost Kremers
2024-02-27 10:14 ` Eli Zaretskii
2024-02-27 11:19 ` Joost Kremers
2024-02-27 16:53 ` tpeplt
2024-02-27 19:50 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-02-27 20:28 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-02-27 22:05 ` tpeplt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfvmbnzi.fsf@gmail.com \
--to=tpeplt@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).