From unknown Sat Jun 21 10:15:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#71085 <71085@debbugs.gnu.org> To: bug#71085 <71085@debbugs.gnu.org> Subject: Status: text-scale-adjust does not adjust margin width Reply-To: bug#71085 <71085@debbugs.gnu.org> Date: Sat, 21 Jun 2025 17:15:19 +0000 retitle 71085 text-scale-adjust does not adjust margin width reassign 71085 emacs submitter 71085 Emre Yolcu severity 71085 normal tag 71085 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Mon May 20 20:03:49 2024 Received: (at submit) by debbugs.gnu.org; 21 May 2024 00:03:49 +0000 Received: from localhost ([127.0.0.1]:45720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9Cyq-0004Ex-OS for submit@debbugs.gnu.org; Mon, 20 May 2024 20:03:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:37254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9Bq4-00035Q-6O for submit@debbugs.gnu.org; Mon, 20 May 2024 18:50:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9Bpz-00021E-2M for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 18:50:35 -0400 Received: from fhigh6-smtp.messagingengine.com ([103.168.172.157]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9Bpw-0002T2-Bl for bug-gnu-emacs@gnu.org; Mon, 20 May 2024 18:50:33 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 9AAE11140161 for ; Mon, 20 May 2024 18:50:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 20 May 2024 18:50:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emreyolcu.com; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:message-id:mime-version:reply-to :subject:subject:to:to; s=fm2; t=1716245429; x=1716331829; bh=Lf pi0mXktfjaASgdGfcxk146SBN/mVBLt0hcfCO2zhU=; b=FxYaoypst3nHY7WK39 0dF/Sqx58PqcZ1P7T5OykjCjt8zoOzL0WGya0fYRLLjGrzzTyaR0uD09rPOWyO8L HAUvMwgfJ+Ob7/BGxO0am5tqCt0HCqLetgeJMabFS0ufR+H4vrkt1NLB9xF44nXb sXsBqP9Kygwhb1ZFmAuu3lIcdlolS0pVER0AyZmEzBZfpDzFhA+C9QlL/nCSRtL3 DwmrXLZgzC/LrBpVMXvo8w54/bjYJDGFyP3atMfebmkbUZSOPJMwCWRRzSNBA8G+ 0vPkgMq148xT6+pLvdCYbNOJ3DlHWJQBOqopA8QnS3//u6pybbkh5aS7iIQnYWf8 FJOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1716245429; x=1716331829; bh=Lfpi0mXktfjaASgdGfcxk146SBN/ mVBLt0hcfCO2zhU=; b=qt0rRmSyo6PV3FsxZuyDuXuv4IgkXV56MzCiFubCAUvQ v7fryGJrKD6jORd5zbba0yW8IGzP2npGW26+Z0DZyvACXIbgRFvLwDfGke4Te6En h2GyG3l/BGlaF9WP7KkG2LuQOeqtgoEwyg3hLinohsV72XOKwra7iTHnhg8EBrfN olyb5UgfnlmRMJpqpyuRmcKWeNrI2d4qxaCilxKsKDfm1WItVeiPkERYX+IBSEu6 qOYDT7FOe72lDua65H5Q+gP8LY5fFEbIdY9ZcN+2VjhcvHsLrYfoPVdO6F/E938F V+XeJ8IS1e8jeLsUlacVyZ3lNcafDzwr7Gm9pqdkcQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeiuddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhtgfgggfukfffvffosehtjehmtd hhtddvnecuhfhrohhmpefgmhhrvgcujgholhgtuhcuoehmrghilhesvghmrhgvhiholhgt uhdrtghomheqnecuggftrfgrthhtvghrnhepueeuveejfeetjeevvdehheetkeefvdefff fgvdffgfetffffieethfffuedtgeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepmhgrihhlsegvmhhrvgihohhltghurdgtohhm X-ME-Proxy: Feedback-ID: i1b09467c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 20 May 2024 18:50:29 -0400 (EDT) From: Emre Yolcu Content-Type: text/plain; charset=us-ascii; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: text-scale-adjust does not adjust margin width Message-Id: Date: Mon, 20 May 2024 18:50:28 -0400 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3608.120.23.2.7) Received-SPF: pass client-ip=103.168.172.157; envelope-from=mail@emreyolcu.com; helo=fhigh6-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 20 May 2024 20:03:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) As of Emacs 29.3, changing the text size in a buffer using text-scale-adjust has no affect on margin width. Since the text displayed in the margins has the same height as the text in the buffer, this behavior causes the text in the margin to be clipped if we increase the text size too much by using text-scale-adjust. Here are the steps to confirm: 1. Launch with "emacs -Q". 2. Evaluate: (set-window-fringes nil 0) (set-window-margins nil 1) 3. Switch to a scratch buffer. 4. Place the cursor, which should be box-shaped by default, on the first-column of the buffer. 5. Increase the text size in the buffer by pressing C-x C-= several times. Expected behavior: Left margin has exactly the same width as that of the cursor. Current behavior: Left margin has width much smaller than that of the cursor. It also seems to me that there is no way to work around this problem in the Elisp layer, because text-scale-mode works by remapping faces in a buffer-local manner; however, - there is no face defined for the margins, and - it seems that the pixel width of the margins is not determined in a buffer-local manner. Given that {left,right}-margin-width are buffer-local variables, I would expect their pixel width to be determined in a buffer-local manner. From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 07:38:39 2024 Received: (at 71085) by debbugs.gnu.org; 21 May 2024 11:38:39 +0000 Received: from localhost ([127.0.0.1]:48694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9NpH-0001y3-3R for submit@debbugs.gnu.org; Tue, 21 May 2024 07:38:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9NpC-0001xu-Ce; Tue, 21 May 2024 07:38:37 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9Np1-000884-FD; Tue, 21 May 2024 07:38:23 -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=e9MoNcgq9nydniRVv0+DQ7cTto266uBQAJjSV71ANaQ=; b=KLrvZ+PW5/0J cf96cuNFaIp78X4TzId/O2RfeEmAdpHZgCf6P9llHhKH762+V+Ne6o17iha6cu1S0gt/7OnvicmiA 2XTp3UnHNfLVZ3NSGSSqMJ49iL2oW0f6kRgSmIjol3zsCkRVsep9qugdKGu59hgOU/nffqnlAlZtb ZnnRh2tPVbVPrSPcRyla8VDTiniaIKfx0Ch0nVUbQC7gxe6pVnmFzEPoT60y1FIuS9L8FrWDMY6r4 eFPrIkyaOBl98GH3v4TALSz+w8yLxPbk5S1mYdWLOVEl8OJt/XjcWZ8hOgmM34lo2vLRue4dQTKny b/crQa9LVWgqPae8jPBQHw==; Date: Tue, 21 May 2024 14:38:19 +0300 Message-Id: <86r0dv8kes.fsf@gnu.org> From: Eli Zaretskii To: Emre Yolcu In-Reply-To: (message from Emre Yolcu on Mon, 20 May 2024 18:50:28 -0400) Subject: Re: bug#71085: text-scale-adjust does not adjust margin width References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71085 Cc: 71085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 71085 notabug thanks > From: Emre Yolcu > Date: Mon, 20 May 2024 18:50:28 -0400 > > As of Emacs 29.3, changing the text size in a buffer using > text-scale-adjust has no affect on margin width. Since the text displayed > in the margins has the same height as the text in the buffer, this > behavior causes the text in the margin to be clipped if we increase the > text size too much by using text-scale-adjust. Here are the steps to > confirm: > > 1. Launch with "emacs -Q". > 2. Evaluate: > > (set-window-fringes nil 0) > (set-window-margins nil 1) > > 3. Switch to a scratch buffer. > 4. Place the cursor, which should be box-shaped by default, on the > first-column of the buffer. > 5. Increase the text size in the buffer by pressing C-x C-= several times. > > Expected behavior: Left margin has exactly the same width as that of the cursor. > Current behavior: Left margin has width much smaller than that of the cursor. I don't understand the expectations: the window and frame geometry are not changed by text-scale-adjust, so why did you expect the window margins to change? The margins are part of the window geometry. Since Emacs 29.1, we have global-text-scale-adjust-resizes-frames, which, if non-nil, causes the frame to resize when you change the text-size globally (e.g., with C-M-+ or C-M-mouse-wheel). If you do that, the window-margins resize as well, which in this case is indeed expected (and works for me). > It also seems to me that there is no way to work around this problem in > the Elisp layer, because text-scale-mode works by remapping faces in a > buffer-local manner; however, > - there is no face defined for the margins, and > - it seems that the pixel width of the margins is not determined in a > buffer-local manner. > > Given that {left,right}-margin-width are buffer-local variables, I would > expect their pixel width to be determined in a buffer-local manner. The above is inaccurate: the text shown in the margin can have its own distinct face. For example, try this in "emacs -Q": M-x font-lock-mode RET M-< M-: (set-window-margins nil 4 4) RET M-: (add-text-properties (point) (1+ (point)) (list 'display (list '(margin left-margin) (propertize "FOO" 'face 'warning)))) RET You will see the string "FOO" displayed in the margin with a distinct face. You could define this face to have an absolute :height attribute, in which case the text in the margin will not scale, and thus will not be clipped when you use text-size-adjust. So there _is_ in fact a way to work around, even if you don't want to use global-text-scale-adjust-resizes-frames and the globalized text-scaling. I see no bug here. From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 12:14:54 2024 Received: (at 71085) by debbugs.gnu.org; 21 May 2024 16:14:55 +0000 Received: from localhost ([127.0.0.1]:49872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9S8c-0000Rc-0P for submit@debbugs.gnu.org; Tue, 21 May 2024 12:14:54 -0400 Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:24288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9S8Z-0000RQ-09 for 71085@debbugs.gnu.org; Tue, 21 May 2024 12:14:52 -0400 Received: from pps.filterd (m0246629.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 44LCxw33015007; Tue, 21 May 2024 16:14:44 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-2023-11-20; bh=CvcjzZlr+Dn8YwDffE7jLOVMQc0/RKIgLSaL2YJefSI=; b=kpTJWgCj9+rS+V3lGOeYROuwKdiTlEqT+1aGCuCPufBnruKtgIC79wiPdsiSvuyT2d+b B1M269Y7RsJwkoGu69S1mtl6u+ARlvAuzX6dAAutzeudNMp2OuXziBNDzczyeZ7qbDEA 1I5i2IiNHkjuzN2ILv27CNtAk/Er2zDsznFl8+kQU06ZLgUaqZbtI+5IqE0rxuAMf2eM tdbzA1RVWXR0yHsL/PpLDSWbg+w+MhiEn0QodaRuvbZXEYMrLQNG+F3naHlabwefT1MZ 86JU9ufENFIGtmpizNfd4MdrsUj2FjgkIpyskDzlxYMA5EisJD6UliKo2RKRJ2wO3qim /A== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3y6m7b5jp8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2024 16:14:43 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 44LEn7Ch013836; Tue, 21 May 2024 16:14:38 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2169.outbound.protection.outlook.com [104.47.57.169]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3y6js7e4nv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 May 2024 16:14:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DqS1o413gvYKT3/zxdkc5WLAulZwy1HoQC4t1Mu2X4+u/54dU6KAaiWJqZHs8J0hDfOHTLW901zgFDg/ss76d2qA7iJj4dBHcgLRJcCJvOn3JT8wJIR7DtUraC7mTN61E6f+7q5kb1fGlsbnUAr+B9YcH5Y2qIo7CEzuW9sVATbFhyreAy5Pv0j/83xy1BnezUwYHaAfCD3VQr3hB/AODfRrVyl2aybvcnOrLlsJqFc1/ZQYYD1lM1NSeRSb47l8cBMb1cQUt6NqwZA7/R0xM/sZmKxXZaDCsrwpQVfeNhL6mCUvsIeSk8K6QveuvXh0Bg0lswaDYQP9oWYv5Zaq0Q== 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=CvcjzZlr+Dn8YwDffE7jLOVMQc0/RKIgLSaL2YJefSI=; b=OHXgR5a6ahnfELwZGB6UC0Sv7FODeCDgob89z1oV5mNLwM1ugQupOR0e3TjTudzwl9Q+XRvC/UnojFhbcnCEKAkD2wlFvts2vjksvlwtasLO6SoSF+pwkTnRSM7AbpS/bfQ7wPWgZ+mW7dbvFNGovUzUwyJcTL2a5VlsNfft2UDujHRK/m7zp32+cWMCHSHmStcyrWrvqaJop4caIAGYNfKuCRz3upsX6UBzOajdnPUmBR37XGBVev/9qi1APJ8ey8+vZTRpKe6FqnEVfnAACYHA16vQcdo/AyahH3TNmQmzpCmlNJD1MIOPvTrGTCdUKQTbic06dkL7YOMKJQyc6A== 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=CvcjzZlr+Dn8YwDffE7jLOVMQc0/RKIgLSaL2YJefSI=; b=XM6b+xnCYtOvVCItq1JeAn4uZ+wKPb3jwt2taQzw205/iXVWkaxF3V/FmxmLCe5I4qL0EVYRR7oNNYCnvuPnyCqxHJ21G7jpCWxRtqCzeX6qcS+8craWh2wYC5gbjdeeSuswd/3awhmt1aIr70x28uHiXVRkPA8IKYYUxcNGEsQ= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ2PR10MB7084.namprd10.prod.outlook.com (2603:10b6:a03:4c4::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.37; Tue, 21 May 2024 16:14:35 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::b75a:ef76:884a:dd27]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::b75a:ef76:884a:dd27%4]) with mapi id 15.20.7611.016; Tue, 21 May 2024 16:14:35 +0000 From: Drew Adams To: Eli Zaretskii , Emre Yolcu Subject: RE: [External] : bug#71085: text-scale-adjust does not adjust margin width Thread-Topic: [External] : bug#71085: text-scale-adjust does not adjust margin width Thread-Index: AQHaq3OLZ2w54EH8cUuSQ4EUDrYM97Gh1h1g Date: Tue, 21 May 2024 16:14:35 +0000 Message-ID: References: <86r0dv8kes.fsf@gnu.org> In-Reply-To: <86r0dv8kes.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|SJ2PR10MB7084:EE_ x-ms-office365-filtering-correlation-id: 7af76cd9-572a-40d1-afb4-08dc79b11b5e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230031|366007|1800799015|376005|38070700009; x-microsoft-antispam-message-info: =?us-ascii?Q?KDXBseL6f8X1k+O3mM1Jz9bTD/7c+LVgKK+dR0q2nYvpnbwj99PHUt/bX9ya?= =?us-ascii?Q?zhgAymuJekFlofpbvfVgwELaKXzIRPrmXpaRrWgEOHd4negqya8u3l/kkC8Y?= =?us-ascii?Q?GwE5uxyCziwzHayriXqIjcOP0ISlcVd7Sv0knuwMYbuwWM6s1o+8+zgRxxAv?= =?us-ascii?Q?UuysvBYC3omK9bpTD3Lsv3g/UTH/jGc3herfZLJDNy2IpOY93jYWHTA4l8R4?= =?us-ascii?Q?nIVX0aelI0PE32h2+yF3xY6fYD3Vhei3ODLqBF/2DFmsxQ5oiAUfH/T/PXIt?= =?us-ascii?Q?vY8mYIiWfH7YiRMfpX4FoF7VL7MoS+vSEAxEzDAi0rTfK73DLFuEAbriuOwB?= =?us-ascii?Q?9M3PNVKUfWqIo8CgvSWAOYJwMPjdUJbuPk9iyADGaCqWQboBMIq7p7ZcvOkG?= =?us-ascii?Q?oUcmiOzGR1kVWcwZKS593Xym/SXpl47BCVEyhdkJ2RyGTfo0oqeY0UjX1ZuO?= =?us-ascii?Q?nXYMZIS00Q/Tyz02lf3OkYcXxKIbvaRl19iowpPnzeJ3nKovy47cZjcXd3Wv?= =?us-ascii?Q?rY0WuiJmVAIbwUMec2a8Ak+BEg7TOdaKnkMLTqEp2EyrIO69jKtAAC51EqCA?= =?us-ascii?Q?5ti00hpR0s1POkYqS17HC26wIAsvHoOkS/TGWsDA1QksgIDgfYbh+sBd91dQ?= =?us-ascii?Q?ctF+bCQkrI4cCInacA5XgWreMIoY7VhNBdKUFajFwKZRPt7NoWdHHn2GlyRY?= =?us-ascii?Q?AdEwWkQ9xhHb7Nq2k3Qqz4L5GaLDsYKSL4cNUlQ9IEZzlaiukMjc1ezf8zHN?= =?us-ascii?Q?d60UEsVxJEhLs7QnqKjFoh8Gvp8qoPlhDIUmcBNZ6CXEAxxICn3hms7cch/j?= =?us-ascii?Q?vvFDBqHF7NiSMOombJacZTJBUuuqpeF0tsG+zkcv0F8S8fnkN+bnxmsytzIq?= =?us-ascii?Q?QUqA8jutdgNsXkRwgBaZZYPEKb6jNgD/tca21BPBQt8k1KIhx/WXNtIDfdFd?= =?us-ascii?Q?d04vgZ0t322vFuZY97KeTokE2qU3a13bywVdUSJfMvtJeW3iRzsUrumviax+?= =?us-ascii?Q?mRFWdstRw2rDccqh3Bxnh2tx0FCHtB2p4XxTrQPGjRUtprorwdrxE8UfdNAv?= =?us-ascii?Q?xREzK8smLbkFOoiEpap5GmiJmaGY4VpO/rLVCIpvt71b+z3aknowLmGFL+zZ?= =?us-ascii?Q?rIuANaQJqCOy7bBpz2EudzaU6YoGRYXOsViXs7dW6ok9gK0tPHb31sGrEN/K?= =?us-ascii?Q?UfY5E/GJLiFpY6wOgzgJKM0gDFi8F3imgdIs377OCeMMQZ1ArpF6kjxJNzuf?= =?us-ascii?Q?1Gfw8YEmWgdckVm3ntWIigIKKdZcJpcP6UtPLNltF7fUDETUSZFJDQii1SL2?= =?us-ascii?Q?FgepwZvFm9x5XbBBe0VPRnfbLiEsNj9vlkEPIQnDHIGFBQ=3D=3D?= 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:(13230031)(366007)(1800799015)(376005)(38070700009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?m3HSFMOZgGck1/mu64URKrt/kMl+o+iUgsdhGtfD81rKfKUqp/6ZosY1aJHO?= =?us-ascii?Q?hhyXIP/5FBwPbqTN7CwsfFoMWFVyUaheKT12vpqBmwTicrAsbIsBHutkHorM?= =?us-ascii?Q?cjJtwOz8l9h7AymuWoyajSObBY4aaojF4OF7uOcHjhE4Wu/Is40l45Fo69rd?= =?us-ascii?Q?og50B6UmM+pcXHn1nOZaO3PShm2fhPYrjNppkhxJqYr8sqD+Ay1uiZs08QJD?= =?us-ascii?Q?EZCntr500yoWWypJZkgQyAS0srVhCpnuvZ/JNi7H4eQuh7p+sc2+HBn/K/8o?= =?us-ascii?Q?CHnUVzl40eBatqQMRXuxfDIAMnbZ2e847IMRnkoR6ndh7kZRAzXlyvUmKHI+?= =?us-ascii?Q?VDDN8Fib7KtLiQGNwkW/lrl4OddQnuFePvSzPTb1Kk4aH+dA6gfSQVaLrKik?= =?us-ascii?Q?d9RCJzddydefd8fkZx0pztlfmwOUG4IzCmwrbgg1dbKvsXSDIsmd4ATPU7iw?= =?us-ascii?Q?97KTHt4Qm0pnyVyTWJRy3tagVvrpALIfNSHia+I+Sj5syPalgiB+0PYHE68V?= =?us-ascii?Q?Y5hu030mSm+55hzyE8uCu1jWSbDXTY/G/M+nSyidtoCZvBlCxQ0rqYLjLLmd?= =?us-ascii?Q?hfb1LsEVvcCodevdfdJGPG0ySBLnxrlhv37MTniyO/BSWOxrNrvWNIHc8MyT?= =?us-ascii?Q?JF/5Y00GC/bU7B+CK0NZ6E6TNIoQ6sxZrN+X1IdAlTdI5qVh/CiDK+0FFmL9?= =?us-ascii?Q?RQeAx++mdxz13sadR7is5XJ++zxv3j6ZBIE/qk9svdOQ8xHV7mlz1S+g3JgG?= =?us-ascii?Q?SqjJ+dN1UlBTl5kdSV3o6m74I+lB/AdUhT5A3+8Syw2DYVm1v16F6zFIgfvw?= =?us-ascii?Q?MzOl3oaxrXNdWksNJbCyHSdYXUgGBmZIFDuIHAnDoVWNgbESJ3zYOMf7MGQY?= =?us-ascii?Q?oL+FsYQ5RVLsRgcJPQoAdueIn2fKUCUwF38PTS7sn0Urrux/h+ezFB9SA9q0?= =?us-ascii?Q?g/ox+2oEcaHslWHbGMz8gB9d8ZNUIbVIs3IAKzq1FG/Vj93bBUGi7P5OfQiO?= =?us-ascii?Q?KLkiypSv/nwBR8WnEtPELgMRrIxOz9cafUqUQR21/oQ7odX8O3wvD6B2vsDt?= =?us-ascii?Q?5r3XUJbbbfehDHd7K4HoFPXXszUy55UENE+GKky+GgS6+e4ozheZeluUVP5n?= =?us-ascii?Q?urAsnD5bkkuJ9gg5/KYXB75RDNtCqn7SparrgPtOtT+w9ioUvnyb8slimhEa?= =?us-ascii?Q?IC5rtAzC10toQExXEN30nCZFC9dPMmhZYCFdq0DE0APfT7GiQidmQJWyBu+G?= =?us-ascii?Q?r/OPfkHdnPqRge6Bdp9BAKbx1Pyn4qvCgJxFk+QUwF1udp2KVKvv/OWChS2x?= =?us-ascii?Q?OIoQivSyks1kbkKe0HUYMygEqVF9E/3ika9K3KsUp0qno0DxcN4ygjmwJx7s?= =?us-ascii?Q?pbgQ036Pc8cyOL2cNFl38j8m8L1PUj1fl80IDOVEaN1b0YgJsDOza7d5wwu3?= =?us-ascii?Q?NCstv5Unr0VCYHiMsA60SHE+l0+N9YRBaTADJb8Y32zTgmei/LIAs2WmFPDj?= =?us-ascii?Q?GW7gCtqfNyazHgvvFNpI2NHg9uDrimk0ej2ffZhEdkNLqXkJFiAQfa9zM5+W?= =?us-ascii?Q?eh5WycUOGRNzg9dA7gI=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: Y1BEKNEl5iYmCy+yy7MVtG5E8FtfCY3VZutGHbFxK5ElVaa7pysPQV5AJBH+bO4EvXWLzIF4o0an2POMN8dls3vi1fV7kGaQUSncluvUOwATIayXHWLid/hB6nv9BXr37xlthoqcylsEw9Cnzj3QxeIdUIrjoJRAvcPmoZssETDaT+CG0t6WGCkuxAGAcsTaO6EDy+6HE8VP/VWJPK6hWRoQhaU41WGha6/X4T/BDuvVOaj2E+YiV840XyA5KBTwHFz/evnDPXhN0Sg666w23lLNjVBU4wR8J7/QUt0eSVIRr7oOPg5BGmb7FxLa8H78SXlwt1o4EebZY3DjuTQWAFionG+OXT+q8kyc4nrwwUQV+pQKwU/cjrshZtfmfItNOhLf1Y7wK04ssV1WoJFIqOav4CVw+EgYtk3s953+jdQW8x3ihYX9CPlb/Q0s2ddX2aEMVh7nPhNqQ25hngXmyIyU9FW+EAXnqRmtRdnVGfOVeGmOnNXM61zqYtdO//6sSEOqk56HLRbJIXihGbpB2fnXB+I6vfn/5vzZ4Df0XJWdBnpM8pgA/4uetvNoB7nE7jr3qJ6Ou+DADnMYAbY4zEaprDJNXbsyi6r3l5Y5AKg= 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: 7af76cd9-572a-40d1-afb4-08dc79b11b5e X-MS-Exchange-CrossTenant-originalarrivaltime: 21 May 2024 16:14:35.4931 (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: IWnOe/ossEaKBFBAGcR3B+pycrvZrLGdhLaPPqx/7xO8V6jFWUEG5w80J2nx5HgDghI353xESwO3doq5uULABw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7084 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-21_10,2024-05-21_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 mlxscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2405010000 definitions=main-2405210122 X-Proofpoint-ORIG-GUID: qYEi9nucPFdI5lGD4hvZbooCBYGHVRKd X-Proofpoint-GUID: qYEi9nucPFdI5lGD4hvZbooCBYGHVRKd X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 71085 Cc: "71085@debbugs.gnu.org" <71085@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > tags 71085 notabug > I don't understand the expectations: the window and frame geometry are > not changed by text-scale-adjust, so why did you expect the window > margins to change? The margins are part of the window geometry. >=20 > Since Emacs 29.1, we have global-text-scale-adjust-resizes-frames, > which, if non-nil, causes the frame to resize when you change the > text-size globally (e.g., with C-M-+ or C-M-mouse-wheel). If you do > that, the window-margins resize as well, which in this case is indeed > expected (and works for me). > I see no bug here. FWIW, I've previously proposed an optional enhancement of resizing the window when you change text size by scaling. I implemented this and proposed the code, as soon as text-scaling was introduced to Emacs. The suggestion/request was summarily rejected. The current request (#71085) is in the same vein. Yes, you can say there's no bug here, because text scaling, as provided so far, is independent of windows, margins, etc. Nevertheless, some users might find it useful to be able to resize such things when they resize the text. Think _enhancement request_, not bug per se. See also "bugs" 7342, 8379, 19194, 39901, 48307, 56357, 57313. From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 12:15:05 2024 Received: (at 71085) by debbugs.gnu.org; 21 May 2024 16:15:05 +0000 Received: from localhost ([127.0.0.1]:49883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9S8m-0000T3-HY for submit@debbugs.gnu.org; Tue, 21 May 2024 12:15:04 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]:52645) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9S8e-0000RP-8P for 71085@debbugs.gnu.org; Tue, 21 May 2024 12:14:57 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id A19F41381537; Tue, 21 May 2024 12:14:44 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 21 May 2024 12:14:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emreyolcu.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1716308084; x=1716394484; bh=EPYRVJAt1ufn00HJ1lxIS1jL15PUiHWm /bp2gymitOE=; b=3q4jc4i5UAhdZvxsvINZ1oF+fYeJQvgkZvArQBCydFOQIqew G+Grmr9LGbooqBar1S83Xe33j9pZfnQBtLn6kHfbIO2EWKps2S31t3bArGk7Burv cOhbl65MRTlkQj8itGhV4C2j6+gex6/9Nb3HrswIybcVim3Q13sdKMM5auX5H7Ur YRgLC+0Bk4C0qCzhpm8tQ88t5TbH0jzjY27NM1kLDmDt4n2EPF8aR0Jz4lXkWGQ9 1xjQ60dsix/az3DN64dRV98CJJtGK7rgD8a95VmjfaEaN+HTn1TwMqicxSPZeCOk nqx/H3Pac45NYZd30ZMqx3z5tPR8U3EKHJgQoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716308084; x= 1716394484; bh=EPYRVJAt1ufn00HJ1lxIS1jL15PUiHWm/bp2gymitOE=; b=T qcRI6eotkBM5HRB5p8G2liWa/M3WHXlayHRQ7iCADUUe8XQRYQH2LU2F7e1y014o F/VI24bDyQY4G4DF296I4C3kg5BiIzHy8VsNbSZR8BmFIqnJfKa3JyRNWoKaX04S jq8rsjIR9sRIcMpe8bR2Gt5oL/+h6diDN0EMP1PZM6ZrY8yWM3xp625gEUFlYx2Q mbVdn+VWtNnti+uu98Tc/kYl0tgYTh1RR2hGHzp1OF6riyts7Sdwf4T3uteLWrhc RJAbhPvM9kuOQ1GnIkfja78bu8UymgJ592Bg/OjEO+sN7PVxvDeFgmgysCFUcYI6 vQAPPhSQwZxWq3NV6MgfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeivddgleeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtvdejnecuhfhrohhmpefgmhhr vgcujgholhgtuhcuoehmrghilhesvghmrhgvhiholhgtuhdrtghomheqnecuggftrfgrth htvghrnhepveeftdeiteevjeehvddvhfdtfeegfedtkedvheetjedugfffveehvdduueek tdegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grihhlsegvmhhrvgihohhltghurdgtohhm X-ME-Proxy: Feedback-ID: i1b09467c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 May 2024 12:14:44 -0400 (EDT) Message-ID: Date: Tue, 21 May 2024 12:14:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: bug#71085: text-scale-adjust does not adjust margin width To: Eli Zaretskii References: <86r0dv8kes.fsf@gnu.org> Content-Language: en-US From: Emre Yolcu In-Reply-To: <86r0dv8kes.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71085 Cc: 71085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Eli Zaretskii wrote: > I don't understand the expectations: the window and frame geometry are > not changed by text-scale-adjust, so why did you expect the window > margins to change? The margins are part of the window geometry. I was not thinking of the margins as part of the window geometry but as a special part of the buffer that we set aside and do not interact with. This is partly because the margins display text, the height of which is affected by text-scale-adjust, and partly because there is no visual separation between the margin and the buffer (assuming fringes are disabled). For comparison, the mode line also displays text, but it has its own face and its text size is not affected by text-scale-adjust (as one would expect). The fringe also has its own face, as do all of the other things that I would consider to be part of the window geometry, but there is no "margin" face. (I am aware that we can affect its display to some degree by propertizing the text in it.) > Since Emacs 29.1, we have global-text-scale-adjust-resizes-frames, > which, if non-nil, causes the frame to resize when you change the > text-size globally (e.g., with C-M-+ or C-M-mouse-wheel). If you do > that, the window-margins resize as well, which in this case is indeed > expected (and works for me). Thanks for that suggestion. Indeed, I often change text size globally, but sometimes resizing in a buffer-local manner is nice to have. >> It also seems to me that there is no way to work around this problem in >> the Elisp layer, because text-scale-mode works by remapping faces in a >> buffer-local manner; however, >> - there is no face defined for the margins, and >> - it seems that the pixel width of the margins is not determined in a >> buffer-local manner. >> >> Given that {left,right}-margin-width are buffer-local variables, I would >> expect their pixel width to be determined in a buffer-local manner. > The above is inaccurate: the text shown in the margin can have its own > distinct face. For example, try this in "emacs -Q": > > M-x font-lock-mode RET > M-< > M-: (set-window-margins nil 4 4) RET > M-: (add-text-properties (point) (1+ (point)) (list 'display (list '(margin left-margin) (propertize "FOO" 'face 'warning)))) RET > > You will see the string "FOO" displayed in the margin with a distinct > face. You could define this face to have an absolute :height > attribute, in which case the text in the margin will not scale, and > thus will not be clipped when you use text-size-adjust. So there _is_ > in fact a way to work around, even if you don't want to use > global-text-scale-adjust-resizes-frames and the globalized > text-scaling. I didn't mean to imply that we cannot affect the appearance of the text displayed in the margins in any way, but simply that there is no "margin" face that a user can modify via, for instance, custom-set-faces. The workaround that you suggested requires the user to patch every single package that displays text in the margins, which is less than ideal. A much nicer workaround would be possible if there existed a "margin" face: text-scale-mode could simply remap it as it does the default face. As a motivating example, let me point out that text-scale-mode defines the variable text-scale-remap-header-line to allow resizing the size of the header line along with buffer text. If a "margin" face existed, we could add a new variable text-scale-remap-margin to achieve the behavior I suggested in an easy way. > I see no bug here. Fair enough. Please consider it a feature request for a "margin" face (for the reasons in the above paragraph). This is admittedly a highly niche problem, so I would understand if you think it is not worth the time. However, if you at least agree that having a face for the margins would be a welcome addition, I could make an attempt at a patch. From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 14:20:06 2024 Received: (at 71085) by debbugs.gnu.org; 21 May 2024 18:20:07 +0000 Received: from localhost ([127.0.0.1]:50470 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9U5m-00022o-59 for submit@debbugs.gnu.org; Tue, 21 May 2024 14:20:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9U5i-00022D-Ki for 71085@debbugs.gnu.org; Tue, 21 May 2024 14:20:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9U3P-0001YL-8O; Tue, 21 May 2024 14:17:40 -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=Xwzdd9fx/4srC0oinGV4wED7QaNiwVpZW6LDOYmMn2k=; b=qRTAjCIjQBap NUVfqQyYBNj3L6swPx7YlOjlOv9DqZdb1IEFKOmvrgPy6ispDr3hrKZu8G39nLToc2CYhAVDT0O71 U+mvpb4NYNusAFXOj0oCFU2fiJ7efMay6AvgSHaG85lwbh5L4aTYi5IDEQgS7s410BjU8Bwk8wICQ z1lvvDjusHj8qki8eFTOJjvM6iOVTQPuX4kMCK08pj3rGOT07yM35nqDRLcEXHf23QXbTJIivx9xr wB4crAfL7vODrHKZlisuipeo10vCQmTgT2yOAbPvH0Vf7p8OYAhLH/WDpBfeLOj9bwfNxR48dzowT r9A3KTsHeyrhS6FIXuyxlg==; Date: Tue, 21 May 2024 21:17:37 +0300 Message-Id: <86ed9v81xa.fsf@gnu.org> From: Eli Zaretskii To: Emre Yolcu In-Reply-To: (message from Emre Yolcu on Tue, 21 May 2024 12:14:41 -0400) Subject: Re: bug#71085: text-scale-adjust does not adjust margin width References: <86r0dv8kes.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71085 Cc: 71085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Tue, 21 May 2024 12:14:41 -0400 > Cc: 71085@debbugs.gnu.org > From: Emre Yolcu > > Eli Zaretskii wrote: > > I don't understand the expectations: the window and frame geometry are > > not changed by text-scale-adjust, so why did you expect the window > > margins to change? The margins are part of the window geometry. > I was not thinking of the margins as part of the window geometry but as > a special part of the buffer that we set aside and do not interact with. Well, but the fact is the margins _are_ part of the window geometry. And window geometry doesn't change when text size is scaled. So this is a de-facto behavior Emacs had for several releases now, and we must preserve it. > This is partly because the margins display text, the height of which is > affected by text-scale-adjust, and partly because there is no visual > separation between the margin and the buffer (assuming fringes are > disabled). For comparison, the mode line also displays text, but it has > its own face and its text size is not affected by text-scale-adjust (as > one would expect). The fringe also has its own face, as do all of the > other things that I would consider to be part of the window geometry, > but there is no "margin" face. (I am aware that we can affect its > display to some degree by propertizing the text in it.) I see no reason to introduce yet another face. Most stuff displayed in the margin doesn't need to be resized, so modes who write some large enough text there can use a special face as I demonstrated. > > The above is inaccurate: the text shown in the margin can have its own > > distinct face. For example, try this in "emacs -Q": > > > > M-x font-lock-mode RET > > M-< > > M-: (set-window-margins nil 4 4) RET > > M-: (add-text-properties (point) (1+ (point)) (list 'display (list '(margin left-margin) (propertize "FOO" 'face 'warning)))) RET > > > > You will see the string "FOO" displayed in the margin with a distinct > > face. You could define this face to have an absolute :height > > attribute, in which case the text in the margin will not scale, and > > thus will not be clipped when you use text-size-adjust. So there _is_ > > in fact a way to work around, even if you don't want to use > > global-text-scale-adjust-resizes-frames and the globalized > > text-scaling. > I didn't mean to imply that we cannot affect the appearance of the text > displayed in the margins in any way, but simply that there is no > "margin" face that a user can modify via, for instance, > custom-set-faces. The workaround that you suggested requires the user to > patch every single package that displays text in the margins, which is > less than ideal. Not "every package", because not every package has these problems. But yes, packages that want the text in the margins to remain visible even when the text is significantly resized need to define a special face for the margin. I see no problem here, since this is on a per-package basis. > A much nicer workaround would be possible if there > existed a "margin" face: text-scale-mode could simply remap it as it > does the default face. Actually, you want a face that will _not_ be remapped, since you want to make sure the text in the margins will not get clipped. The current behavior is that by default the text in the margin is already remapped, which is why it can get clipped if it becomes too wide. > > I see no bug here. > Fair enough. Please consider it a feature request for a "margin" face I don't see a need for it, sorry. From debbugs-submit-bounces@debbugs.gnu.org Tue May 21 16:10:32 2024 Received: (at 71085) by debbugs.gnu.org; 21 May 2024 20:10:32 +0000 Received: from localhost ([127.0.0.1]:50949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9Voe-0005sx-7t for submit@debbugs.gnu.org; Tue, 21 May 2024 16:10:32 -0400 Received: from wfhigh4-smtp.messagingengine.com ([64.147.123.155]:53983) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9VoZ-0005sf-30 for 71085@debbugs.gnu.org; Tue, 21 May 2024 16:10:30 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfhigh.west.internal (Postfix) with ESMTP id D224D1800178; Tue, 21 May 2024 16:10:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 21 May 2024 16:10:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emreyolcu.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1716322215; x=1716408615; bh=/uFlkS0QS7lvZbUeoVDkwLBiflVjtqbu qbmk9KVvbhA=; b=KPI9wPCljErBt1+wOQ+mjexu+ngjUuV8dd/uZGVbnQVNPKQ8 ML9tibOAne07e06539u27LbHIOtQ163SyEUbzdaTWDfGO1/USR6bPMcx/Hl96yMu iWH6uEK9XT0fji9TUAnqYF2b2CRbF5hruvfi4Dl57jdS8eILPpzr7UENQ+xFmE1S lMZxdJJcez8q0oYYgU5BUxoLLUHoLhFrMFXPPf5+SwTbRfLix5o7oAq3WUiKok57 pYwUjZU4/INL9mBXhBRnMRN+U+JvFltStBFdts5pPrPMTvKxkbf6RbJHYYgXwdkL ArfQe4KOpSNfPN2b5eQ1/Fw2yogr3tWrLAnUJg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716322215; x= 1716408615; bh=/uFlkS0QS7lvZbUeoVDkwLBiflVjtqbuqbmk9KVvbhA=; b=B Mf1ZDAl4RgSpnJ2mQqSoXtjf4SM0ZKmtMDBP2ZHQSGEVLsXgeMcSkGnYgY21j//I 9EVTqhd1xtbPpHyx+5Cb8IgK+VGvNNVQVFYOCuOtWVKF/K1PMcCEpN52v5tO/MRx sDXsnyslWE3cvZXPgzvyEvarhgOgoEEkuvVKQSc3Z4m1Hu5xaUAADXLITkXFF0mT xfkq9By9tFr/Sc0UgLn39gW4tNaicb3AnVpVs17/Y3KiYieX+5vx5N4dh9mNX+Ug EQPp3al8hOjrMF5GcyIIF+tbkEgPCIT30/Nsg8yidwV/fplZSGVYaUILLfEC2kBQ n2iva+W9kvHEmENDFfB0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeivddgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpegtggfuhfgjffevgffkfhfvofesthejmhdthhdtvdenucfhrhhomhepgfhm rhgvucgjohhltghuuceomhgrihhlsegvmhhrvgihohhltghurdgtohhmqeenucggtffrrg htthgvrhhnpeelvddvfeegudejtedujeffgfeikeffveffieekteffudduieeffeegkeel heegkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrghilhesvghmrhgvhiholhgtuhdrtghomh X-ME-Proxy: Feedback-ID: i1b09467c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 21 May 2024 16:10:15 -0400 (EDT) Content-Type: text/plain; charset=us-ascii; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: bug#71085: text-scale-adjust does not adjust margin width From: Emre Yolcu In-Reply-To: <86ed9v81xa.fsf@gnu.org> Date: Tue, 21 May 2024 16:10:14 -0400 Content-Transfer-Encoding: 7bit Message-Id: <8E15D0B1-7CC7-4202-9D13-BC4AF8319BF1@emreyolcu.com> References: <86r0dv8kes.fsf@gnu.org> <86ed9v81xa.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71085 Cc: 71085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > I don't see a need for it, sorry. Got it. Thanks for discussing it anyway. I don't want to keep the thread going for too long, but I want to reply to some of your comments and leave it at that. (Maybe the discussion will be useful in the future, on the off chance that the issue gets revisited.) >>> I don't understand the expectations: the window and frame geometry are >>> not changed by text-scale-adjust, so why did you expect the window >>> margins to change? The margins are part of the window geometry. >> I was not thinking of the margins as part of the window geometry but as >> a special part of the buffer that we set aside and do not interact with. > > Well, but the fact is the margins _are_ part of the window geometry. > And window geometry doesn't change when text size is scaled. So this > is a de-facto behavior Emacs had for several releases now, and we must > preserve it. FWIW, some wording in the Emacs manual suggests, at least for me, the interpretation that margins are to be viewed as part of the buffer. From Section 41.16.5: "A buffer can have blank areas called display margins on the left and on the right. Ordinary text never appears in these areas, ..." On the other hand, the function for setting margin widths is called "set-window-margins". >> A much nicer workaround would be possible if there >> existed a "margin" face: text-scale-mode could simply remap it as it >> does the default face. > > Actually, you want a face that will _not_ be remapped, since you want > to make sure the text in the margins will not get clipped. The > current behavior is that by default the text in the margin is already > remapped, which is why it can get clipped if it becomes too wide. By remap here I mean that it will remap the margin face *back* to the original height. The current behavior does not explicitly touch (remap) the text in the margin, so the height gets determined by the buffer-local height of the default face. If enabled, the option would make text-scale-mode remap the margin face back to the original height to prevent the text from getting clipped. From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 08:04:13 2024 Received: (at 71085) by debbugs.gnu.org; 22 May 2024 12:04:13 +0000 Received: from localhost ([127.0.0.1]:55528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9khY-0001up-Vj for submit@debbugs.gnu.org; Wed, 22 May 2024 08:04:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9khX-0001uh-QO for 71085@debbugs.gnu.org; Wed, 22 May 2024 08:04:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s9khM-0000UW-0d; Wed, 22 May 2024 08:04:00 -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=1p5vWNqIh/+q3yHTinrLpn2WkVFItcRo/3nEEVy6Asg=; b=Dw9MrZ/Ivygp XkWDr9JHukwyAcqrrvrV+ZI4FxoSW73Q91EITzMxZxa+Xq1wbcHdCOwOyuKpNPQsat+tsN6tYmfSq yPTWhSrOUidEIabHqTY1huotUf6+Gs9EyWFePDxqxMVaa8xq0KpMNRHVyDxVxWP+1V8BAIx9YmUlV Dwlbmp7Si90hM5Mnp8vvu8I3pdO9Qa23ypRGPD9CMZ+105uQkFEiu7jAs4mXxe0aBxxVK/1MURoB0 hPCZk5kTiccq2PMVzqh5ujOu2KAjv7iMOJU3KnB8GWf+Be5S3EqB1u85ndrv052lAUY7RGPKG3c5o VxgSgCB51LGIe7T5BmA0DA==; Date: Wed, 22 May 2024 15:03:57 +0300 Message-Id: <86seya6ok2.fsf@gnu.org> From: Eli Zaretskii To: Emre Yolcu In-Reply-To: <8E15D0B1-7CC7-4202-9D13-BC4AF8319BF1@emreyolcu.com> (message from Emre Yolcu on Tue, 21 May 2024 16:10:14 -0400) Subject: Re: bug#71085: text-scale-adjust does not adjust margin width References: <86r0dv8kes.fsf@gnu.org> <86ed9v81xa.fsf@gnu.org> <8E15D0B1-7CC7-4202-9D13-BC4AF8319BF1@emreyolcu.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71085 Cc: 71085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Emre Yolcu > Date: Tue, 21 May 2024 16:10:14 -0400 > Cc: 71085@debbugs.gnu.org > > > Actually, you want a face that will _not_ be remapped, since you want > > to make sure the text in the margins will not get clipped. The > > current behavior is that by default the text in the margin is already > > remapped, which is why it can get clipped if it becomes too wide. > By remap here I mean that it will remap the margin face *back* to the > original height. The current behavior does not explicitly touch (remap) > the text in the margin, so the height gets determined by the buffer-local > height of the default face. Which means the text in the margins is "remapped" together with the rest of buffer text. While you want it to retain its original size, so as not to be clipped. > If enabled, the option would make text-scale-mode remap the margin > face back to the original height to prevent the text from getting > clipped. We don't have "remapping back" in Emacs. Face remapping affects the same all the faces that don't have an absolute size specification, so they all grow or shrink in the same manner. The only faces that don't grow/shrink are those which are NOT remapped or have an absolute size spec. From debbugs-submit-bounces@debbugs.gnu.org Wed May 22 13:05:17 2024 Received: (at 71085) by debbugs.gnu.org; 22 May 2024 17:05:17 +0000 Received: from localhost ([127.0.0.1]:57079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9pOv-0005GA-Cv for submit@debbugs.gnu.org; Wed, 22 May 2024 13:05:17 -0400 Received: from fout3-smtp.messagingengine.com ([103.168.172.146]:33099) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s9pOr-0005G1-Cf for 71085@debbugs.gnu.org; Wed, 22 May 2024 13:05:16 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 484A113800FD; Wed, 22 May 2024 13:05:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 22 May 2024 13:05:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emreyolcu.com; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=fm2; t=1716397502; x=1716483902; bh=N96a73eNAyVDrXlgydKzRo94wk05tTKg oRDr+/FFxHc=; b=GVkVOEQbv393D3wFl2kUN3uLex+zfYByVNscroDOQ2zWTEfy A6o2Yj4EK+TE8Hb1ML6nztg6gf+S0XGlKCl67nhGEM45ZyVjCus3t73Dnx8ZPY4Z 4zmdQ68gMwFhpFXwf9o+gO3HfVmaEaA/pXnovo1hbbgwgJdxZYsGyaiYKD7B+dPM Uu5xJ0QuPO5ydLC7TAMwYTpkiYP269IuQvKzcmVFSwOb7PoaLnMjHxhOInV/gIPp Hl1immawJGcJo+8BdgesH3sp0TUdAzEdLWy0Hph6MWxN6f89/feLKpnchLilk2mu W+oLV/tI6Rr6sx2AoM0ZU+ysGC51AdtouGyUBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1716397502; x= 1716483902; bh=N96a73eNAyVDrXlgydKzRo94wk05tTKgoRDr+/FFxHc=; b=F HbjCIyWBQvxzGHBpd3F+z9iJVRCBnh34RKoD4tX/GyMjBd/hUBCc+xViMxpxnmx3 sjFyotXi5Q2jdP0T1CZ3N5RTgmo2L1qEQf2kpSjhxMm21H6QPkcZJobLGAgPaeD6 YySBbzTlUJ0jYVTl20dsvF5/UEfoYQp2YXguSIvdFVdYMpOyTM2/TaV+zVAibWSu 8eJStKmkLcfq1SCsR2EGKP165dAIf6JNr9rbdQc7tCcQODTx1Ma1ItWuJ7rQcbei kbkia3j8G8BBmJIFglG7vf+asldnBSbR/Xt7CYz9GaF277FksyQcDXmgcdaMr93c /O7Gxvp/8k73wW5KFxu4w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeigedgfeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffvefgkfhfvffosehtjehmtdhhtddvnecuhfhrohhmpefgmhhr vgcujgholhgtuhcuoehmrghilhesvghmrhgvhiholhgtuhdrtghomheqnecuggftrfgrth htvghrnhepledvvdefgedujeetudejfffgieekffevffeikeetffduudeifeefgeekleeh geeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmh grihhlsegvmhhrvgihohhltghurdgtohhm X-ME-Proxy: Feedback-ID: i1b09467c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 May 2024 13:05:01 -0400 (EDT) Content-Type: text/plain; charset=us-ascii; delsp=yes; format=flowed Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: Re: bug#71085: text-scale-adjust does not adjust margin width From: Emre Yolcu In-Reply-To: <86seya6ok2.fsf@gnu.org> Date: Wed, 22 May 2024 13:05:00 -0400 Content-Transfer-Encoding: 7bit Message-Id: <26081000-9E22-4D36-B78F-EA15C2A82553@emreyolcu.com> References: <86r0dv8kes.fsf@gnu.org> <86ed9v81xa.fsf@gnu.org> <8E15D0B1-7CC7-4202-9D13-BC4AF8319BF1@emreyolcu.com> <86seya6ok2.fsf@gnu.org> To: Eli Zaretskii X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 71085 Cc: 71085@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > [...] have an absolute size spec. This is what I have been trying to mean by "remap back" but now I see how that can be confusing.