From: Ingo Lohmar <ingo.lohmar@posteo.net>
To: martin rudalics <rudalics@gmx.at>
Cc: 37563@debbugs.gnu.org
Subject: bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing
Date: Tue, 01 Oct 2019 10:28:16 +0200 [thread overview]
Message-ID: <87d0fgamzj.fsf@kenko.localhost.com> (raw)
In-Reply-To: <5b9fda23-4a2b-f5ff-5e49-22cdd4c857a5@gmx.at>
On Tue, Oct 01 2019 10:10 (+0200), martin rudalics wrote:
> > thanks for the quick reply! The fix is working for me. The separate
> > window-*-height functions are much better than what I sent a few
> > minutes ago, I missed all kinds of scenarios, of course.
>
> For consistency, I would use these functions in 'fit-window-to-buffer'
> as well. But I haven't looked into all consequences yet. There's
> also Bug#14825 still sitting around the corner, awaiting a proper
> solution. It's somehow troubling that all these substitute canonical
> character height with real line height fixes are inherently backward
> incompatible. What if someone did mean to use the canonical character
> height there?
I surely find the complexity of all this code jarring, so I have to
restrict myself to looking at a single issue; and here, it's clearly
fixing a bug, using the char height is simply wrong, IMO.
>
> > There's one thing from my patch, however, that I think is missing in
> > yours:
>
> I think you're right but I need to see your patch first. It's not
> here yet.
Debbugs and the mailing list interaction is another thing I do not
really understand ;) In any case, the patch would simply be confusing
now, here's the change on top of yours:
@@ -8794,8 +8828,8 @@ fit-frame-to-buffer
;; Fit height to constraints.
(when height
(unless frame-resize-pixelwise
- (setq height (* (/ (+ height char-height -1) char-height)
- char-height)))
+ (setq height (* (/ (+ height line-height -1) line-height)
+ line-height)))
;; The new outer height.
(setq outer-height (+ height outer-minus-body-height))
;; Preserve margins.
And then char-height can be dropped.
Best,
Ingo
next prev parent reply other threads:[~2019-10-01 8:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-30 18:41 bug#37563: 27.0.50; fit-frame-to-buffer does not account for line-spacing Ingo Lohmar
2019-10-01 7:32 ` martin rudalics
[not found] ` <87lfu4aook.fsf@kenko.localhost.com>
2019-10-01 8:10 ` martin rudalics
2019-10-01 8:28 ` Ingo Lohmar [this message]
2019-10-02 8:54 ` martin rudalics
2019-10-03 8:15 ` martin rudalics
2019-10-03 8:48 ` Ingo Lohmar
2019-10-03 18:10 ` martin rudalics
2019-10-03 18:21 ` Ingo Lohmar
2019-10-05 8:41 ` martin rudalics
2019-10-05 9:05 ` Ingo Lohmar
2019-10-07 9:25 ` martin rudalics
2019-10-07 17:45 ` Ingo Lohmar
2019-10-08 8:44 ` martin rudalics
2019-10-11 8:16 ` martin rudalics
2019-10-11 17:45 ` Ingo Lohmar
2019-10-03 8:56 ` Ingo Lohmar
2019-10-03 9:12 ` Robert Pluim
2019-10-03 16:09 ` Eli Zaretskii
2019-10-03 18:10 ` martin rudalics
2019-10-03 18:22 ` Ingo Lohmar
2019-10-01 7:39 ` bug#37563: [PATCH] please review Ingo Lohmar
2019-10-02 8:53 ` martin rudalics
[not found] ` <handler.37563.B.156987198814967.ack@debbugs.gnu.org>
2019-10-11 17:50 ` bug#37563: Acknowledgement (27.0.50; fit-frame-to-buffer does not account for line-spacing) Ingo Lohmar
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d0fgamzj.fsf@kenko.localhost.com \
--to=ingo.lohmar@posteo.net \
--cc=37563@debbugs.gnu.org \
--cc=rudalics@gmx.at \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.