From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56357: Request for font size adaptation that fits window Date: Mon, 04 Jul 2022 14:42:31 +0300 Message-ID: <83y1x985p4.fsf@gnu.org> References: <871qv187lr.fsf@gnus.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29254"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlmarcos@tutanota.com, 56357@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 04 13:43:21 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o8KU5-0007Pq-7L for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 13:43:21 +0200 Original-Received: from localhost ([::1]:37178 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8KU3-00012z-QJ for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 07:43:19 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41638) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8KTm-00011k-GG for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2022 07:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52456) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8KTm-0001mO-7a for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2022 07:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8KTm-0000nW-3q for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2022 07:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2022 11:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56357 X-GNU-PR-Package: emacs Original-Received: via spool by 56357-submit@debbugs.gnu.org id=B56357.16569349713050 (code B ref 56357); Mon, 04 Jul 2022 11:43:02 +0000 Original-Received: (at 56357) by debbugs.gnu.org; 4 Jul 2022 11:42:51 +0000 Original-Received: from localhost ([127.0.0.1]:46353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8KTb-0000n8-15 for submit@debbugs.gnu.org; Mon, 04 Jul 2022 07:42:51 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:56564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8KTZ-0000ms-C6 for 56357@debbugs.gnu.org; Mon, 04 Jul 2022 07:42:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:51342) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8KTT-0001jV-Lm; Mon, 04 Jul 2022 07:42:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=S93ZDlKpP+y1tpfb80XL7KrUq3Dx8Ltr657+iz0xu1c=; b=ONCkuSOHREZl XeZSeQmZb+FhZmjMcIaiKDQ7KG7oC64xXtbkX4fINEliyjPdoJM+pyw7tP3HKdmyFvThRI61gG5xS tMPBCQYb1OKvKSSwdLmctnQaNSOKUwZ4fKMmYl6BkZcRRvkxlIAI6TPwJlXRlPcTV+OA7JWEphmtY JhySRpwhcWL/f55imGFe34LwhVxdQ8xsofEY1/9NB2G71pxa9umkfjeIFifSRcnEev9Pp1KMoWGat /dZfIfa6zu65uvkNapUayFWkvaD3iFQiW1V3NzHNcU0LM/YaVxWJ4B3ejVxBBWdq6+q4jCv4XxCnR jfFP5uOaAG2hjKYIgfo+Jg==; Original-Received: from [87.69.77.57] (port=2916 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8KTT-00022z-34; Mon, 04 Jul 2022 07:42:43 -0400 In-Reply-To: <871qv187lr.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 04 Jul 2022 13:01:20 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:236056 Archived-At: > Cc: 56357@debbugs.gnu.org > From: Lars Ingebrigtsen > Date: Mon, 04 Jul 2022 13:01:20 +0200 > > carlmarcos@tutanota.com writes: > > > Suppose a user uses a 13 pt font size. Let there be some space > > between the longest line in the buffer and the edge of the window. It > > would be super if the font size could be automatically increased, such > > that the difference between the longest line and the window size in > > minimised. > > I think that sounds like a useful feature, and I'm kinda surprised that > it doesn't exist yet. Or does it? Anybody know? > > To implement this, I guess the obvious thing would be to have a global > minor mode that'd listen to frame size changes, and then adjust the font > size up/down to reach the desired number of characters in a frame? So > we'd have a user option font-size-adjust-target (defaulting to 80) > and a font-size-adjust-mode? That's not what the feature request asked for, AFAIU: it wanted dynamic resizing, and it wanted the size to depend on the "longest line" (not clear if "longest in the window" or "longest in the buffer"). With your proposal, how would you determine the target value? If it's just an arbitrary value (80 sounds like an arbitrary one to me), then the recently-added global-text-scale-adjust-resizes-frames variable does the same, just from the other end: the user enlarges the font and the frame follows suit. And since our default frame width is already set for 80 characters, it sounds like we already have the feature you envisioned, no?