From: Wayne Harris via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How can I automatically determine the best frame-height?
Date: Wed, 21 Apr 2021 16:42:55 -0300 [thread overview]
Message-ID: <86y2dbv2yo.fsf@protonmail.com> (raw)
In-Reply-To: YIBCZMu/HPaJjRkv@protected.localdomain
Jean Louis <bugs@gnu.support> writes:
> * Wayne Harris via Users list for the GNU Emacs text editor
> <help-gnu-emacs@gnu.org> [2021-04-21 18:07]:
>> David Karr <davidmichaelkarr@gmail.com> writes:
>>
>> > In my .emacs file, I have code like the following at the top:
>> > -------------
>> > (set-frame-position (selected-frame) 0 0)
>> > (set-frame-height (selected-frame) 68)
>> > --------------
>> >
>> > I typically run on a Windows 10 laptop, connecting to an external monitor.
>> > The frame height of 68 works out to put the status line just above the
>> > Windows status bar, when connecting to my usual monitor.
>> >
>> > Sometimes, I run the laptop without an external monitor. In that case, that
>> > startup code is a little annoying, as I then have to shrink and move the
>> > window a few times until I get it in the right position.
>> >
>> > Is there a better way to do this, so it will just automatically size itself
>> > so that the top is at the top of the screen, and the bottom is snug against
>> > the status bar?
>>
>> That is annoying. I use --fullheight on the command line. This could
>> be useful to you. At least on Windows it start up with the perfect
>> height for me.
>>
>> However, when I open a new frame, the new frame is taller than its
>> parent. I don't get why. All I wish was for the frame to keep the same
>> dimensions as the frame from which I issued the command.
>
> You can put this in your ~/.emacs.d/early-init.el
Can that be site-start.el?
> (add-to-list 'default-frame-alist '(fullscreen . maximized))
I added it to site-start.el. It takes effect. I don't like it
maximized, though. I just wish it'd stick to the height of the initial
frame, which I set with -fh on the command line.
I looked up the manual and came up with
(add-to-list 'default-frame-alist '(height . 0.90))
where 90% is about right for me, but this has the side-effect that the
initial-frame is not full-height any longer, that is, this undoes the
order given by -fh on the command line.
next prev parent reply other threads:[~2021-04-21 19:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 21:45 How can I automatically determine the best frame-height? David Karr
2021-04-20 21:50 ` Joost Kremers
2021-04-20 22:40 ` [External] : " Drew Adams
2021-04-21 15:06 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-21 15:19 ` Jean Louis
2021-04-21 19:42 ` Wayne Harris via Users list for the GNU Emacs text editor [this message]
2021-04-21 20:48 ` Jean Louis
2021-04-21 20:56 ` Jean Louis
2021-04-22 12:39 ` Wayne Harris via Users list for the GNU Emacs text editor
2021-04-22 9:24 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86y2dbv2yo.fsf@protonmail.com \
--to=help-gnu-emacs@gnu.org \
--cc=wharris1@protonmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).