From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Ingo Lohmar Newsgroups: gmane.emacs.devel Subject: Re: set-frame-size should respect line-spacing!? Date: Sat, 12 Oct 2019 11:56:03 +0200 Message-ID: <871rvil230.fsf@kenko.localhost.com> References: <87blun57wt.fsf@kenko.localhost.com> <83o8ymo3cx.fsf@gnu.org> <877e5al9ny.fsf@kenko.localhost.com> <26dd3c24-f21d-bbef-a975-86318a8eaf80@gmx.at> <8336fynvq4.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="166397"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii , martin rudalics Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 12 11:57:18 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJE9F-000h8Q-8u for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 11:57:17 +0200 Original-Received: from localhost ([::1]:59918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJE9D-0003N6-MP for ged-emacs-devel@m.gmane.org; Sat, 12 Oct 2019 05:57:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34249) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iJE8Y-0003Ms-LL for emacs-devel@gnu.org; Sat, 12 Oct 2019 05:56:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iJE8X-0008Tu-6Q for emacs-devel@gnu.org; Sat, 12 Oct 2019 05:56:34 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:58571) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iJE89-0008N2-TY for emacs-devel@gnu.org; Sat, 12 Oct 2019 05:56:33 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 5BA5C2400FC for ; Sat, 12 Oct 2019 11:56:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1570874167; bh=zfHt7+fvPBmNhkP8zOu1/+rkyBRN8H2KCyoh+W/+eqI=; h=From:To:Cc:Subject:Date:From; b=HW7nZUVmt5S9MXFCJ7DsVvjSeT+X8vhNHb32oPG9swMTQEkpXuXu7ah2lgC5MpI6V OIiCv11JvQheUGNwsXUCFgIyHOxy7HXpOYV0lPh2khXvYMk/zTJ6b33s/C/MX/J8Bx lV/fqtWhGxzkXSgjBGLxbXMU7bXaQI9PKnyner5gyzL4AYPere6fAJQMJexg71a5wM SUBn+zz58Zjt3PgQwOTcUcM73vmkAkiadjRBSJeDx8ZhMkyrS7UwQE6FAQgZqOrPDT KR635BVhDW8S9PsTI195Z5yD+4HZ1KCBeBF8LwS1HWaC03etunj3c9SzconTbpoAS5 QSjr8LzTo9qgw== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46r0ZY3BFrz9rxH; Sat, 12 Oct 2019 11:56:04 +0200 (CEST) In-Reply-To: <8336fynvq4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 185.67.36.66 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:240908 Archived-At: On Sat, Oct 12 2019 12:45 (+0300), Eli Zaretskii wrote: > I think we should first decide whether we want to invest such an > effort to support a rare use case, which is also not without its > pitfalls (as you describe above). > > A buffer can specify, in addition to line-spacing, other display > features that will affect the metrics of its lines. The simplest > example is the face of the text to display, which can include the > font. It could even do this extremely subtly, by displaying text that > belongs to a script whose font is higher or lower than the default > face's font. In all of these cases, the original number of text lines > will be inaccurate for some buffers shown in the same window on the > same frame. > > So I don't think I understand why we need to support these specialized > use cases. Just to be clear: While I do think that the relevant code at the C and the Lisp level is not the easiest to follow, becuase a lot of different concepts are implicitly involved (sorry Martin, for not remembering your point about the line-spacing per buffer), I did not intend to start a fundamental discussion on these issues. My approach to this whole area was from the point of view of a user of the posframe pkg (not even directly, but via company-posframe). As such, the question was "how to create a frame that fits N lines", and of course, that is ill-defined (line-spacing, font choice subtleties, and several more factors, I guess). For the matter at hand, the fixed `fit-frame-to-buffer` does what I need (or rather, what the posframe pkg needs); the rest is bug-fixing in the pkg.