From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wayne Harris via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: on interface and behavior Date: Sat, 01 May 2021 10:30:45 -0300 Message-ID: <86czua37ju.fsf@protonmail.com> References: <20210427090348.67C9B5D0@centrum.cz> <20210427202932.DFDEF50D@centrum.cz> <20210428083227.FCFDA7C0@centrum.cz> <20210429091455.3C8C08A9@centrum.cz> <875z056uf6.fsf@zoho.eu> <86h7jo4vr3.fsf_-_@protonmail.com> <83a6pgcinl.fsf@gnu.org> Reply-To: Wayne Harris Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26322"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Cancel-Lock: sha1:gd35J1TZkfBelUbbgKXQ63vEKE4= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 01 15:35:37 2021 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 1lcpmS-0006kK-Gx for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 15:35:36 +0200 Original-Received: from localhost ([::1]:53132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lcpmR-0006bg-LE for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 01 May 2021 09:35:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcplx-0006ai-1K for help-gnu-emacs@gnu.org; Sat, 01 May 2021 09:35:05 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:58818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lcplv-0000ok-DB for help-gnu-emacs@gnu.org; Sat, 01 May 2021 09:35:04 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1lcplt-00067i-UE for help-gnu-emacs@gnu.org; Sat, 01 May 2021 15:35:01 +0200 X-Injected-Via-Gmane: http://gmane.org/ Received-SPF: pass client-ip=116.202.254.214; envelope-from=geh-help-gnu-emacs@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.help:129279 Archived-At: Eli Zaretskii writes: >> Date: Thu, 29 Apr 2021 18:38:08 -0300 >> From: Wayne Harris via Users list for the GNU Emacs text editor >> >> >> (*) 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. Desktop.el isn't a very satisfactory solution because of flickering. The GNU Emacs initial frame shows up in a certain place and position and then resizes and move somewhere else. But maybe the registry --- which you mentioned below --- would be a nice solution. [...] >> 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. Thanks. I will check that. > 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. You're totally right. That has always been my experience too, but it evidently didn't change my bad habits yet. :-)