From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#56357: Request for font size adaptation that fits window Date: Mon, 4 Jul 2022 15:54:34 +0000 Message-ID: References: <871qv187lr.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17144"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "56357@debbugs.gnu.org" <56357@debbugs.gnu.org> To: Lars Ingebrigtsen , "carlmarcos@tutanota.com" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 04 17:55:16 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 1o8OPs-0004Fn-8d for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 17:55:16 +0200 Original-Received: from localhost ([::1]:34668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o8OPq-0004TR-I2 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 04 Jul 2022 11:55:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57024) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o8OPe-0004ST-7i for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2022 11:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54615) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o8OPd-0007Sc-UJ for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2022 11:55:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o8OPd-0007yK-Q8 for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2022 11:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Jul 2022 15:55:01 +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.165695008430610 (code B ref 56357); Mon, 04 Jul 2022 15:55:01 +0000 Original-Received: (at 56357) by debbugs.gnu.org; 4 Jul 2022 15:54:44 +0000 Original-Received: from localhost ([127.0.0.1]:48512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8OPM-0007xe-25 for submit@debbugs.gnu.org; Mon, 04 Jul 2022 11:54:44 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:46286) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o8OPH-0007xR-HH for 56357@debbugs.gnu.org; Mon, 04 Jul 2022 11:54:43 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 264D24rX001934; Mon, 4 Jul 2022 15:54:38 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=qrx19Muv15PZNSb8vG0ncWs91Sj7zCitpNI8OrrPvr4=; b=JqecDg1R/tLqo6ed5o0xChC7jA3PFeX2QSF1s8XG8tQELn67328/RtIafTGcep5Zzdw2 /jV0ZVvv8TbtJ6rSYqX0dS35uc8pNpkvaa/k41iRo/VHex5A2K7C961sAb3KQfOTKYQT e62E5ZVGme6rkp5lBXg0p6EaWiUtzbaskSa0FiiJWzY0zKAgCcMOQp2+h4wxKsdE72ci fkHK8jlkua8BEnhsHyDgwoArEo/YqCG4oL4M221TepBGRLZ2f2lXqG9tql3DIzBFDPbB eiqthjxNLbDLsUYz8XCbrnz8sYtR5kT0bs4T3uxVF6C0Mkd2oOxz+Sr2bfhDy5ZLv/jr mg== Original-Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3h2eju3rcg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Jul 2022 15:54:37 +0000 Original-Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 264FjErW030270; Mon, 4 Jul 2022 15:54:37 GMT Original-Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12lp2045.outbound.protection.outlook.com [104.47.66.45]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com with ESMTP id 3h2cf1q8wc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 04 Jul 2022 15:54:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FlOySSclyyTxrIIosIdXRzRByTeBgvK2cNnB2lvX9oUGh9BNTQ22bsJhp6i67i1qRmlGFcl2wjsa9HRNkS+WgUtw5nWG66CZZrD8+f2MA1MpJOVDzdfzf9LQFXMJNUXdL9XCxp+GyqQhBNuziSWRBSgNAPHMUF5hWZ60riIB8KJ1zs4J4EEh4H+O2FHzoGIrJLMuGI1qdIXRv0HqXEWYktp3q9dHjaZuky5o32ROHY2zFBwNV+Dv5r+jCIZqTNlaD6YhVEhRYgvy3ynuFhCzc3sbpjYVoeyLcL8fouY7aZ0/9BCvwBY/DdyYCwjjqFXVqQwun3GfVkrN0ysBFNbR2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=qrx19Muv15PZNSb8vG0ncWs91Sj7zCitpNI8OrrPvr4=; b=gg1MnWvGQbhvEdRB4e7k8OvN6WOwpeZ46Q+hTe9WmXU7lqce8WdVfXTMJ+Fqc3I6dBROiu9Q9aG94HuH2aZ4v+HHNDZCe7alvbxCGMPbWp7SsNbnv9FajEwFqGVAsd/8DgBPcN3b2a4dpNnxFytUt9Fi9hjEQBAi/mfORCgc7MuuPDfOfakSHgOKaHD5Dox5dYND1u/9CaFZoMvKLrQB8IFgD5B8uuebLSunWGyySZCEjpZ5rypx9agT3LqPF949k8aPVcffvTu1Y0RXWuz1FAnI66O+5icJMyEcitWfPAv5GXzN6xVUC26X046CJxbRk3Uy8jWS1GzqMh+9T4Tgdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qrx19Muv15PZNSb8vG0ncWs91Sj7zCitpNI8OrrPvr4=; b=0O2lnebdaF1J2ZHj089AeWpnAF16HtxgAGLyXd84mO8LuKIUAdX+6I0zYiRzfnM4/SEUCAFJ7vrE+UjBA0e9iWWMtHSoMnW9M8EVU0QGfgJ5JrP5ZaBfaRvffh9OzVmbafarf4ty072q86Ml0ytGOefBJazNkMy/nJqjSi6hKKo= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BL3PR10MB6138.namprd10.prod.outlook.com (2603:10b6:208:3b9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Mon, 4 Jul 2022 15:54:35 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::581b:ae2f:16b9:80fb%7]) with mapi id 15.20.5395.021; Mon, 4 Jul 2022 15:54:34 +0000 Thread-Topic: [External] : bug#56357: Request for font size adaptation that fits window Thread-Index: AQHYj5WFjHuBvYwU1UGgYH0lXZ+xvq1uV7zQ In-Reply-To: <871qv187lr.fsf@gnus.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 5a1e8c13-54cf-4eef-a428-08da5dd57df4 x-ms-traffictypediagnostic: BL3PR10MB6138:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9hj0efVyecgPFFm/0n4cLXurEWtLOwTSeSYLkxfnzuvwn69YSWm37KYx9qr+mT7q469SdrYmqAjIjpiiiqhrpa6fYCcqZWgVXh+NRa1YlHjmZ0BDhqmIdvIvjHG1MWtB5gl9g3BKUty4mXpi2E9IGw6eX0FSkX7kf1i1Yq+3qhM6j1s3c/OyJGiEqRIgRs1F6udoviTj0fDOp6JfZm7PlpLZk+abj4WG4jQhyqW8pUWrHaSEG1z2YiXTUevVCcqvApvkFUYuuUxv/AZWpLUdChLP5GsDbXPtP0+TIMZLIUABh0VihlTBd6FuJDjcF2xd1wkidc33LtkgGyXFmnaPFh2wGWzlqMV3dX3+U+x5tGuwl7oozEPwijJKVV5LrCkokBwuxMGt9otdkCF9S1aaznEpMbTsMgZ9g0OZciU3WKqsSg0YSsaIMDUOPrG5dJrKekqPxRW2CBDy/CCMMtnQp8AE+EygdD0jWQSkaVHJhY0Ofv9ntFSRdbruTAy9fh05uZ6WNsyZmDqFeg9C7NFonJ0f7KZlDRd4wkmK7TUjzjNWWjurIUCEbU6CU5B0bUvU24Iy6qsAuPAj8u1WxDGLNOTb8UmskdYoHjBAaJlcBz+pagDCCw4LYj/o5WIaYCwgPuXw094j5JDYEwI7AV1nvVBf6JOeHpHRjGSZkklhm39ibCWcFkkdGRPBS6vEOSoh7vG60fbhLOU6YosTgj6Ir85E+gkzZ91zHdL5vp9xAZy2Vje+J6VNEgwP8FZrz FTHdkPClp9g9+eKl2EbbLpTJ7bLbM49aawKdjkVXvffvvzJXoNoyKTqHWfuWkRAz/7n6RsVvKjuuIinys9uq9k786p85uHVaGg x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(366004)(396003)(136003)(346002)(376002)(39860400002)(83380400001)(110136005)(44832011)(8936002)(5660300002)(33656002)(2906002)(86362001)(52536014)(8676002)(66556008)(66446008)(316002)(186003)(38100700002)(38070700005)(122000001)(55016003)(66946007)(66476007)(64756008)(76116006)(4326008)(7696005)(6506007)(41300700001)(478600001)(26005)(966005)(9686003)(71200400001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: XMwdJmod92bTEp+vhRnqr7JzBkg9MsLCDFMtgEMiZJIwn6jbr5xdc7rkdWiX38XD88sQ2Vkpm3bBngG+bFSVHoBabeGGvzmfLQfU36iE9Qrzj169+t52urpMq7vA3zhuTdcVLKvk0CxDJhX3PV22Nw/g1DckQwiNvz2nBLbd64wrtlDGf2xZJBaTdkupUv/vESIIUyRw5JOPvEbbXmb0x9gKIWMsUNfpS/7buT7muuS73+FmPJyDory/0NY2ZRjQXMXx2NwbjO6d+BfifOQYp0Z3/iPzHClIgot+PqY7kUbQfSG9+6cpFVP73g9MA0J9b2SIDJmEaQ29cNrO2Xau+cWS6Q2G06WIshFjRAdw2tMbC+ubJ72ZCux0N68J69ezknDnzO4pGfkbXu80ReJGU5mV1vIvdJI4Dt/HNhcVTXc1W38i2AbStV5bdZEB1Wgei6moktOESng5DBHxSkeuqrvHFY6YWTi5qj5qtyXpa2Liv6YL/SiBOjxarPZyfyeyW4zwL9rkWo3nWo6csc/TJBNs/Kb1PzaZ6NT9yKe+1q9aO6e+OzJKsNk6m6flsV1bgbsR+DOhBluyqORurAH2cYTIwefAWXQY92kOG/eBSrWNYDD8wSlXj+bXzmqjc7qXpHKYFv8u7YA3JsyMvFCIsZhPhkEEtzyYEUgCQeWogrOcvaXGRH2ZWS05H3zTAHzVl0Cacw4vUXSs+FtP4AhLPcCKbVt0qDZUPfXFhU7FPO08oN2Kd0gxTJoTyr 7KEnVi8Liwr9zMj1sGnMCZw5uCK69xSjq04jcn1ZoV9nGqfEqnjyun9lp7JYDVPYqzLV1CM8O4RvXVaiNoWWX4aWF7lLCX32QE X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5a1e8c13-54cf-4eef-a428-08da5dd57df4 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jul 2022 15:54:34.8792 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: AOmqeS8vSq6oKWbFuhRtKGYwm9JCaycDfqkk4bYcjCCJ7sjNIY/vdB6n+u2ADm3oHL7/yeBxi0jnkRvE0gkyyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR10MB6138 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.517, 18.0.883 definitions=2022-07-04_16:2022-06-28, 2022-07-04 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2204290000 definitions=main-2207040069 X-Proofpoint-GUID: j6417P80kyvM8ZFh3_Nl5_1415SvOGVY X-Proofpoint-ORIG-GUID: j6417P80kyvM8ZFh3_Nl5_1415SvOGVY 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:236063 Archived-At: > > 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=20 > > size in minimised. >=20 > I think that sounds like a useful feature, and I'm kinda surprised that > it doesn't exist yet. Or does it? Anybody know? >=20 > 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? Not sure, but I have a feeling this feature might be related to what you're thinking about / looking for. It doesn't sound like it's exactly what this report has requested. But it sounds like it's related and it might even address the underlying need/problem. My library `face-remap+.el' introduces option `text-scale-resize-window', which automatically resizes the selected window (horizontally, vertically, or both) when text is resized. This means that when you resize text the way the window fits the text remains relatively constant. Shrinking the text in one window shrinks that window, giving more space to adjacent windows. IOW, it keeps whatever relation currently exists between the apparent text size and the window size. That also means that it lets you take advantage of the space freed up by resizing (text-scaling) to a smaller font. I offered this feature to Emacs dev _long_ ago (as soon as text-scaling was added to Emacs). It was summarily rejected, with a no-one-would-ever-want-to-do-that dismissal. But personally, I wouldn't use text scaling without such a feature. I see, and saw, no reason not to give users the choice, as opposed to hard-coding the behavior so as to always waste screen real estate with added blank space when text is shrunk. The code is trivial - a tweak to `text-scale-increase' to respect the new user option. The code is here: https://www.emacswiki.org/emacs/download/face-remap%2b.el