Eli Zaretskii <eliz@HIDDEN>
to control <at> debbugs.gnu.org
.
Full text available.Received: (at 71085) by debbugs.gnu.org; 21 May 2024 11:38:39 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 21 07:38:39 2024 Received: from localhost ([127.0.0.1]:48694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1s9NpH-0001y3-3R for submit <at> 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 <eliz@HIDDEN>) 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 <eliz@HIDDEN>) 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@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Emre Yolcu <mail@HIDDEN> In-Reply-To: <C7031EF2-EBCF-42B6-A79E-B1EA6B4F37FD@HIDDEN> (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: <C7031EF2-EBCF-42B6-A79E-B1EA6B4F37FD@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 71085 Cc: 71085 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) tags 71085 notabug thanks > From: Emre Yolcu <mail@HIDDEN> > 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.
bug-gnu-emacs@HIDDEN
:bug#71085
; Package emacs
.
Full text available.Received: (at submit) by debbugs.gnu.org; 21 May 2024 00:03:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 20 20:03:49 2024 Received: from localhost ([127.0.0.1]:45720 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1s9Cyq-0004Ex-OS for submit <at> 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 <mail@HIDDEN>) id 1s9Bq4-00035Q-6O for submit <at> 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 <mail@HIDDEN>) id 1s9Bpz-00021E-2M for bug-gnu-emacs@HIDDEN; 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 <mail@HIDDEN>) id 1s9Bpw-0002T2-Bl for bug-gnu-emacs@HIDDEN; 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 <bug-gnu-emacs@HIDDEN>; 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: <xms:tdNLZjDVUgpVT2njxNHO9rXV-BTWoKS_3cx6DqY5Xg3CUTXbajyPRw> <xme:tdNLZpgBBEGpywQvCzakahPBQwRdDjk4Qya5ZnUNtqaN1zmserJ1z-WzdxDAl7QS_ _AgaPSpSOdriUGPmjM> X-ME-Received: <xmr:tdNLZumVo4cPFW_9QdY6gcufsQhtm5rNZJT4pONhsowe0TTY23yF4T31cE1hjKxyJMmWH1dJpZmj4AjAdIkXEbi_lrDTO86GcORqVdygNjD9U_I> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeiuddgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhtgfgggfukfffvffosehtjehmtd hhtddvnecuhfhrohhmpefgmhhrvgcujgholhgtuhcuoehmrghilhesvghmrhgvhiholhgt uhdrtghomheqnecuggftrfgrthhtvghrnhepueeuveejfeetjeevvdehheetkeefvdefff fgvdffgfetffffieethfffuedtgeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepmhgrihhlsegvmhhrvgihohhltghurdgtohhm X-ME-Proxy: <xmx:tdNLZlyWBT9LEOiibwcau5k75QMHu1jtVBPYZRYUsKm6kyuN3Eq1fg> <xmx:tdNLZoRxi3uwesTQna4zZZzojGxjgO3Xmokcv_6-TQE-l4zKvzeW9Q> <xmx:tdNLZoaJ8oAk34VZVhySW1DeQNPDmy8N2Y5WseMVzUegFYpshTUphg> <xmx:tdNLZpSD-DxKUQVyx3yTT4eIBDdTwuE3SyOYnHKm2eq8ZNmuhQVIew> <xmx:tdNLZjKRvpIg38jFilWIjaQwz63UPh1fEUPOvBWsLzZwJ6FTdKnC3moV> Feedback-ID: i1b09467c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <bug-gnu-emacs@HIDDEN>; Mon, 20 May 2024 18:50:29 -0400 (EDT) From: Emre Yolcu <mail@HIDDEN> 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: <C7031EF2-EBCF-42B6-A79E-B1EA6B4F37FD@HIDDEN> Date: Mon, 20 May 2024 18:50:28 -0400 To: bug-gnu-emacs@HIDDEN X-Mailer: Apple Mail (2.3608.120.23.2.7) Received-SPF: pass client-ip=103.168.172.157; envelope-from=mail@HIDDEN; 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 <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> 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.
Emre Yolcu <mail@HIDDEN>
:bug-gnu-emacs@HIDDEN
.
Full text available.bug-gnu-emacs@HIDDEN
:bug#71085
; Package emacs
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.