From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Hedlund Newsgroups: gmane.emacs.devel Subject: Re: Should https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-MS_002dWindows.html be renamed to Maxmize-mode-on-MS_002dWindows.html ? Date: Mon, 23 Oct 2023 17:25:22 +0200 Message-ID: References: <83o7hjahlw.fsf@gnu.org> <837co7a4po.fsf@gnu.org> <8ca2201b-c0f9-4e8d-b4ca-82d02ad78b99@beloved.name> <8334yva2m8.fsf@gnu.org> <4ffcb78e-3735-4c9d-9755-ff3403ca8071@beloved.name> <83fs21o5k5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------EQxj0WKeColHpEZFfcAoeL3y" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Oct 23 17:27:42 2023 Return-path: Envelope-to: ged-emacs-devel@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 1quwqD-0001oB-Mr for ged-emacs-devel@m.gmane-mx.org; Mon, 23 Oct 2023 17:27:41 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1quwoA-0004zs-8E; Mon, 23 Oct 2023 11:25:34 -0400 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 1quwo7-0004yS-Vd for emacs-devel@gnu.org; Mon, 23 Oct 2023 11:25:31 -0400 Original-Received: from relay3-d.mail.gandi.net ([2001:4b98:dc4:8::223]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1quwo4-0001D1-NU for emacs-devel@gnu.org; Mon, 23 Oct 2023 11:25:31 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 2AD9660008 for ; Mon, 23 Oct 2023 15:25:22 +0000 (UTC) Content-Language: en-US In-Reply-To: <83fs21o5k5.fsf@gnu.org> X-GND-Sasl: public@beloved.name Received-SPF: pass client-ip=2001:4b98:dc4:8::223; envelope-from=public@beloved.name; helo=relay3-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311723 Archived-At: This is a multi-part message in MIME format. --------------EQxj0WKeColHpEZFfcAoeL3y Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2023-10-23 15:02, Eli Zaretskii wrote: >> From: Stefan Kangas >> Date: Sun, 22 Oct 2023 15:24:36 -0700 >> >> David Hedlund writes: >> >>> Also, people expect GUIs that can start with a maximized window to not >>> gradually expand it. Emacs is the only GUI that behaves this way of all >>> the GUIs that I'm currently using. >> Right, but taking a step back here: should we consider that as a bug? >> >> IOW, instead of documenting workarounds, why isn't --maximized fixed to >> not have the "slightly distracting visual effect"? Is that impractical >> for some reason? > Is this really about --maximized? I thought this was about > customizations in the init file that cause frames to be maximized. Thank you for assisting me Eli, that is exactly what this is all about. -----------------------------------8<---------------------------------------------- To avoid the slightly distracting visual effect of Emacs starting with its default frame size and then growing to fullscreen, you can modify |.emacs.d/early-init.el| instead of .emacs (thanks Chad). (push '(fullscreen . maximized) default-frame-alist) It works even if it takes time to load a typical .emacs configuration, and has been successfully tested in GNU/Linux (both X11, and Wayland), and Windows. The push function in Emacs is used to add an element to the beginning of a list. In the expression (push ‘(fullscreen . maximized) default-frame-alist), the ‘(fullscreen . maximized) list is added to the beginning of the default-frame-alist list. The default-frame-alist variable is a list of property lists that are used to configure the initial appearance of Emacs frames. Each property list in the default-frame-alist variable contains a set of key-value pairs that specify properties for the frame. *Essentially the code above will make emacs behave like `emacs --maximize` automatically each time when you open it, because the --maximize argument also opens Emacs without the slightly distracting visual effect.* ---------------------------------->8------------------------------------------------ I think I failed with the bold text, can you please rephrase it for me, Eli? I really want to use --maximize as a reference since it is inbuilt Emacs. > The --maximized switch creates the frame maximized from the get-go > here. > A few days ago I posted this: -----------------------------------8<---------------------------------------------- I like Chad's solution to |.emacs.d/early-init.el: |(push '(fullscreen . maximized) default-frame-alist) However, I'd like to compare it with the Lisp code that is executed by `emacs --maximize`, can someone please help with find it? If it's better than Chad's solution, then I'm willing to update "To avoid the slightly distracting visual effect" (https://www.emacswiki.org/emacs/FullScreen#h5o-3) with code and a comment to the source file where this code is found. ---------------------------------->8------------------------------------------------ For starters, is it even possible to reuse all source code from --maximize in |early-init.el |or is it written in C? --------------EQxj0WKeColHpEZFfcAoeL3y Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit


On 2023-10-23 15:02, Eli Zaretskii wrote:
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 22 Oct 2023 15:24:36 -0700

David Hedlund <public@beloved.name> writes:

Also, people expect GUIs that can start with a maximized window to not
gradually expand it. Emacs is the only GUI that behaves this way of all
the GUIs that I'm currently using.
Right, but taking a step back here: should we consider that as a bug?

IOW, instead of documenting workarounds, why isn't --maximized fixed to
not have the "slightly distracting visual effect"?  Is that impractical
for some reason?
Is this really about --maximized?  I thought this was about
customizations in the init file that cause frames to be maximized.

Thank you for assisting me Eli, that is exactly what this is all about.

-----------------------------------8<----------------------------------------------

To avoid the slightly distracting visual effect of Emacs starting with its default frame size and then growing to fullscreen, you can modify .emacs.d/early-init.el instead of .emacs (thanks Chad).

  (push '(fullscreen . maximized) default-frame-alist)

It works even if it takes time to load a typical .emacs configuration, and has been successfully tested in GNU/Linux (both X11, and Wayland), and Windows.

The push function in Emacs is used to add an element to the beginning of a list. In the expression (push ‘(fullscreen . maximized) default-frame-alist), the ‘(fullscreen . maximized) list is added to the beginning of the default-frame-alist list. The default-frame-alist variable is a list of property lists that are used to configure the initial appearance of Emacs frames. Each property list in the default-frame-alist variable contains a set of key-value pairs that specify properties for the frame.

Essentially the code above will make emacs behave like `emacs --maximize` automatically each time when you open it, because the --maximize argument also opens Emacs without the slightly distracting visual effect.

---------------------------------->8------------------------------------------------

I think I failed with the bold text, can you please rephrase it for me, Eli? I really want to use --maximize as a reference since it is inbuilt Emacs.



The --maximized switch creates the frame maximized from the get-go
here.

A few days ago I posted this:

-----------------------------------8<----------------------------------------------


I like Chad's solution to .emacs.d/early-init.el: (push '(fullscreen . maximized) default-frame-alist)

However, I'd like to compare it with the Lisp code that is executed by `emacs --maximize`, can someone please help with find it?

If it's better than Chad's solution, then I'm willing to update "To avoid the slightly distracting visual effect" (https://www.emacswiki.org/emacs/FullScreen#h5o-3) with code and a comment to the source file where this code is found.

---------------------------------->8------------------------------------------------

For starters, is it even possible to reuse all source code from --maximize in early-init.el or is it written in C?


--------------EQxj0WKeColHpEZFfcAoeL3y--