unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ingo Lohmar <ingo.lohmar@posteo.net>
To: emacs-devel@gnu.org
Subject: set-frame-size should respect line-spacing!?
Date: Fri, 11 Oct 2019 22:44:34 +0200	[thread overview]
Message-ID: <87blun57wt.fsf@kenko.localhost.com> (raw)

In Bug#37563, I reported that `fit-frame-to-buffer' ignores a default
value of `line-spacing' > 0, whence the buffer might not be tall enough
--- that's what happened with the `posframe' pkg that is, eg, used by
`company-posframe' to display completions. Martin fixed this and related
issues in window.el quickly and thoroughly, for which I am grateful.

Since I tested with a minimal example, however, I did not realize before
that there is another code path that directly uses the C function
`set-frame-size', with the same effect: If line-spacing is > 0 in the
frame, it is not accounted for, and the frame lacks a few pixels in
height (number of lines * "line-spacing effect").

This appears to be a bug: If asked for a frame N lines tall, N lines (of
default-font's character height plus the effect of line-spacing) should
fit, right?

Maybe this affords some opportunity to concentrate this code on either
the lisp or the C side..?



             reply	other threads:[~2019-10-11 20:44 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11 20:44 Ingo Lohmar [this message]
2019-10-12  7:00 ` set-frame-size should respect line-spacing!? Eli Zaretskii
2019-10-12  7:12   ` Ingo Lohmar
2019-10-12  7:48     ` Eli Zaretskii
2019-10-12  8:25       ` martin rudalics
2019-10-12  8:25     ` martin rudalics
2019-10-12  9:45       ` Eli Zaretskii
2019-10-12  9:56         ` Ingo Lohmar
2019-10-12 11:03         ` martin rudalics
2019-10-12 13:11           ` Eli Zaretskii
2019-10-13  8:16             ` martin rudalics
2019-10-13  9:10               ` Eli Zaretskii
2019-10-13 12:15                 ` martin rudalics
2019-10-13 12:18                   ` Eli Zaretskii
2019-10-13 12:51                     ` martin rudalics
2019-10-13 13:20                       ` Eli Zaretskii
2019-10-13 17:06                         ` martin rudalics
2019-10-14  8:06                           ` Eli Zaretskii

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=87blun57wt.fsf@kenko.localhost.com \
    --to=ingo.lohmar@posteo.net \
    --cc=emacs-devel@gnu.org \
    /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).