From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: tpeplt Newsgroups: gmane.emacs.help Subject: Problem with new frame not recognizing `default-frame-alist' width and height Date: Mon, 26 Feb 2024 22:11:13 -0500 Message-ID: <87zfvmbnzi.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8168"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 27 04:11:47 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rensh-0001yt-3U for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Feb 2024 04:11:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rensI-0005xM-0A; Mon, 26 Feb 2024 22:11:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rensF-0005wx-Ve for help-gnu-emacs@gnu.org; Mon, 26 Feb 2024 22:11:20 -0500 Original-Received: from mail-qv1-xf29.google.com ([2607:f8b0:4864:20::f29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rensB-0001cT-VO for help-gnu-emacs@gnu.org; Mon, 26 Feb 2024 22:11:19 -0500 Original-Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-68fb71fc886so16484056d6.3 for ; Mon, 26 Feb 2024 19:11:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709003474; x=1709608274; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=dbBJgXuzhpABHkCP9TG/L8jF91xoU83f24tqyYKwwYI=; b=lM37/B6lrB8wpRl75PMdJaMQ2m8zFuRt4OzVA9Sjfgyemokmd1XBlxaWZNitPc8wRH xZmO02paVI/X85tEKhKxnUFMzeG4GCe5K8uQxE8NVSnALnv9NRlCk3qXoSV98SLuvXWL jFbGG+yDPggHP/xRr6qOH5PbSReKoX0wt9Ig+Y2KRy8w9zKonJI8X347Od5jWRDltdbZ bJqKTDxeQNDr/pbBnJalzr//XmH1QjAVV67u5PwyLMKu+KixkSDl8PYyUDgQgt1/FrCp t0sU77bVHjQc/dwFavYUm5SS2PyKFd+rFO4ept5E+ITSbzj6+LGOcG0O7um9v6mAi/8N aFMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709003474; x=1709608274; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=dbBJgXuzhpABHkCP9TG/L8jF91xoU83f24tqyYKwwYI=; b=U5y1R+54yHSpDR29XYFf7qBqYnpz73jNYuYQdJnLM5rSS033tr1zhgWKOwhDtcudr/ hRiGJ9wSfJwa/xiphWKA/PpcM5z4wR7PP/UlyBfKbN94eBopZTBJ4irSP4eHffwmlzRd MFmez8NCNxM7k4dgu442SHKKAFK/8Z4HValvFxOxSWjUmp1aex9ERogTHJ8s/ZjAqZQ9 NgrKFiacbVDU+fUD0QCMUx4RzqZQVOafq7GelddLu/8YnkYoU8K/JGnQj7arePznBjkX 2XE50zeL/TsBiQsgZPFyrAXxPKiIJUPiKkl8oOVN135jNvsr7RHviL8Dm3jTB+MRew5Y XqkA== X-Gm-Message-State: AOJu0Ywd5VF9oxh8o3nQpeH16Z0LFkoNQmCxE1yEaFk9COaiWv0NOCKy xxG2dzf7zBqGLNdfsvjljja8tjvJco/J4AmOJcDlgCfH4/GzVS4vXdmEo1t0 X-Google-Smtp-Source: AGHT+IHzcnDGc4EtnhDHaMPZme60WpjeyQchm6kI3/9hW4WRHfYMHJtcNxyQoCtk1EsYhICcMUqe7A== X-Received: by 2002:ad4:5948:0:b0:690:4d7:f927 with SMTP id eo8-20020ad45948000000b0069004d7f927mr985913qvb.59.1709003474540; Mon, 26 Feb 2024 19:11:14 -0800 (PST) Original-Received: from t530.local ([2600:8806:a821:2b00::c2a8]) by smtp.gmail.com with ESMTPSA id lb8-20020a056214318800b0068f8cf04a38sm3646858qvb.24.2024.02.26.19.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 19:11:14 -0800 (PST) Received-SPF: pass client-ip=2607:f8b0:4864:20::f29; envelope-from=tpeplt@gmail.com; helo=mail-qv1-xf29.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145990 Archived-At: 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=E2=80=99t, 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=E2=80=99s 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 =E2=80=98make-frame-command=E2=80=99: Type C-x = 5 2 The new frame only has about 8 lines and about 20 columns. Delete the frame using =E2=80=98delete-frame=E2=80=99: Type C-x 5 0 4. Set the width and height to larger values by setting the value of the association list =E2=80=98default-frame-alist=E2=80=99. 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=E2=80=99s default width and height are unchanged. Change the frame=E2=80=99s width using the command: M-x set-frame-width The frame=E2=80=99s width is adjusted to the new value. Repeat for the = new frame=E2=80=99s height: M-x set-frame-height Again, the frame=E2=80=99s 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=E2=80=99s 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))) =20=20=20 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 =E2=80=98clone-frame=E2=80=99 command that was introduced in Ema= cs 28: Type C-x 5 c. The new frame does not clone the current frame=E2=80=99s 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 =E2=80=98emacsclient=E2=80=99. 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? --