help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: on interface and behavior (Was: Re: indentation)


From: Eli Zaretskii
Subject: Re: on interface and behavior (Was: Re: indentation)
Date: Fri, 30 Apr 2021 10:53:50 +0300

> Date: Thu, 29 Apr 2021 18:38:08 -0300
> From:  Wayne Harris via Users list for the GNU Emacs text editor 
> <help-gnu-emacs@gnu.org>
> 
> (*) The case of frames in Windows
> 
> Speaking of which, FWIW, I have gone through extra lengths to try to get
> frames to show up more consistently on Windows.  Windows has no
> reasonable window manager, so that's left for the applications
> themselves.  Most windows programs save their window sizes and position
> before quitting and restore when they come back alive.  The GNU Emacs
> does not.

Emacs can save and restore the frame geometry if you use the
desktop.el package to resume your sessions.  This is in the manual.

> I would appreciate --- as a default behavior --- the GNU Emacs on
> Windows remembering the size and position of the window before shuting
> down.

We have that as an optional feature, see above.

> You can specify geometry-related options for just the initial
> frame by setting this variable in your init file; however, they
> won’t take effect until Emacs reads your init file, which happens
> after creating the initial frame.  If you want the initial frame
> to have the proper geometry as soon as it appears, you need to
> use this three-step process:
> * Specify X resources to give the geometry you want.
> * Set ‘default-frame-alist’ to override these options so that they
>   don’t affect subsequent frames.
> * Set ‘initial-frame-alist’ in a way that matches the X resources,
>   to override what you put in ‘default-frame-alist’.
> 
> [back]
> --8<---------------cut here---------------end--------------->8---
> 
> One last bullet could mention the full syntax of --geometry.  Maybe
> --help could as well: it doesn't.
> 
> (*) A suggested approach for Windows
> 
> I believe the problem could be solved for Windows specifically by
> restoring the size and position of the initial-frame in w32-win.el.  Of
> course, the size and position should be saved before exit.

Emacs on MS-Windows emulates X resources by storing them in the
Registry.  This is also described in the user manual, which see.  So
you can have this feature even without desktop.el, if you want.

P.S.  One thing I learned about Emacs a long time ago is that for any
issue that might worry you, it is likely that someone already solved
it in Emacs.  So the first thing I do when U bump into such annoyances
is to search the manual and the built-in documentation for similar
features.  Usually, I find a solution that is ready to be used; I
stopped being amazed by that long time ago.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]