From: martin rudalics via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>, toomas@rosin.ee
Cc: 74866@debbugs.gnu.org
Subject: bug#74866: 29.4; fit-frame-to-window + no vertical scroll bar + changed face height = mess
Date: Sat, 14 Dec 2024 18:16:22 +0100 [thread overview]
Message-ID: <d704c04f-e315-4823-bb2e-cd4821ca3d2b@gmx.at> (raw)
In-Reply-To: <86zfkytmyt.fsf@gnu.org>
> Martin, any comments?
Looks like an idiosyncrasy of 'set-face-attribute'. The following seems
to work here. Don't ask me why.
(defun fit (lin col)
"Fit some text (LIN lines and COL columns) into a newly created frame."
(interactive)
(let ((buf (get-buffer-create "*foo*"))
(frm (make-frame '((z-group . above) (vertical-scroll-bars . nil)))))
(with-current-buffer buf
(erase-buffer)
(setq mode-line-format '(""))
(dotimes (_ lin) (insert (format "%s\n" (make-string col ?x))))
(goto-char (point-min)))
(with-selected-frame frm
(switch-to-buffer buf)
(set-face-attribute 'default nil :height 57)
(fit-frame-to-buffer))))
martin
next prev parent reply other threads:[~2024-12-14 17:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-14 12:57 bug#74866: 29.4; fit-frame-to-window + no vertical scroll bar + changed face height = mess toomas
2024-12-14 13:26 ` Eli Zaretskii
2024-12-14 17:16 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-12-14 19:09 ` bug#74866: 29.4; fit-frame-to-window + no vertical scroll bar + ch Toomas Rosin
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=d704c04f-e315-4823-bb2e-cd4821ca3d2b@gmx.at \
--to=bug-gnu-emacs@gnu.org \
--cc=74866@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=rudalics@gmx.at \
--cc=toomas@rosin.ee \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).