GNU bug report logs - #71835
30.0.60; Using mode-line-format-right-align in header line results in cutoff text

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: noa <noa@HIDDEN>; dated Sat, 29 Jun 2024 05:24:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Severity set to 'wishlist' from 'normal' Request was from Eli Zaretskii <eliz@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 71835 <at> debbugs.gnu.org:


Received: (at 71835) by debbugs.gnu.org; 29 Jun 2024 08:25:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 29 04:25:04 2024
Received: from localhost ([127.0.0.1]:36960 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sNTOK-0002ks-0E
	for submit <at> debbugs.gnu.org; Sat, 29 Jun 2024 04:25:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49682)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>)
 id 1sNTOH-0002kF-Lj; Sat, 29 Jun 2024 04:25:02 -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 1sNTOB-0006Rd-S1; Sat, 29 Jun 2024 04:24:55 -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=J2X/1EvI5PUAv1LLhmcOvZGvqv6kNupRLCi4aXPQjmg=; b=sIvVO7vv4I6B
 rLWu99Ao+5E7DqhxLrE1X129w3wphoPIGtb/3xoMkFZdajA4FLExWZ7VQmO9Ho0zi6UaR4pVdpVo3
 dNpvVvCdidLJCgOdENa7/N4ZFYLtIcCs2kIF1bQ2FMpLCmFcx6UzV10sBVjfH+DZKjtDMOBSZp83u
 Hj8yXQIWNILuP+DfJRhRIVkBQvG4kUwbRu5T6kcZEOKlBCYlXGSvabEbtDlFXx0/fhaD2VS1VRSSq
 8sUyi6eQ0p9QPQ3oARvrVKwdif0IzMxtb/Wmg0aYysIKzZ9chTfBIzWssiAhbFH44o2kYaLRgPGHa
 WmrCkTpFKoaG8YQFUu9M2g==;
Date: Sat, 29 Jun 2024 11:24:51 +0300
Message-Id: <86h6dcjgvg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: noa <noa@HIDDEN>
In-Reply-To: <87cyo0cxnr.fsf@HIDDEN> (message from noa on Sat, 29 Jun 2024
 03:04:08 +0100)
Subject: Re: bug#71835: 30.0.60;
 Using mode-line-format-right-align in header line results in cutoff
 text
References: <87cyo0cxnr.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 71835
Cc: 71835 <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 (---)

severity 71835 wishlist
thanks

> From: noa <noa@HIDDEN>
> Date: Sat, 29 Jun 2024 03:04:08 +0100
> 
> 
> I would expect the header-line-format and mode-line-format to behave the same way when using the mode-line-format-right-align construct.  But instead, the behaviour is a little strange and appears to rely on the value of mode-line-format:

Yes, that's how this feature was implemented (and documented).

Given the trouble this feature has already caused, I'm not really
interested in having it affect more features in Emacs, so I'd prefer
in leaving things as they are.  But if someone wants to work on this
enhancement, and submits clean code to support it, we will definitely
review and consider the changes for inclusion.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#71835; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Jun 2024 05:23:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jun 29 01:23:24 2024
Received: from localhost ([127.0.0.1]:36710 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sNQYT-0003L6-7s
	for submit <at> debbugs.gnu.org; Sat, 29 Jun 2024 01:23:24 -0400
Received: from lists.gnu.org ([209.51.188.17]:52182)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <noa@HIDDEN>) id 1sNNZM-0006Ie-JC
 for submit <at> debbugs.gnu.org; Fri, 28 Jun 2024 22:12:05 -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 <noa@HIDDEN>) id 1sNNXF-0003ib-Lz
 for bug-gnu-emacs@HIDDEN; Fri, 28 Jun 2024 22:09:53 -0400
Received: from mail-108-mta140.mxroute.com ([136.175.108.140])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <noa@HIDDEN>) id 1sNNXC-0007R0-Fl
 for bug-gnu-emacs@HIDDEN; Fri, 28 Jun 2024 22:09:53 -0400
Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com)
 (Authenticated sender: mN4UYu2MZsgR)
 by mail-108-mta140.mxroute.com (ZoneMTA) with ESMTPSA id
 19061bcc18a00017a3.001 for <bug-gnu-emacs@HIDDEN>
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Sat, 29 Jun 2024 02:04:38 +0000
X-Zone-Loop: 343c6a17c28dd82bac860931f4e70f9f4ce156a8620a
X-Originating-IP: [136.175.111.3]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=noa.pub;
 s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID:Date:
 Subject:To:From:Sender:Reply-To:Cc:Content-ID:Content-Description:Resent-Date
 :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:
 References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:
 List-Owner:List-Archive; bh=uoLc6ZNEREIFzwgWyWHh7YHnOQo1Kpv5ln7/OwZCwr0=; b=A
 vRp4hqfVUAsMkH0qAOHgpBjD+rHdfG8/p9xDSAbRFFgNC2IyFtqxICB54E0lp2NACFosgIT4G1AGU
 UcEJ8chf1Mun6xgSrpo598DqDzyzJ9yNs7ynU8XcYI08I1aulHPgr4WQ3JkTexWAku8mWWoV/rNt3
 kkDfwwUAsSCg9bxRc7FAojGLdqC4lZg1gkcJbl2Gso8aAGCdE1BCWq41tvRWBS+k7xoF0mOv7Oe5j
 Qo+d9Rk1O1fXo8fbsPY/G680GLazPCox43urIYhoFXqnVII5vtr23Kj2E3/vU5ITCxD8QnM5lMfrQ
 FSDo0XpPibhcxQ1ab/Xq3beFcLMAw5Bow==;
From: noa <noa@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 30.0.60; Using mode-line-format-right-align in header line results
 in cutoff text
X-Debbugs-Cc: 
Date: Sat, 29 Jun 2024 03:04:08 +0100
Message-ID: <87cyo0cxnr.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Authenticated-Id: noa@HIDDEN
Received-SPF: pass client-ip=136.175.108.140; envelope-from=noa@HIDDEN;
 helo=mail-108-mta140.mxroute.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sat, 29 Jun 2024 01:23:19 -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.4 (--)


I would expect the header-line-format and mode-line-format to behave the sa=
me way when using the mode-line-format-right-align construct.  But instead,=
 the behaviour is a little strange and appears to rely on the value of mode=
-line-format:

;; This will result in the right-aligned text being cut off.
(setq-default header-line-format '("foo" mode-line-format-right-align "bar"=
))

;; This will make both header and mode line align as expected.
(setq-default header-line-format '("foo" mode-line-format-right-align "bar"=
))
(setq-default mode-line-format '("foo" mode-line-format-right-align "bar"))

;; This will result in the right-aligned text being cut off.
(setq-default header-line-format '("foo" mode-line-format-right-align "bar"=
))
(setq-default mode-line-format nil)

;; This will result in the mode-line-format-right-align construct being ign=
ored:
(setq-default header-line-format '("foo" mode-line-format-right-align "bar"=
))
(setq-default mode-line-format "baz")

;; This will result in the mode-line-format-right-align construct being ign=
ored:
(setq-default header-line-format '("foo" mode-line-format-right-align "bar"=
))
(setq-default mode-line-format 'mode-line-modes)

So if the header line is set to use this construct, it only works correctly=
 if the mode line is also using the construct.  The right aligned text in t=
he header line will also be indented from the right to be in line with what=
ever is at the right of the mode line.

If the mode line is set to nil or a list which does not contain the constru=
ct, the right aligned portion of the header line will be cut off.

If the mode line is set to a string or a symbol, the right aligned portion =
of the header line is on the left hand side as if the construct were not th=
ere at all.


In GNU Emacs 30.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.38, cairo version 1.16.0) of 2024-06-29 built on baby
Repository revision: df0eb5be1eac7763236a99ffeb6e2b3561955bd9
Repository branch: emacs-30
Windowing system distributor 'The X.Org Foundation', version 11.0.12201009
System Description: Debian GNU/Linux 12 (bookworm)

Configured using:
 'configure --with-x-toolkit=3Dgtk3 --with-imagemagick
 --with-tree-sitter --with-xwidgets --with-native-compilation=3Daot
 --with-mailutils'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ
IMAGEMAGICK JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT
MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM
XINPUT2 XPM XWIDGETS GTK3 ZLIB

Important settings:
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=3Dfcitx
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  age-encryption-mode: t
  isearch-mb-mode: t
  global-aggressive-indent-mode: t
  aggressive-indent-mode: t
  elastic-table-mode: t
  elastic-indent-mode: t
  global-auto-revert-mode: t
  global-so-long-mode: t
  save-place-mode: t
  pixel-scroll-precision-mode: t
  recentf-mode: t
  display-time-mode: t
  display-battery-mode: t
  savehist-mode: t
  marginalia-mode: t
  global-jinx-mode: t
  jinx-mode: t
  jabber-activity-mode: t
  global-goto-address-mode: t
  goto-address-mode: t
  override-global-mode: t
  vertico-mouse-mode: t
  vertico-mode: t
  minibuffer-depth-indicate-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  tab-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  window-divider-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  auto-save-visited-mode: t
  auto-save-mode: t

Load-path shadows:
/home/noa/.config/emacs/site-lisp/anzu hides /home/noa/.config/emacs/elpa/a=
nzu-20240202.447/anzu
/home/noa/.config/emacs/site-lisp/orderless hides /home/noa/.config/emacs/e=
lpa/orderless-20240606.1026/orderless
/home/noa/.config/emacs/site-lisp/dash hides /home/noa/.config/emacs/elpa/d=
ash-20240510.1327/dash
/home/noa/.config/emacs/elpa/transient-20240623.1341/transient hides /usr/l=
ocal/share/emacs/30.0.60/lisp/transient

Features:
(pulse shadow sort visual-fill-column mail-extr emacsbug message
yank-media rfc822 mml mml-sec epa derived epg epg-config gnus-util
text-property-search mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail vertico-directory mule-util
help-fns radix-tree tramp-cmds cursor-sensor rmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils auth-source-passage age
rfc6068 cookie1 isearch-mb aggressive-indent elastic-table
elastic-indent elastic-tools pcase dash autorevert filenotify so-long
help-at-pt saveplace tramp-sh tramp trampver tramp-integration files-x
tramp-message tramp-compat shell parse-time iso8601 tramp-loaddefs
pixel-scroll cua-base recentf tree-widget time battery dbus savehist
dired dired-loaddefs marginalia jinx org-agenda org-element
org-persist xdg org-id org-element-ast inline avl-tree generator
org-refile org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src sh-script smie treesit executable ob-comint org-pcomplete
pcomplete comint ansi-osc ansi-color ring org-list org-footnote
org-faces org-entities noutline outline org-version ob-emacs-lisp
ob-core ob-eval org-cycle org-table org-keys oc org-loaddefs find-func
cal-menu calendar cal-loaddefs ol rx org-fold org-fold-core org-compat
org-macs jabber jabber-time jabber-autoaway time-date
jabber-vcard-avatars jabber-chatstates jabber-events jabber-vcard
jabber-avatar jabber-activity jabber-watch jabber-modeline
jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion
jabber-muc-nick-completion jabber-muc jabber-bookmarks
jabber-muc-nick-coloring color jabber-browse jabber-search
jabber-register jabber-widget jabber-chat jabber-history
jabber-chatbuffer jabber-roster format-spec jabber-carbons
jabber-presence jabber-private jabber-logon jabber-conn srv dns
starttls gnutls puny jabber-core jabber-keepalive jabber-ping
jabber-disco jabber-iq jabber-console sgml-mode facemenu dom
jabber-truncate ewoc jabber-alert jabber-keymap jabber-sasl sasl
sasl-anonymous sasl-login sasl-plain jabber-menu jabber-util fsm
jabber-xml xml goto-addr thingatpt delsel fixed-pitch cl-extra
help-mode use-package-core tubthumping-theme edmacro kmacro bind-key
easy-mmode vertico-mouse vertico compat mb-depth
aggressive-indent-autoloads anzu-autoloads consult-autoloads
dired-du-autoloads isearch-mb-autoloads jabber-autoloads fsm-autoloads
jinx-autoloads marginalia-autoloads markdown-mode-autoloads
nov-autoloads esxml-autoloads kv-autoloads orderless-autoloads
org-modern-autoloads pass-autoloads f-autoloads
password-store-otp-autoloads password-store-autoloads
persist-autoloads s-autoloads srv-autoloads
taxy-magit-section-autoloads taxy-autoloads magit-section-autoloads
dash-autoloads transient-autoloads valign-autoloads vertico-autoloads
visual-fill-column-autoloads info with-editor-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars cus-edit pp cus-load icons wid-edit cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd touch-screen tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode
lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch
easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple
cl-generic indonesian philippine cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads
xwidget-internal dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x
multi-tty move-toolbar make-network-process native-compile emacs)

Memory information:
((conses 16 385689 306172) (symbols 48 24817 5)
 (strings 32 91428 30898) (string-bytes 1 4096818) (vectors 16 46910)
 (vector-slots 8 1292544 256651) (floats 8 352 224)
 (intervals 56 3206 628) (buffers 992 14))

--=20
~noa (https://noa.pub)
 =E2=80=A2 I try to reply to formal emails in three sentences or fewer; exc=
use my brevity.
 =E2=80=A2 I queue replies and batch send them at intervals; excuse my unti=
meliness.




Acknowledgement sent to noa <noa@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#71835; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 29 Jun 2024 08:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.