all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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 ?
@ 2023-09-29 21:05 David Hedlund
  2023-09-30 13:57 ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: David Hedlund @ 2023-09-29 21:05 UTC (permalink / raw)
  To: Emacs-devel, Eli Zaretskii

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

Shouldn't

https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-MS_002dWindows.html 
be renamed to

https://www.gnu.org/software/emacs/manual/html_node/efaq/Maxmize-mode-on-MS_002dWindows.html 
?

Since it's about maximize mode, not full screen mode.


If so, then "fullscreen" should be replaced:

* "How can I start Emacs in fullscreen mode on MS-Windows" with "How can 
I start Emacs in maximized mode on MS-Windows"

* "To avoid the slightly distracting visual effect of Emacs starting 
with its default frame size and then growing to fullscreen" with "To 
avoid the slightly distracting visual effect of Emacs starting with its 
default frame size and then being maximized"


This will also help confusion with the ongoing discussion in the 
mailing-list with subject: "Solution to a proposed FAQ, how to maximize 
emacs quickly (like `emacs --maximize`) for GNU/Linux"

[-- Attachment #2: Type: text/html, Size: 1606 bytes --]

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

* 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 ?
  2023-09-29 21:05 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 ? David Hedlund
@ 2023-09-30 13:57 ` Eli Zaretskii
  2023-09-30 18:09   ` chad
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2023-09-30 13:57 UTC (permalink / raw)
  To: David Hedlund; +Cc: Emacs-devel

> Date: Fri, 29 Sep 2023 23:05:23 +0200
> From: David Hedlund <public@beloved.name>
> 
> Shouldn't 
> 
> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-MS_002dWindows.html
> be renamed to
> 
> https://www.gnu.org/software/emacs/manual/html_node/efaq/Maxmize-mode-on-MS_002dWindows.html
> ?
> 
> Since it's about maximize mode, not full screen mode.

"Fullscreen" is widely accepted terminology for what is discussed
there.  Moreover, typing "i maximized RET" and "i fullscreen RET" in
both the ELisp and the Emacs user manuals brings you to the same text,
so we already have the two equivalent terms covered, and renaming the
node is not necessary IMO.

> This will also help confusion with the ongoing discussion in the mailing-list with subject: "Solution to a
> proposed FAQ, how to maximize emacs quickly (like `emacs --maximize`) for GNU/Linux"

What confusion is that?  (It's a long discussion, with several
participants, so it is hard to tell to what confusion you are alluding
here.)



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

* 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 ?
  2023-09-30 13:57 ` Eli Zaretskii
@ 2023-09-30 18:09   ` chad
  2023-09-30 18:36     ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: chad @ 2023-09-30 18:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: David Hedlund, Emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2772 bytes --]

I'm trying to catch up here, as David Hedlund asked me if I could help
out (as English is not his most comfortable language), and the
conversation has splintered somewhat. I myself joined the conversation
a bit late, so I might be confused myself.

The issue that DH has raised, as I understand it, surrounds the FAQ
entry in the Emacs manual titled "Fullscreen mode on MS-Windows". This
FAQ covers a few different ways to adjust the emacs frame under
MS-Windows, including older versions of emacs that predate the emacs
function toggle-frame-maximized (or perhaps predate it functioning
under MS-Windows). He also prefers to avoid the situation where Emacs
maps a "normal" window and then resizes it later (perhaps because it's
distracting, because it seems to take longer, or some other reason).

The FAQ entry in the most recent release talks about avoiding this
"distracting visual effect" by setting ersatz X Resources via the
Windows registry or a short set of emacs commands. IIUC, DH was
searching for a solution that would cause emacs to start with a
fullscreen window (rather than start and quickly grow to fullscreen),
and that would work across platforms. This is where I jumped in.

The solution I proposed was: add this line to the early-init.el file:

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

There is a variant of this solution that instead uses:

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

to effect only the initial window.

With that as the background, I think the proposal is:

 In the efaq node "Fullscreen mode on MS-Windows", replace the
 following text:

>Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
>command-line option or put the following form in your init file (*note
>Setting up a customization file::):
>
>     (add-hook 'emacs-startup-hook 'toggle-frame-maximized)

With something like this:

>Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
>command-line option or put the following form in your early-init file
>(*note*note (emacs)Early Init File::):
>
>     (push '(fullscreen . maximized) default-frame-alist)

I don't know if it would be better to use initial-frame-alist or
default-frame-alist for this, and I'm not sure if there are
policy/practice details for the efaq manual to ref out to the emacs
manual, and I'm not in a good position to test the doc change myself,
so I'm not currently in position to send a patch. These changes seem
quite small and obvious to me, and I have a signed copyright
assignment on file from way back (if it matters and you have trouble
finding it, feel free to contact me and I'll figure out which email
address I used for it).

I hope that helps. Thanks!
~Chad

[-- Attachment #2: Type: text/html, Size: 3045 bytes --]

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

* 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 ?
  2023-09-30 18:09   ` chad
@ 2023-09-30 18:36     ` Eli Zaretskii
  2023-09-30 19:06       ` David Hedlund
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2023-09-30 18:36 UTC (permalink / raw)
  To: chad; +Cc: public, Emacs-devel

> From: chad <yandros@gmail.com>
> Date: Sat, 30 Sep 2023 14:09:22 -0400
> Cc: David Hedlund <public@beloved.name>, Emacs-devel@gnu.org
> 
> I'm trying to catch up here, as David Hedlund asked me if I could help
> out (as English is not his most comfortable language), and the
> conversation has splintered somewhat. I myself joined the conversation
> a bit late, so I might be confused myself.
> 
> The issue that DH has raised, as I understand it, surrounds the FAQ
> entry in the Emacs manual titled "Fullscreen mode on MS-Windows". This
> FAQ covers a few different ways to adjust the emacs frame under
> MS-Windows, including older versions of emacs that predate the emacs
> function toggle-frame-maximized (or perhaps predate it functioning
> under MS-Windows). He also prefers to avoid the situation where Emacs
> maps a "normal" window and then resizes it later (perhaps because it's
> distracting, because it seems to take longer, or some other reason).
> 
> The FAQ entry in the most recent release talks about avoiding this
> "distracting visual effect" by setting ersatz X Resources via the
> Windows registry or a short set of emacs commands. IIUC, DH was
> searching for a solution that would cause emacs to start with a
> fullscreen window (rather than start and quickly grow to fullscreen),
> and that would work across platforms. This is where I jumped in.
> 
> The solution I proposed was: add this line to the early-init.el file:
> 
>   (push '(fullscreen . maximized) default-frame-alist)
> 
> There is a variant of this solution that instead uses:
> 
>   (push '(fullscreen . maximized) initial-frame-alist)
> 
> to effect only the initial window.
> 
> With that as the background, I think the proposal is:
> 
>  In the efaq node "Fullscreen mode on MS-Windows", replace the
>  following text:
> 
> >Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
> >command-line option or put the following form in your init file (*note
> >Setting up a customization file::):
> >
> >     (add-hook 'emacs-startup-hook 'toggle-frame-maximized)
> 
> With something like this:
> 
> >Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
> >command-line option or put the following form in your early-init file
> >(*note*note (emacs)Early Init File::):
> >
> >     (push '(fullscreen . maximized) default-frame-alist)

Thanks.

Unfortunately, this just increases the confusion in this thread.  Let
me explain why.

First, that section in the FAQ is specifically about MS-Windows.  So
looking for a portable solution is okay, but is out of scope of the
question that section tries to answer.

Second, I don't understand what is wrong with what the FAQ says
already, viz.:

  Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
  command-line option or put the following form in your init file (*note
  Setting up a customization file::):

       (add-hook 'emacs-startup-hook 'toggle-frame-maximized)

  [...]
  Alternatively, you can avoid the visual effect of Emacs changing its
  frame size entirely in your init file (i.e., without using the
  Registry), like this:

  @lisp
  (setq frame-resize-pixelwise t)
  (set-frame-position nil 0 0)
  (set-frame-size nil (display-pixel-width) (display-pixel-height) t)
  @end lisp

Do these two methods not work, or have some downside?  If they do
work, then we could perhaps _add_ an alternative solution, but I don't
see why we should _replace_ the existing one(s).

Next, the alternative solution does have a drawback, albeit a minor
one: it uses early-init.el, something that is explicitly NOT
recommended for display-related customizations.  It evidently works in
this case, but advertising this in the FAQ flies in the face of our
general recommendation not to do this kind of stuff there.

To summarize:

  . if what we have in the FAQ is incorrect or not good enough, please
    someone explain what and why
  . if it _is_ correct, why replace it?



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

* 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 ?
  2023-09-30 18:36     ` Eli Zaretskii
@ 2023-09-30 19:06       ` David Hedlund
  2023-09-30 19:21         ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: David Hedlund @ 2023-09-30 19:06 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 4922 bytes --]


On 9/30/23 20:36, Eli Zaretskii wrote:
>> From: chad<yandros@gmail.com>
>> Date: Sat, 30 Sep 2023 14:09:22 -0400
>> Cc: David Hedlund<public@beloved.name>,Emacs-devel@gnu.org
>>
>> I'm trying to catch up here, as David Hedlund asked me if I could help
>> out (as English is not his most comfortable language), and the
>> conversation has splintered somewhat. I myself joined the conversation
>> a bit late, so I might be confused myself.
>>
>> The issue that DH has raised, as I understand it, surrounds the FAQ
>> entry in the Emacs manual titled "Fullscreen mode on MS-Windows". This
>> FAQ covers a few different ways to adjust the emacs frame under
>> MS-Windows, including older versions of emacs that predate the emacs
>> function toggle-frame-maximized (or perhaps predate it functioning
>> under MS-Windows). He also prefers to avoid the situation where Emacs
>> maps a "normal" window and then resizes it later (perhaps because it's
>> distracting, because it seems to take longer, or some other reason).
>>
>> The FAQ entry in the most recent release talks about avoiding this
>> "distracting visual effect" by setting ersatz X Resources via the
>> Windows registry or a short set of emacs commands. IIUC, DH was
>> searching for a solution that would cause emacs to start with a
>> fullscreen window (rather than start and quickly grow to fullscreen),
>> and that would work across platforms. This is where I jumped in.
>>
>> The solution I proposed was: add this line to the early-init.el file:
>>
>>    (push '(fullscreen . maximized) default-frame-alist)
>>
>> There is a variant of this solution that instead uses:
>>
>>    (push '(fullscreen . maximized) initial-frame-alist)
>>
>> to effect only the initial window.
>>
>> With that as the background, I think the proposal is:
>>
>>   In the efaq node "Fullscreen mode on MS-Windows", replace the
>>   following text:
>>
>>> Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
>>> command-line option or put the following form in your init file (*note
>>> Setting up a customization file::):
>>>
>>>      (add-hook 'emacs-startup-hook 'toggle-frame-maximized)
>> With something like this:
>>
>>> Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
>>> command-line option or put the following form in your early-init file
>>> (*note*note (emacs)Early Init File::):
>>>
>>>      (push '(fullscreen . maximized) default-frame-alist)
> Thanks.
>
> Unfortunately, this just increases the confusion in this thread.  Let
> me explain why.
>
> First, that section in the FAQ is specifically about MS-Windows.  So
> looking for a portable solution is okay, but is out of scope of the
> question that section tries to answer.
>
> Second, I don't understand what is wrong with what the FAQ says
> already, viz.:
>
>    Beginning with Emacs 24.4 either run Emacs with the ‘--maximized’
>    command-line option or put the following form in your init file (*note
>    Setting up a customization file::):
>
>         (add-hook 'emacs-startup-hook 'toggle-frame-maximized)
>
>    [...]
>    Alternatively, you can avoid the visual effect of Emacs changing its
>    frame size entirely in your init file (i.e., without using the
>    Registry), like this:
>
>    @lisp
>    (setq frame-resize-pixelwise t)
>    (set-frame-position nil 0 0)
>    (set-frame-size nil (display-pixel-width) (display-pixel-height) t)
>    @end lisp

I contributed with that code.


> Do these two methods not work, or have some downside?  If they do
> work, then we could perhaps _add_ an alternative solution, but I don't
> see why we should _replace_ the existing one(s).

I agree that it should be added (not replaced).

>
> Next, the alternative solution does have a drawback, albeit a minor
> one: it uses early-init.el, something that is explicitly NOT
> recommended for display-related customizations.  It evidently works in
> this case, but advertising this in the FAQ flies in the face of our
> general recommendation not to do this kind of stuff there.


While we're speaking about this, this is a relevant question regarding 
the issue for GNU/Linux: So even "(push '(fullscreen . maximized) 
default-frame-alist)" to ~/.emacs.d/early-init.el is the only solution 
to automatically maximize emacs without the visually distracting effect 
in GNU/Linux, should it not be added to the FAQ to a new section, say 
https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-GNU-Linux.htm? 
Just "(add-hook 'emacs-startup-hook 'toggle-frame-maximized)" to the top 
~/.emacs file if it has a common size (say 100 lines), will cause it to 
maximize the windows but not without the visually distracting effect.


>
> To summarize:
>
>    . if what we have in the FAQ is incorrect or not good enough, please
>      someone explain what and why

The FAQ is correct.


>    . if it _is_ correct, why replace it?
>
No need to replace it.

[-- Attachment #2: Type: text/html, Size: 6549 bytes --]

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

* 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 ?
  2023-09-30 19:06       ` David Hedlund
@ 2023-09-30 19:21         ` Eli Zaretskii
  2023-10-02 22:40           ` David Hedlund
  2023-10-21  9:35           ` Stefan Kangas
  0 siblings, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2023-09-30 19:21 UTC (permalink / raw)
  To: David Hedlund, Stefan Kangas; +Cc: emacs-devel

> Date: Sat, 30 Sep 2023 21:06:52 +0200
> From: David Hedlund <public@beloved.name>
> 
> Do these two methods not work, or have some downside?  If they do
> work, then we could perhaps _add_ an alternative solution, but I don't
> see why we should _replace_ the existing one(s).
> 
> I agree that it should be added (not replaced).

OK.

> Next, the alternative solution does have a drawback, albeit a minor
> one: it uses early-init.el, something that is explicitly NOT
> recommended for display-related customizations.  It evidently works in
> this case, but advertising this in the FAQ flies in the face of our
> general recommendation not to do this kind of stuff there.

Specifically, the Emacs user manual says:

     We do not recommend that you move into ‘early-init.el’ customizations
  that can be left in the normal init files.  That is because the early
  init file is read before the GUI is initialized, so customizations
  related to GUI features will not work reliably in ‘early-init.el’.  By
  contrast, the normal init files are read after the GUI is initialized.
  If you must have customizations in the early init file that rely on GUI
  features, make them run off hooks provided by the Emacs startup, such as
  ‘window-setup-hook’ or ‘tty-setup-hook’.  *Note Hooks::.

So I wonder whether we should advertise the suggested addition for
early-init file.  Stefan, WDYT?

> While we're speaking about this, this is a relevant question regarding the issue for GNU/Linux: So
> even "(push '(fullscreen . maximized) default-frame-alist)" to ~/.emacs.d/early-init.el is the only
> solution to automatically maximize emacs without the visually distracting effect in GNU/Linux, should
> it not be added to the FAQ to a new section, say
> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-GNU-Linux.htm?
> Just "(add-hook 'emacs-startup-hook 'toggle-frame-maximized)" to the top ~/.emacs file if it has a
> common size (say 100 lines), will cause it to maximize the windows but not without the visually
> distracting effect.

Is this indeed a "frequently-asked" question, about GNU/Linux?  If it
is, I'm okay with adding such a section, or even rewriting this
section (and renaming it) to make it not Windows-specific.  But we do
not usually add here answers for questions just because they _could_
be asked.  Again, I'd like to hear Stefan's opinion on this.



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

* 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 ?
  2023-09-30 19:21         ` Eli Zaretskii
@ 2023-10-02 22:40           ` David Hedlund
  2023-10-02 23:05             ` Emanuel Berg
  2023-10-21  9:35           ` Stefan Kangas
  1 sibling, 1 reply; 27+ messages in thread
From: David Hedlund @ 2023-10-02 22:40 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2523 bytes --]


On 9/30/23 21:21, Eli Zaretskii wrote:
>> Date: Sat, 30 Sep 2023 21:06:52 +0200
>> From: David Hedlund<public@beloved.name>
>>
>> Do these two methods not work, or have some downside?  If they do
>> work, then we could perhaps _add_ an alternative solution, but I don't
>> see why we should _replace_ the existing one(s).
>>
>> I agree that it should be added (not replaced).
> OK.
>
>> Next, the alternative solution does have a drawback, albeit a minor
>> one: it uses early-init.el, something that is explicitly NOT
>> recommended for display-related customizations.  It evidently works in
>> this case, but advertising this in the FAQ flies in the face of our
>> general recommendation not to do this kind of stuff there.
> Specifically, the Emacs user manual says:
>
>       We do not recommend that you move into ‘early-init.el’ customizations
>    that can be left in the normal init files.  That is because the early
>    init file is read before the GUI is initialized, so customizations
>    related to GUI features will not work reliably in ‘early-init.el’.  By
>    contrast, the normal init files are read after the GUI is initialized.
>    If you must have customizations in the early init file that rely on GUI
>    features, make them run off hooks provided by the Emacs startup, such as
>    ‘window-setup-hook’ or ‘tty-setup-hook’.  *Note Hooks::.
>
> So I wonder whether we should advertise the suggested addition for
> early-init file.  Stefan, WDYT?
>
>> While we're speaking about this, this is a relevant question regarding the issue for GNU/Linux: So
>> even "(push '(fullscreen . maximized) default-frame-alist)" to ~/.emacs.d/early-init.el is the only
>> solution to automatically maximize emacs without the visually distracting effect in GNU/Linux, should
>> it not be added to the FAQ to a new section, say
>> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-GNU-Linux.htm?
>> Just "(add-hook 'emacs-startup-hook 'toggle-frame-maximized)" to the top ~/.emacs file if it has a
>> common size (say 100 lines), will cause it to maximize the windows but not without the visually
>> distracting effect.
> Is this indeed a "frequently-asked" question, about GNU/Linux?

Yes.

> If it
> is, I'm okay with adding such a section, or even rewriting this
> section (and renaming it) to make it not Windows-specific.  But we do
> not usually add here answers for questions just because they _could_
> be asked.  Again, I'd like to hear Stefan's opinion on this.
>

[-- Attachment #2: Type: text/html, Size: 3598 bytes --]

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

* 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 ?
  2023-10-02 22:40           ` David Hedlund
@ 2023-10-02 23:05             ` Emanuel Berg
  2023-10-05  3:56               ` David Hedlund
  0 siblings, 1 reply; 27+ messages in thread
From: Emanuel Berg @ 2023-10-02 23:05 UTC (permalink / raw)
  To: emacs-devel

David Hedlund wrote:

>>> While we're speaking about this, this is a relevant
>>> question regarding the issue for GNU/Linux: So even "(push
>>> '(fullscreen . maximized) default-frame-alist)" to
>>> ~/.emacs.d/early-init.el is the only solution to
>>> automatically maximize emacs without the visually
>>> distracting effect in GNU/Linux, should it not be added to
>>> the FAQ to a new section, say
>>> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-GNU-Linux.htm?
>>> Just "(add-hook 'emacs-startup-hook
>>> 'toggle-frame-maximized)" to the top ~/.emacs file if it
>>> has a common size (say 100 lines), will cause it to
>>> maximize the windows but not without the visually
>>> distracting effect.
>>
>> Is this indeed a "frequently-asked" question, about GNU/Linux?
>
> Yes.

David, if you think it's a good idea, start by adding
everything you have discovered and including all details to
the EmacsWiki, for a suitable page for the purpose - it can be
a lot of fun for you fiddling with all that to present all
the material neatly and organized.

After that, whenever this question comes up we will refer to
that Wiki page, and such a reference can be added to other
documents as well, possibly.

-- 
underground experts united
https://dataswamp.org/~incal




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

* 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 ?
  2023-10-02 23:05             ` Emanuel Berg
@ 2023-10-05  3:56               ` David Hedlund
  0 siblings, 0 replies; 27+ messages in thread
From: David Hedlund @ 2023-10-05  3:56 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]


On 10/3/23 01:05, Emanuel Berg wrote:
> David Hedlund wrote:
>
>>>> While we're speaking about this, this is a relevant
>>>> question regarding the issue for GNU/Linux: So even "(push
>>>> '(fullscreen . maximized) default-frame-alist)" to
>>>> ~/.emacs.d/early-init.el is the only solution to
>>>> automatically maximize emacs without the visually
>>>> distracting effect in GNU/Linux, should it not be added to
>>>> the FAQ to a new section, say
>>>> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-GNU-Linux.htm?
>>>> Just "(add-hook 'emacs-startup-hook
>>>> 'toggle-frame-maximized)" to the top ~/.emacs file if it
>>>> has a common size (say 100 lines), will cause it to
>>>> maximize the windows but not without the visually
>>>> distracting effect.
>>> Is this indeed a "frequently-asked" question, about GNU/Linux?
>> Yes.
> David, if you think it's a good idea, start by adding
> everything you have discovered and including all details to
> the EmacsWiki, for a suitable page for the purpose - it can be
> a lot of fun for you fiddling with all that to present all
> the material neatly and organized.
>
> After that, whenever this question comes up we will refer to
> that Wiki page, and such a reference can be added to other
> documents as well, possibly.
>
EmacsWiki Full Screen, section Configuring fullscreen mode - 
https://www.emacswiki.org/emacs/FullScreen#h5o-2

Probably the simplest way to configure fullscreen or maximized mode is 
to customize |initial-frame-alist|

(custom-set-variables
  '(initial-frame-alist (quote ((fullscreen . maximized)))))

----------------Text that I added 
----------------------8<---------------------

         To avoid the slightly distracting visual effect of Emacs 
starting with its default frame size and then growing to fullscreen, you 
can add an the above lines to .emacs.d/early-init.el instead of .emacs 
(thanks Chad). This has been successfully tested in GNU/Linux (both X11, 
and Wayland), and Windows.

-----------------End text that I added 
----------------------8<-----------------------------




I also added a new section for the devilspie2 solution:

     External program: devilspie2 - 
https://www.emacswiki.org/emacs/FullScreen#h5o-25


[-- Attachment #2: Type: text/html, Size: 3535 bytes --]

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

* 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 ?
  2023-09-30 19:21         ` Eli Zaretskii
  2023-10-02 22:40           ` David Hedlund
@ 2023-10-21  9:35           ` Stefan Kangas
  2023-10-21  9:52             ` Eli Zaretskii
  2023-10-21 12:55             ` David Hedlund
  1 sibling, 2 replies; 27+ messages in thread
From: Stefan Kangas @ 2023-10-21  9:35 UTC (permalink / raw)
  To: Eli Zaretskii, David Hedlund; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> Next, the alternative solution does have a drawback, albeit a minor
>> one: it uses early-init.el, something that is explicitly NOT
>> recommended for display-related customizations.  It evidently works in
>> this case, but advertising this in the FAQ flies in the face of our
>> general recommendation not to do this kind of stuff there.
>
> Specifically, the Emacs user manual says:
>
>      We do not recommend that you move into ‘early-init.el’ customizations
>   that can be left in the normal init files.  That is because the early
>   init file is read before the GUI is initialized, so customizations
>   related to GUI features will not work reliably in ‘early-init.el’.  By
>   contrast, the normal init files are read after the GUI is initialized.
>   If you must have customizations in the early init file that rely on GUI
>   features, make them run off hooks provided by the Emacs startup, such as
>   ‘window-setup-hook’ or ‘tty-setup-hook’.  *Note Hooks::.
>
> So I wonder whether we should advertise the suggested addition for
> early-init file.  Stefan, WDYT?

I honestly don't know.  Do we foresee any issues with it?

BTW, how would one otherwise affect the default frame parameters, if not
by adding it to "early-init.el"?  It seems like you have no choice but
modify `default-frame-alist' before the first frame is created, if you
want it to affect the first frame.  So perhaps doing it this way is "the
right thing", even?

The above text speaks of "customizations related to GUI features", but
doesn't give any examples.  I'm not an expert at that stuff, so it's
hard for me to understand which features might be covered by that.
Perhaps it's a small list that could be enumerated exhaustively, or
perhaps it's basically everything with a few exceptions.

> Is this indeed a "frequently-asked" question, about GNU/Linux?  If it
> is, I'm okay with adding such a section, or even rewriting this
> section (and renaming it) to make it not Windows-specific.  But we do
> not usually add here answers for questions just because they _could_
> be asked.  Again, I'd like to hear Stefan's opinion on this.

I agree that the FAQ should focus on, well, Frequently Asked Questions.
The work I'd personally like to see on the FAQ would be to get rid of
old stuff, which is no longer asked much, and adding new stuff which is.
That way, perhaps it would become more popular and useful, in particular
to new users.

This particular case is not easy to answer.  I have never heard this
question before, but that might be because I've used tiling window
managers since basically forever.  So I feel like I might be biased.

David, if you think this question is asked often, could you tell us a
bit more about it?  I understand that it might be hard to provide URLs,
but even just anecdotes might be useful.



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

* 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 ?
  2023-10-21  9:35           ` Stefan Kangas
@ 2023-10-21  9:52             ` Eli Zaretskii
  2023-10-21 10:02               ` Stefan Kangas
  2023-10-21 12:55             ` David Hedlund
  1 sibling, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2023-10-21  9:52 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: public, emacs-devel

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sat, 21 Oct 2023 02:35:07 -0700
> Cc: emacs-devel@gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Next, the alternative solution does have a drawback, albeit a minor
> >> one: it uses early-init.el, something that is explicitly NOT
> >> recommended for display-related customizations.  It evidently works in
> >> this case, but advertising this in the FAQ flies in the face of our
> >> general recommendation not to do this kind of stuff there.
> >
> > Specifically, the Emacs user manual says:
> >
> >      We do not recommend that you move into ‘early-init.el’ customizations
> >   that can be left in the normal init files.  That is because the early
> >   init file is read before the GUI is initialized, so customizations
> >   related to GUI features will not work reliably in ‘early-init.el’.  By
> >   contrast, the normal init files are read after the GUI is initialized.
> >   If you must have customizations in the early init file that rely on GUI
> >   features, make them run off hooks provided by the Emacs startup, such as
> >   ‘window-setup-hook’ or ‘tty-setup-hook’.  *Note Hooks::.
> >
> > So I wonder whether we should advertise the suggested addition for
> > early-init file.  Stefan, WDYT?
> 
> I honestly don't know.  Do we foresee any issues with it?

Probably not with this specific one, but other customizations of
default-frame-alist could potentially have undesirable effects.

> BTW, how would one otherwise affect the default frame parameters, if not
> by adding it to "early-init.el"?  It seems like you have no choice but
> modify `default-frame-alist' before the first frame is created, if you
> want it to affect the first frame.  So perhaps doing it this way is "the
> right thing", even?

The startup code explicitly supports customization of
default-frame-alist in the "usual" user init files: it re-applies
default-frame-alist after the init files were loaded.  This whole
discussion is because some people don't like the momentary flash of
the initial frame without the customizations in default-frame-alist
applied, something that we had for decades without anyone complaining.

IOW, this is merely a minor visual annoyance, not a bug in Emacs.

> The above text speaks of "customizations related to GUI features", but
> doesn't give any examples.  I'm not an expert at that stuff, so it's
> hard for me to understand which features might be covered by that.
> Perhaps it's a small list that could be enumerated exhaustively, or
> perhaps it's basically everything with a few exceptions.

I'm okay with someone doing the job of collecting the problematic
settings.  Any takers?



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

* 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 ?
  2023-10-21  9:52             ` Eli Zaretskii
@ 2023-10-21 10:02               ` Stefan Kangas
  2023-10-21 11:18                 ` Eli Zaretskii
  2023-10-21 20:05                 ` chad
  0 siblings, 2 replies; 27+ messages in thread
From: Stefan Kangas @ 2023-10-21 10:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: public, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

> Probably not with this specific one, but other customizations of
> default-frame-alist could potentially have undesirable effects.

If we want to add this to the FAQ, perhaps we could add a disclaimer
along these lines:

    "While some customizations of `default-frame-alist' could have
    undesirable effects when modified in early-init.el, it is okay to do
    it in this particular case."

That way, users would know that they should be careful with generalizing
the given example.

WDYT?



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

* 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 ?
  2023-10-21 10:02               ` Stefan Kangas
@ 2023-10-21 11:18                 ` Eli Zaretskii
  2023-10-21 20:05                 ` chad
  1 sibling, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2023-10-21 11:18 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: public, emacs-devel

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Sat, 21 Oct 2023 03:02:43 -0700
> Cc: public@beloved.name, emacs-devel@gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Probably not with this specific one, but other customizations of
> > default-frame-alist could potentially have undesirable effects.
> 
> If we want to add this to the FAQ, perhaps we could add a disclaimer
> along these lines:
> 
>     "While some customizations of `default-frame-alist' could have
>     undesirable effects when modified in early-init.el, it is okay to do
>     it in this particular case."
> 
> That way, users would know that they should be careful with generalizing
> the given example.
> 
> WDYT?

Something like that, yes.



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

* 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 ?
  2023-10-21  9:35           ` Stefan Kangas
  2023-10-21  9:52             ` Eli Zaretskii
@ 2023-10-21 12:55             ` David Hedlund
  2023-10-22 22:24               ` Stefan Kangas
  1 sibling, 1 reply; 27+ messages in thread
From: David Hedlund @ 2023-10-21 12:55 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 3394 bytes --]


On 2023-10-21 11:35, Stefan Kangas wrote:
> Eli Zaretskii<eliz@gnu.org>  writes:
>
>>> Next, the alternative solution does have a drawback, albeit a minor
>>> one: it uses early-init.el, something that is explicitly NOT
>>> recommended for display-related customizations.  It evidently works in
>>> this case, but advertising this in the FAQ flies in the face of our
>>> general recommendation not to do this kind of stuff there.
>> Specifically, the Emacs user manual says:
>>
>>       We do not recommend that you move into ‘early-init.el’ customizations
>>    that can be left in the normal init files.  That is because the early
>>    init file is read before the GUI is initialized, so customizations
>>    related to GUI features will not work reliably in ‘early-init.el’.  By
>>    contrast, the normal init files are read after the GUI is initialized.
>>    If you must have customizations in the early init file that rely on GUI
>>    features, make them run off hooks provided by the Emacs startup, such as
>>    ‘window-setup-hook’ or ‘tty-setup-hook’.  *Note Hooks::.
>>
>> So I wonder whether we should advertise the suggested addition for
>> early-init file.  Stefan, WDYT?
> I honestly don't know.  Do we foresee any issues with it?
>
> BTW, how would one otherwise affect the default frame parameters, if not
> by adding it to "early-init.el"?  It seems like you have no choice but
> modify `default-frame-alist' before the first frame is created, if you
> want it to affect the first frame.  So perhaps doing it this way is "the
> right thing", even?
>
> The above text speaks of "customizations related to GUI features", but
> doesn't give any examples.  I'm not an expert at that stuff, so it's
> hard for me to understand which features might be covered by that.
> Perhaps it's a small list that could be enumerated exhaustively, or
> perhaps it's basically everything with a few exceptions.
>
>> Is this indeed a "frequently-asked" question, about GNU/Linux?  If it
>> is, I'm okay with adding such a section, or even rewriting this
>> section (and renaming it) to make it not Windows-specific.  But we do
>> not usually add here answers for questions just because they _could_
>> be asked.  Again, I'd like to hear Stefan's opinion on this.
> I agree that the FAQ should focus on, well, Frequently Asked Questions.
> The work I'd personally like to see on the FAQ would be to get rid of
> old stuff, which is no longer asked much, and adding new stuff which is.
> That way, perhaps it would become more popular and useful, in particular
> to new users.
>
> This particular case is not easy to answer.  I have never heard this
> question before, but that might be because I've used tiling window
> managers since basically forever.  So I feel like I might be biased.

If you want, you can try the early-init.el instead for a while to get 
comfortable with it.

> David, if you think this question is asked often, could you tell us a
> bit more about it?  I understand that it might be hard to provide URLs,
> but even just anecdotes might be useful.
>
It's already to the FAQ: 
https://www.gnu.org/software/emacs/manual/html_mono/efaq.html#Fullscreen-mode-on-MS_002dWindows

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.


[-- Attachment #2: Type: text/html, Size: 4638 bytes --]

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

* 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 ?
  2023-10-21 10:02               ` Stefan Kangas
  2023-10-21 11:18                 ` Eli Zaretskii
@ 2023-10-21 20:05                 ` chad
  1 sibling, 0 replies; 27+ messages in thread
From: chad @ 2023-10-21 20:05 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: Eli Zaretskii, public, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1891 bytes --]

On Sat, Oct 21, 2023 at 7:07 AM Stefan Kangas <stefankangas@gmail.com>
wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
> > Probably not with this specific one, but other customizations of
> > default-frame-alist could potentially have undesirable effects.
>
> If we want to add this to the FAQ, perhaps we could add a disclaimer [...]
>

I don't have strong opinions about how frequently this (sort of) question
comes up, but I can add a couple data points:

First, I've been doing this sort of frame configuration in early-init.el
basically since it was added to master.

The general class of things that can cause problems, from my memory, is
things where the setting depends on some gui-specific stuff that is not yet
initialized during early-init. For example, conditioning on window-system
is questionable. Another "common" problem I've seen is setting fonts in
initial/default-frame-alist without checking to ensure that Emacs can find
the named font. In fact, since the arrival of early-init.el, I have, at
various times, conditioned the setting based on finding the font in
font-family-alist, and/or moved the setting to
server-after-make-frame-hook. These days I just set it unconditionally and
live with the (very rare) trouble when setting up on a new system, but I
wouldn't suggest that in a FAQ or piece of beginner advice.

If we want to try to gather some other settings that might apply to this
case, I'll mention that setting menu-bar-lines, tool-bar-lines,
vertical-scroll-bars, and scroll-bar-width in early-init.el have all helped
avoid redraw/flicker on various systems in the past. Memory suggests that
setting frame-inhibit-implied-resize in early-init.el can have an impact
here, but those memories are partially based on a variety of older gui
systems, and might be less impactful today.

As usual, I hope this helps,
~Chad

[-- Attachment #2: Type: text/html, Size: 2399 bytes --]

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

* 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 ?
  2023-10-21 12:55             ` David Hedlund
@ 2023-10-22 22:24               ` Stefan Kangas
  2023-10-23 13:02                 ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Stefan Kangas @ 2023-10-22 22:24 UTC (permalink / raw)
  To: David Hedlund, emacs-devel

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?



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

* 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 ?
  2023-10-22 22:24               ` Stefan Kangas
@ 2023-10-23 13:02                 ` Eli Zaretskii
  2023-10-23 15:25                   ` David Hedlund
  2023-10-23 15:33                   ` Stefan Kangas
  0 siblings, 2 replies; 27+ messages in thread
From: Eli Zaretskii @ 2023-10-23 13:02 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: public, emacs-devel

> 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.
The --maximized switch creates the frame maximized from the get-go
here.



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

* 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 ?
  2023-10-23 13:02                 ` Eli Zaretskii
@ 2023-10-23 15:25                   ` David Hedlund
  2023-10-23 15:33                   ` Stefan Kangas
  1 sibling, 0 replies; 27+ messages in thread
From: David Hedlund @ 2023-10-23 15:25 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 3180 bytes --]


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?


[-- Attachment #2: Type: text/html, Size: 4718 bytes --]

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

* 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 ?
  2023-10-23 13:02                 ` Eli Zaretskii
  2023-10-23 15:25                   ` David Hedlund
@ 2023-10-23 15:33                   ` Stefan Kangas
  2023-10-23 15:58                     ` David Hedlund
  1 sibling, 1 reply; 27+ messages in thread
From: Stefan Kangas @ 2023-10-23 15:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: public, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.
> The --maximized switch creates the frame maximized from the get-go
> here.

You are correct, sorry for the confusion.  It's good to learn that
--maximized works without issue.

So I guess this discussion is about:

    (add-hook 'emacs-startup-hook 'toggle-frame-maximized)

Then I guess I have the same question, but for that customization.  Why
do we suggest a customization which has a "slighty distracting visual
effect"?  Can we come up with a way to provide a one-line customization
that does not have this issue?

PS.  On a side note, --maximized doesn't seem to work on this macOS
     machine.  I'll open a separate bug report for that.



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

* 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 ?
  2023-10-23 15:33                   ` Stefan Kangas
@ 2023-10-23 15:58                     ` David Hedlund
  2023-10-28 17:25                       ` Stefan Kangas
  0 siblings, 1 reply; 27+ messages in thread
From: David Hedlund @ 2023-10-23 15:58 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 2369 bytes --]


On 2023-10-23 17:33, Stefan Kangas wrote:
> Eli Zaretskii<eliz@gnu.org>  writes:
>
>>> 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.
>> The --maximized switch creates the frame maximized from the get-go
>> here.
> You are correct, sorry for the confusion.  It's good to learn that
> --maximized works without issue.
>
> So I guess this discussion is about:
>
>      (add-hook 'emacs-startup-hook 'toggle-frame-maximized)
>
> Then I guess I have the same question, but for that customization.  Why
> do we suggest a customization which has a "slighty distracting visual
> effect"?

That is why I wrote this section in 
https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-MS_002dWindows.html

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

Alternatively, you can avoid the visual effect of Emacs changing its 
frame size entirely in your init file (i.e., without using the 
Registry), like this:

(setq frame-resize-pixelwise t)
(set-frame-position nil 0 0)
(set-frame-size nil (display-pixel-width) (display-pixel-height) t)

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

However, it doesn't work in GNU/Linux.


>    Can we come up with a way to provide a one-line customization
> that does not have this issue?

As mentioned in the thread with Subject: *Solution to a proposed FAQ, 
how to maximize emacs quickly (like `emacs --maximize`) for GNU/Linux - 
Improved solution by Chad: ~/.emacs.d/early-init.el* 
(https://lists.gnu.org/archive/html/emacs-devel/2023-10/msg00070.html) a 
one-line customization that works is to add this to .emacs.d/early-init.el:

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

* It works even if it takes time to load a typical .emacs configuration

* I've successfully tested it in GNU/Linux (both X11, and Wayland), and 
Windows.


> PS.  On a side note, --maximized doesn't seem to work on this macOS
>       machine.  I'll open a separate bug report for that.
>
Thank you very much!


[-- Attachment #2: Type: text/html, Size: 4132 bytes --]

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

* 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 ?
  2023-10-23 15:58                     ` David Hedlund
@ 2023-10-28 17:25                       ` Stefan Kangas
  2023-10-28 17:34                         ` Emanuel Berg
                                           ` (2 more replies)
  0 siblings, 3 replies; 27+ messages in thread
From: Stefan Kangas @ 2023-10-28 17:25 UTC (permalink / raw)
  To: David Hedlund, emacs-devel

David Hedlund <public@beloved.name> writes:

>> You are correct, sorry for the confusion.  It's good to learn that
>> --maximized works without issue.
>>
>> So I guess this discussion is about:
>>
>>      (add-hook 'emacs-startup-hook 'toggle-frame-maximized)
>>
>> Then I guess I have the same question, but for that customization.  Why
>> do we suggest a customization which has a "slighty distracting visual
>> effect"?
>
> That is why I wrote this section in
> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-MS_002dWindows.html

So how about installing something like the below (on master)?

diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
index d8097a8d21e..9f0dce288bc 100644
--- a/doc/misc/efaq.texi
+++ b/doc/misc/efaq.texi
@@ -3110,45 +3110,22 @@ Escape sequences in shell output
 @code{ansi-color} package, which lets Shell mode recognize these
 escape sequences.  It is enabled by default.

-@node Fullscreen mode on MS-Windows
-@section How can I start Emacs in fullscreen mode on MS-Windows?
+@node Fullscreen mode
+@section How can I start Emacs in fullscreen mode?
 @cindex Maximize frame
 @cindex Fullscreen mode

-Beginning with Emacs 24.4 either run Emacs with the @samp{--maximized}
-command-line option or put the following form in your init file
-(@pxref{Setting up a customization file}):
-
-@lisp
-(add-hook 'emacs-startup-hook 'toggle-frame-maximized)
-@end lisp
-
-With older versions use the function @code{w32-send-sys-command}.  For
-example, you can put the following in your init file:
-
-@lisp
-(add-hook 'emacs-startup-hook
-          (lambda () (w32-send-sys-command ?\xF030)))
-@end lisp
-
-To avoid the slightly distracting visual effect of Emacs starting with
-its default frame size and then growing to fullscreen, you can add an
-@samp{Emacs.Geometry} entry to the Windows Registry settings.  @xref{X
-Resources,,, emacs, The GNU Emacs Manual}.  To compute the correct
-values for width and height you use in the Registry settings, first
-maximize the Emacs frame and then evaluate @code{(frame-height)} and
-@code{(frame-width)} with @kbd{M-:}.
-
-Alternatively, you can avoid the visual effect of Emacs changing its
-frame size entirely in your init file (i.e., without using the
-Registry), like this:
+Run Emacs with the @samp{--maximized} command-line option or put the
+following form in your early init file (@pxref{Early Init File,,,
+emacs, The GNU Emacs Manual}).

 @lisp
-(setq frame-resize-pixelwise t)
-(set-frame-position nil 0 0)
-(set-frame-size nil (display-pixel-width) (display-pixel-height) t)
+(push '(fullscreen . maximized) default-frame-alist)
 @end lisp

+Note that while some customizations of @code{default-frame-alist}
+could have undesirable effects when modified in @file{early-init.el},
+it is okay to do it in this particular case.

 @node Emacs in a Linux console
 @section How can I alleviate the limitations of the Linux console?



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

* 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 ?
  2023-10-28 17:25                       ` Stefan Kangas
@ 2023-10-28 17:34                         ` Emanuel Berg
  2023-10-28 18:51                           ` Eli Zaretskii
  2023-10-28 18:02                         ` David Hedlund
  2023-11-04 13:58                         ` Stefan Kangas
  2 siblings, 1 reply; 27+ messages in thread
From: Emanuel Berg @ 2023-10-28 17:34 UTC (permalink / raw)
  To: emacs-devel

Stefan Kangas wrote:

> @node Emacs in a Linux console
> @section How can I alleviate the limitations of the
> Linux console?

What limitations exactly?

But there are Linux console console programs that are
supposedly better, but have no experience from them
personally. I remember one guy here was a user, and he at
least thought it was much better, whatever it was exactly that
he used/worked with.

-- 
underground experts united
https://dataswamp.org/~incal




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

* 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 ?
  2023-10-28 17:25                       ` Stefan Kangas
  2023-10-28 17:34                         ` Emanuel Berg
@ 2023-10-28 18:02                         ` David Hedlund
  2023-10-28 20:03                           ` Stefan Kangas
  2023-11-04 13:58                         ` Stefan Kangas
  2 siblings, 1 reply; 27+ messages in thread
From: David Hedlund @ 2023-10-28 18:02 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Oct 28, 2023 19:26:31 Stefan Kangas <stefankangas@gmail.com>:

> David Hedlund <public@beloved.name> writes:
> 
>>> You are correct, sorry for the confusion.  It's good to learn that
>>> --maximized works without issue.
>>> 
>>> So I guess this discussion is about:
>>> 
>>>      (add-hook 'emacs-startup-hook 'toggle-frame-maximized)
>>> 
>>> Then I guess I have the same question, but for that customization.  Why
>>> do we suggest a customization which has a "slighty distracting visual
>>> effect"?
>> 
>> That is why I wrote this section in
>> https://www.gnu.org/software/emacs/manual/html_node/efaq/Fullscreen-mode-on-MS_002dWindows.html
> 
> So how about installing something like the below (on master)?
> 
> diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi
> index d8097a8d21e..9f0dce288bc 100644
> --- a/doc/misc/efaq.texi
> +++ b/doc/misc/efaq.texi
> @@ -3110,45 +3110,22 @@ Escape sequences in shell output
> @code{ansi-color} package, which lets Shell mode recognize these
> escape sequences.  It is enabled by default.
> 
> -@node Fullscreen mode on MS-Windows
> -@section How can I start Emacs in fullscreen mode on MS-Windows?
> +@node Fullscreen mode
> +@section How can I start Emacs in fullscreen mode?
> @cindex Maximize frame
> @cindex Fullscreen mode
> 
> -Beginning with Emacs 24.4 either run Emacs with the @samp{--maximized}
> -command-line option or put the following form in your init file
> -(@pxref{Setting up a customization file}):
> -
> -@lisp
> -(add-hook 'emacs-startup-hook 'toggle-frame-maximized)
> -@end lisp
> -
> -With older versions use the function @code{w32-send-sys-command}.  For
> -example, you can put the following in your init file:
> -
> -@lisp
> -(add-hook 'emacs-startup-hook
> -          (lambda () (w32-send-sys-command ?\xF030)))
> -@end lisp
> -
> -To avoid the slightly distracting visual effect of Emacs starting with
> -its default frame size and then growing to fullscreen, you can add an
> -@samp{Emacs.Geometry} entry to the Windows Registry settings.  @xref{X
> -Resources,,, emacs, The GNU Emacs Manual}.  To compute the correct
> -values for width and height you use in the Registry settings, first
> -maximize the Emacs frame and then evaluate @code{(frame-height)} and
> -@code{(frame-width)} with @kbd{M-:}.
> -
> -Alternatively, you can avoid the visual effect of Emacs changing its
> -frame size entirely in your init file (i.e., without using the
> -Registry), like this:
> +Run Emacs with the @samp{--maximized} command-line option or put the
> +following form in your early init file (@pxref{Early Init File,,,
> +emacs, The GNU Emacs Manual}).
> 
> @lisp
> -(setq frame-resize-pixelwise t)
> -(set-frame-position nil 0 0)
> -(set-frame-size nil (display-pixel-width) (display-pixel-height) t)
> +(push '(fullscreen . maximized) default-frame-alist)
> @end lisp
> 
> +Note that while some customizations of @code{default-frame-alist}
> +could have undesirable effects when modified in @file{early-init.el},
> +it is okay to do it in this particular case.
> 
> @node Emacs in a Linux console
> @section How can I alleviate the limitations of the Linux console?
Thank you very much for the patch Stefan, it's an improvement in my. But don't forget to keep:

-To avoid the slightly distracting visual effect of Emacs starting with
-its default frame size and then growing to fullscreen, you can add



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

* 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 ?
  2023-10-28 17:34                         ` Emanuel Berg
@ 2023-10-28 18:51                           ` Eli Zaretskii
  2023-10-28 19:39                             ` Emanuel Berg
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2023-10-28 18:51 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: emacs-devel

> From: Emanuel Berg <incal@dataswamp.org>
> Date: Sat, 28 Oct 2023 19:34:13 +0200
> 
> Stefan Kangas wrote:
> 
> > @node Emacs in a Linux console
> > @section How can I alleviate the limitations of the
> > Linux console?
> 
> What limitations exactly?

Read the FAQ, and you will know that.  No need to raise the noise
level here by asking questions whose answers are at your fingertips.



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

* 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 ?
  2023-10-28 18:51                           ` Eli Zaretskii
@ 2023-10-28 19:39                             ` Emanuel Berg
  0 siblings, 0 replies; 27+ messages in thread
From: Emanuel Berg @ 2023-10-28 19:39 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii wrote:

>>> @node Emacs in a Linux console
>>> @section How can I alleviate the limitations of the
>>> Linux console?
>> 
>> What limitations exactly?
>
> Read the FAQ [...]

Okay, it is on the TODO list ...

-- 
underground experts united
https://dataswamp.org/~incal




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

* 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 ?
  2023-10-28 18:02                         ` David Hedlund
@ 2023-10-28 20:03                           ` Stefan Kangas
  0 siblings, 0 replies; 27+ messages in thread
From: Stefan Kangas @ 2023-10-28 20:03 UTC (permalink / raw)
  To: David Hedlund; +Cc: emacs-devel

David Hedlund <public@beloved.name> writes:

> Thank you very much for the patch Stefan, it's an improvement in
> my. But don't forget to keep:
>
> -To avoid the slightly distracting visual effect of Emacs starting with
> -its default frame size and then growing to fullscreen, you can add

I thought the point was that by adding

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

to early-init.el there is no annoying visual effect?  Thus, there is no
longer any need to mention it, if that's the customization we recommend.

What am I missing?



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

* 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 ?
  2023-10-28 17:25                       ` Stefan Kangas
  2023-10-28 17:34                         ` Emanuel Berg
  2023-10-28 18:02                         ` David Hedlund
@ 2023-11-04 13:58                         ` Stefan Kangas
  2 siblings, 0 replies; 27+ messages in thread
From: Stefan Kangas @ 2023-11-04 13:58 UTC (permalink / raw)
  To: David Hedlund, emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> So how about installing something like the below (on master)?

No further comments within a week, so I've pushed the patch to master.

[1: 0e59541fa20]: 2023-11-04 14:56:36 +0100
  Make FAQ on starting Emacs maximized portable
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0e59541fa203d7ecb6afcf0ce7805e87d41bdc65



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

end of thread, other threads:[~2023-11-04 13:58 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-29 21:05 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 ? David Hedlund
2023-09-30 13:57 ` Eli Zaretskii
2023-09-30 18:09   ` chad
2023-09-30 18:36     ` Eli Zaretskii
2023-09-30 19:06       ` David Hedlund
2023-09-30 19:21         ` Eli Zaretskii
2023-10-02 22:40           ` David Hedlund
2023-10-02 23:05             ` Emanuel Berg
2023-10-05  3:56               ` David Hedlund
2023-10-21  9:35           ` Stefan Kangas
2023-10-21  9:52             ` Eli Zaretskii
2023-10-21 10:02               ` Stefan Kangas
2023-10-21 11:18                 ` Eli Zaretskii
2023-10-21 20:05                 ` chad
2023-10-21 12:55             ` David Hedlund
2023-10-22 22:24               ` Stefan Kangas
2023-10-23 13:02                 ` Eli Zaretskii
2023-10-23 15:25                   ` David Hedlund
2023-10-23 15:33                   ` Stefan Kangas
2023-10-23 15:58                     ` David Hedlund
2023-10-28 17:25                       ` Stefan Kangas
2023-10-28 17:34                         ` Emanuel Berg
2023-10-28 18:51                           ` Eli Zaretskii
2023-10-28 19:39                             ` Emanuel Berg
2023-10-28 18:02                         ` David Hedlund
2023-10-28 20:03                           ` Stefan Kangas
2023-11-04 13:58                         ` Stefan Kangas

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.