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#52447: 29.0.50; New mode-line breaks calculations for last element in my mode-line Date: Sun, 12 Dec 2021 11:03:18 +0200 Message-ID: <83bl1mp549.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31729"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52447@debbugs.gnu.org To: Pedro Andres Aranda Gutierrez Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 12 10:04:19 2021 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 1mwKmI-000858-MX for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 10:04:18 +0100 Original-Received: from localhost ([::1]:59016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwKmH-0003Wo-JN for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 04:04:17 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:51258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwKm7-0003VA-Qm for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 04:04:08 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39110) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwKm2-0004Jz-9V for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 04:04:07 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwKm2-0005Tb-6A for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 04:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Dec 2021 09:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52447 X-GNU-PR-Package: emacs Original-Received: via spool by 52447-submit@debbugs.gnu.org id=B52447.163929981421016 (code B ref 52447); Sun, 12 Dec 2021 09:04:02 +0000 Original-Received: (at 52447) by debbugs.gnu.org; 12 Dec 2021 09:03:34 +0000 Original-Received: from localhost ([127.0.0.1]:50656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwKla-0005Su-IS for submit@debbugs.gnu.org; Sun, 12 Dec 2021 04:03:34 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwKlZ-0005Sh-AQ for 52447@debbugs.gnu.org; Sun, 12 Dec 2021 04:03:33 -0500 Original-Received: from [2001:470:142:3::e] (port=54428 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwKlU-0004I0-48; Sun, 12 Dec 2021 04:03:28 -0500 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=qHdRajL0GP/VGmTVg5mOK5NK/M/h6CTXfbqCwNOJJ5s=; b=MUfgzDJMzual XnxMY9v2vsaqat5K+d8TAh0uTjhzWNvnZqKg1kaQcaY6Hd8aX/E9rTfwVORehr0h8sXMpjT+MC+H0 VaI3TFMVQfb2wC8cmoV27N+khN8D7XddX63sB3Qm61EIs0uFsnd6UT56kt2wj5Vy3Px5P4z06HM4m JHalpQvd1cR4o7OkJmEvM/cBD+jeIy/BqBKRqNmMGrXt+24qN7IgOIkPOZYOD1Bpdg+B6u4owbbGQ ogqLI/l0BDJNkSSQ/mUTgasUOu49Olz8qzpE9Q1O2j9M1bL+cwybklYhJvZLXWec/P2YajUCW2QG9 wjmIifPgC6uyLVLY5wLIxQ==; Original-Received: from [87.69.77.57] (port=2966 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 1mwKlT-0006k2-MT; Sun, 12 Dec 2021 04:03:28 -0500 In-Reply-To: (message from Pedro Andres Aranda Gutierrez on Sun, 12 Dec 2021 08:17:28 +0100) 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:222195 Archived-At: > From: Pedro Andres Aranda Gutierrez > Date: Sun, 12 Dec 2021 08:17:28 +0100 > > I'm using the attached code for my mode-line. It's inspired by the doom mode-line. My last element is > right-aligned and shows GIT information when relevant. On emacs < 29, the calculation for the free space > avoids overlapping with the fringe: > emacs28-modeline.png > > On emacs29, with fixed font using the fix from etc/NEWS, the fringe overlaps with the vc information. > emacs29-broken-modeline.png Your code says: (defun fill-spaces (len) `((space :align-to (- (+ right right-fringe right-margin) ,len)))) This tells Emacs to right-align the string to the place _after_ the margin and the fringe. If I remove the addition of right-fringe and right-margin from the :align-to expression, the effect is like you want. So it sounds like Emacs 28 and before had some bug in this area which was fixed in Emacs 29, and your code needs to adapt by removing the "fix" you had in previous Emacs versions. > Not to speak variable pitch, where I only see the first 1.5 letters or so (depending on the branch I'm in) For variable-pitch font, you need to calculate this in pixels, not in columns.