From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 16:27:07 2023 Received: (at submit) by debbugs.gnu.org; 2 Feb 2023 21:27:08 +0000 Received: from localhost ([127.0.0.1]:36020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNh6p-0003lh-0M for submit@debbugs.gnu.org; Thu, 02 Feb 2023 16:27:07 -0500 Received: from lists.gnu.org ([209.51.188.17]:54922) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNh6m-0003lX-Uy for submit@debbugs.gnu.org; Thu, 02 Feb 2023 16:27:05 -0500 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 1pNh6m-0002TQ-LQ for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 16:27:04 -0500 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pNh6j-0007Oh-V2 for bug-gnu-emacs@gnu.org; Thu, 02 Feb 2023 16:27:04 -0500 Received: by mail-ed1-x52a.google.com with SMTP id v10so3395690edi.8 for ; Thu, 02 Feb 2023 13:27:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=0X0Hn5F2ggHwo0rGgaOpsw23Yc84xHKGtikfbqTSX9o=; b=MO7MCjcrGbATzhSTJKpG6XVOX8ynhK36GtAZTUqRgSm7SIKB2eEntSjwxCycY3DtjJ zZ1qgVGyMwGagdMVXeAi6Ig6oLGABC5O2x3wKVWiU46DmGpP2Cl4RGjlXniDogbmH24l Zz3bSqX+FX9USH+U+/xF3QyqOygKiNpCosXbPVOoWjIzwoKiPYa6pzWkm97ulVdp1mfF 9B6hB/NVC7BqQK28hn7Fzzqstp0V6OczSf+x7BFBMwnjX7UW2SPGRYEKz0ZYDyH01Y9k ai6fPcrQflVKdYXCDG1EUoXiOLuxxs5DIV/Tqkitgwme870+eJaa956aiZWcH/C6ql5A terw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=0X0Hn5F2ggHwo0rGgaOpsw23Yc84xHKGtikfbqTSX9o=; b=qj+J3Wo7GSYI0UecqwqEn+88J0VoseCn7CAVofwnxyq/YevvBseM7N3yOPTEDB+htA S45i1bJfrhY8LnkZm6m5undn0QMgT1W/hHDgt9atwwLxmzA6Q7q79VS5nO18le7PoCM4 EXIi12N21/1osDJTjnX24X5QImhjpVOLIP93cgI5gu471Ap7bpYIwEKXn4iqJCnOSHem Blz8ddfgNudxJGVXuqsKBQZk03EBWTdieHpPAFoj7XUbNIUlPTB16ffb+MlmGmx3PJRE 98ZA1gTrKgJHdJ4ll675s0U4pKe39FQAzcANW8HLquMJatBtnChKJa3XJcTHCulac9zw T1dQ== X-Gm-Message-State: AO0yUKXcDoZ1mQ5q3J2sga1HYqzMIeaxMiyLg/ycmvnmpVbMIWf31r/P FalZD4Be4/pBUhO34RaQwJHOL2zf+w== X-Google-Smtp-Source: AK7set+y5VVMHaXkJNkix3CjweLM2UDMjlCfHVu4kNsXnpOAA4isQA7dZjzEoc4r17YKL6c3KugZOw== X-Received: by 2002:a05:6402:74c:b0:4a2:590b:668a with SMTP id p12-20020a056402074c00b004a2590b668amr8085444edy.3.1675373219403; Thu, 02 Feb 2023 13:26:59 -0800 (PST) Received: from derhulk ([2a02:8109:b63f:c344::13f5]) by smtp.gmail.com with ESMTPSA id p15-20020a05640210cf00b00499e5659988sm228839edu.68.2023.02.02.13.26.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 13:26:58 -0800 (PST) From: Narendra Joshi To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Display property value `((space :align-to))` doesn't handle line numbers Date: Thu, 02 Feb 2023 22:26:57 +0100 Message-ID: <87357npxlq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=narendraj9@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit 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.1 (--) The following code demonstrates the behavior: (display-line-numbers-mode +1) (setq header-line-format (concat (propertize " " 'display '((space :align-to 0))) "Column")) With line numbers displayed, the text above, i.e. "Column" doesn't align wit the text in the buffer. This is problematic for modes like SES mode (https://www.gnu.org/software/emacs/manual/html_node/ses/index.html). In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-21 built on derhulk Repository revision: ca8f5f71f412f29d52da0bdb8ac196d298b3b0d3 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 37 (Workstation Edition) Configured using: 'configure --prefix /home/narendraj9/.local/ --with-native-compilation --with-imagemagick --with-json' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=ibus locale-coding-system: utf-8 Major mode: Lisp Interaction Minor modes in effect: display-fill-column-indicator-mode: t windmove-mode: t display-line-numbers-mode: t gradle-mode: t dired-recent-mode: t global-git-commit-mode: t recentf-mode: t pomodoro-mode: t yas-global-mode: t yas-minor-mode: t aggressive-indent-mode: t paredit-mode: t outline-minor-mode: t flyspell-mode: t crux-reopen-as-root-mode: t shell-dirtrack-mode: t wrap-region-global-mode: t wrap-region-mode: t volatile-highlights-mode: t company-statistics-mode: t global-company-mode: t company-mode: t server-mode: t global-auto-revert-mode: t sub-paredit-mode: t vertico-mode: t minibuffer-depth-indicate-mode: t delete-selection-mode: t global-subword-mode: t subword-mode: t winner-mode: t save-place-mode: t which-key-mode: t savehist-mode: t electric-pair-mode: t display-battery-mode: t display-time-mode: t midnight-mode: t repeat-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tab-bar-history-mode: t file-name-shadow-mode: t context-menu-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t auto-fill-function: yas--auto-fill transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t abbrev-mode: t hs-minor-mode: t Features: (shadow sort footnote gnus-config messages-are-flowing smtpmail gnus-delay gnus-draft gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-cache nndraft nnmh gnus-async nntp gnus-msg bbdb-gnus bbdb-mua bbdb-com bbdb bbdb-site timezone emacsbug hippie-exp display-fill-column-indicator cursor-sensor ses unsafep emacs-news-mode completion windmove finder skeleton autoinsert expand-region subword-mode-expansions text-mode-expansions cc-mode-expansions the-org-mode-expansions python-el-fgallina-expansions er-basic-expansions expand-region-core expand-region-custom symbol-overlay display-line-numbers consult-imenu mule-util mm-archive lisp-mnt whitespace gradle-mode cl-print misearch multi-isearch inferior-jshell shortdoc network-stream url-http url-gw url-cache url-auth quoted-scratch mylife-relationships wid-browse goto-addr org-indent org-element org-persist avl-tree oc-basic ol-eww ol-rmail ol-mhe ol-irc ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime gnutls dig gnus-sum gnus-group gnus-undo gnus-start gnus-dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo gnus-spec gnus-int gnus-range gnus-win ol-docview doc-view image-mode exif ol-bibtex bibtex ol-bbdb ol-w3m ol-doi org-link-doi mail-extr jka-compr markdown-mode vc bug-reference macrostep-c cmacexp macrostep eglot array jsonrpc ert ewoc debug backtrace flymake-proc flymake pulse color dired-aux hl-line dired-x dired-recent dired-collapse dired-hacks-utils discover makey face-remap magit-bookmark magit-submodule magit-obsolete magit-blame magit-stash magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote magit-commit magit-sequence magit-notes magit-worktree magit-tag magit-merge magit-branch magit-reset magit-files magit-refs magit-status magit magit-repos magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode diff git-commit log-edit message sendmail yank-media rfc822 mml mml-sec epa derived epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader pcvs-util add-log magit-core magit-autorevert magit-margin magit-transient magit-process with-editor magit-mode magit-git magit-base magit-section crm vertico-repeat consult-register consult-vertico consult recentf tree-widget erc-config erc-log erc-services erc-track erc-match erc-join erc erc-backend erc-goodies erc-networks erc-common erc-compat erc-loaddefs bookmark ledger-mode ledger-check ledger-texi ledger-test ledger-sort ledger-report ledger-reconcile ledger-occur ledger-fonts ledger-fontify ledger-state ledger-complete ledger-schedule ledger-init ledger-xact ledger-post ledger-exec ledger-navigate eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util ledger-context ledger-commodities ledger-regex pomodoro org-timer org-config org-attach org-id org-clock org-habit ob-ditaa ob-haskell ob-go ob-elixir ob-awk ob-shell ob-C ob-clojure ob-gnuplot ob-ruby ob-R ob-python python ob-lisp ob-sqlite ob-sql ob-plantuml picture org-agenda org-refile org-web-tools esxml-query alert log4e notifications gntp ag vc-svn find-dired dired dired-loaddefs org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro org-src ob-comint org-pcomplete org-list org-footnote org-faces org-entities ob-emacs-lisp ob-core ob-eval org-cycle org-table ol org-fold org-fold-core org-keys oc org-loaddefs find-func org-version org-compat org-macs yasnippet-snippets yasnippet aggressive-indent paredit hideshow noutline outline flyspell ispell crux tramp tramp-loaddefs trampver tramp-integration cus-edit pp cus-start cus-load files-x tramp-compat shell pcomplete parse-time iso8601 ls-lisp wrap-region advice volatile-highlights company-oddmuse company-keywords company-etags company-gtags company-dabbrev-code company-dabbrev company-files company-clang company-capf company-cmake company-semantic company-template company-bbdb company-statistics company minibuffer-command-history init keycast memory-report nsm chart server git-timemachine transient vc-git vc-dispatcher autorevert filenotify diff-mode go-guru go-mode find-file typescript-mode cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs scribble-mode geiser-racket geiser-mit geiser-repl geiser-capf geiser geiser-image geiser-doc geiser-menu geiser-autodoc geiser-edit etags fileloop generator xref project-x project geiser-completion geiser-eval geiser-connection tq geiser-syntax scheme geiser-log geiser-popup view geiser-impl help-fns radix-tree geiser-custom geiser-base plisp-mode picolisp-mode inferior-plisp inferior-picolisp pos-tip info-lookmore info-look javadoc-lookup ido vertico orderless mb-depth delsel timeclock sh-script smie treesit executable cap-words superword subword gud winner saveplace which-key savehist apropos region-bindings-mode disp-table wgrep grep compile comint ansi-osc ansi-color ring elec-pair use-package-diminish eww xdg url-queue shr pixel-fill kinsoku url-file svg dom puny mm-url gnus nnheader gnus-util text-property-search time-date mail-utils range wid-edit mm-util mail-prsvr ffap thingatpt ibuf-ext ibuffer ibuffer-loaddefs format-spec battery dbus xml time mode-line-config jazz-theme cal-julian appearance pcase modus-themes solar cal-dst cal-menu calendar cal-loaddefs midnight secrets no-littering compat defs repeat edmacro kmacro use-package-bind-key f f-shortdoc dash s comp comp-cstr warnings icons bind-key cl-extra help-mode diminish use-package-ensure use-package-core magit-autoloads git-commit-autoloads consult-autoloads alchemist-autoloads elixir-mode-autoloads tree-sitter-autoloads tsc-autoloads auctex-autoloads tex-site ht-autoloads ace-link-autoloads aggressive-indent-autoloads async-autoloads auto-compile-autoloads beacon-autoloads bicycle-autoloads boxquote-autoloads cargo-autoloads markdown-mode-autoloads cdlatex-autoloads multiple-cursors-autoloads paredit-autoloads color-identifiers-mode-autoloads counsel-bbdb-autoloads crdt-autoloads crux-autoloads diminish-autoloads dired-collapse-autoloads dired-narrow-autoloads dired-subtree-autoloads dired-hacks-utils-autoloads ednc-autoloads eglot-java-autoloads eglot-autoloads eldoc-box-autoloads elm-mode-autoloads embark-autoloads emmet-mode-autoloads erlang-autoloads ess-autoloads evil-autoloads expand-region-autoloads flycheck-yamllint-autoloads git-timemachine-autoloads go-guru-autoloads go-mode-autoloads google-translate-autoloads popup-autoloads graphviz-dot-mode-autoloads haskell-mode-autoloads keycast-autoloads know-your-http-well-autoloads ledger-mode-autoloads lua-mode-autoloads modus-themes-autoloads moody-autoloads nix-mode-autoloads no-littering-autoloads orderless-autoloads org-gcal-autoloads alert-autoloads aio-autoloads elnode-autoloads web-autoloads creole-autoloads fakir-autoloads noflet-autoloads db-autoloads ox-reveal-autoloads pcache-autoloads persist-autoloads plisp-mode-autoloads proof-general-autoloads proof-site proof-autoloads py-autopep8-autoloads python-mode-autoloads racket-mode-autoloads realgud-autoloads realgud-recursive-autoloads restclient-autoloads robe-autoloads rust-mode-autoloads rvm-autoloads scala-mode-autoloads slime-autoloads macrostep-autoloads symbol-overlay-autoloads tiny-autoloads tracking-autoloads ace-window-autoloads avy-autoloads tuareg-autoloads rx caml-autoloads typescript-mode-autoloads vertico-autoloads web-mode-autoloads which-key-autoloads yaml-mode-autoloads rinari-autoloads jump-autoloads geiser-mit-autoloads geiser-racket-autoloads geiser-autoloads bbdb-autoloads csv-mode-autoloads yaml-autoloads ialign-autoloads pos-tip-autoloads reformatter-autoloads ement-autoloads transient-autoloads taxy-magit-section-autoloads magit-section-autoloads taxy-autoloads plz-autoloads svg-lib-autoloads quelpa-use-package-autoloads use-package-autoloads bind-key-autoloads quelpa-autoloads easy-mmode company-autoloads pdf-tools-autoloads request-autoloads finder-inf password-store-autoloads with-editor-autoloads compat-autoloads f-autoloads dash-functional-autoloads inf-ruby-autoloads js2-mode-autoloads cider-autoloads clojure-mode-autoloads flycheck-autoloads s-autoloads info dash-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 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 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1303151 246368) (symbols 48 81870 9) (strings 32 385694 22266) (string-bytes 1 12033194) (vectors 16 129508) (vector-slots 8 3417594 248291) (floats 8 3398 1186) (intervals 56 15860 8336) (buffers 976 48)) Best regards, -- Narendra Joshi From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 03:54:39 2023 Received: (at 61239) by debbugs.gnu.org; 3 Feb 2023 08:54:39 +0000 Received: from localhost ([127.0.0.1]:36474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNrqB-0008Bz-8Q for submit@debbugs.gnu.org; Fri, 03 Feb 2023 03:54:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNrq9-0008Bj-Er; Fri, 03 Feb 2023 03:54:38 -0500 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 1pNrq4-0002dZ-70; Fri, 03 Feb 2023 03:54:32 -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=gtaZT7tcIqt2yeLt0yBrUMXqS2f76TB1kuRQcHFQHDI=; b=WE0kWtWodPIT 6gUbEwcijH5pnmbdoQt/THpHCnP32KTPGrLu6LjMlzHcIKNeXxnKFG66DJAHKesOznChWufOvHFsq fFvuL1vVzzeOHCPLffqtN1CMm5AbesrGSkAihJ7PA/9pr9mJx0QDnekefscRy8d5iORFUvMUEN2eM 2U+gklyrkxrGp9ziKiU8W9VX/EaRC32nqcK/pQo1w6osrh064O1UiOMgbqgWn4zwyKrf/VlizeYh+ t2wvUKtBOJrNcCZKYcBTCbpMn6jRaNKu8Ikf6xnLHwaobYgOz/3/khENX3wYRoESj0LzsKUG5oY+6 YcAcaEq7c72/GbKkhpDB3g==; Received: from [87.69.77.57] (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 1pNrq3-0000F6-NC; Fri, 03 Feb 2023 03:54:32 -0500 Date: Fri, 03 Feb 2023 10:54:35 +0200 Message-Id: <83r0v7uo1g.fsf@gnu.org> From: Eli Zaretskii To: Narendra Joshi In-Reply-To: <87357npxlq.fsf@gmail.com> (message from Narendra Joshi on Thu, 02 Feb 2023 22:26:57 +0100) Subject: Re: bug#61239: 30.0.50; Display property value `((space :align-to))` doesn't handle line numbers References: <87357npxlq.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61239 Cc: 61239@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 61239 notabug wontfix thanks > From: Narendra Joshi > Date: Thu, 02 Feb 2023 22:26:57 +0100 > > > The following code demonstrates the behavior: > > (display-line-numbers-mode +1) > (setq header-line-format > (concat (propertize " " 'display '((space :align-to 0))) "Column")) > > With line numbers displayed, the text above, i.e. "Column" doesn't align > wit the text in the buffer. This is problematic for modes like SES mode > (https://www.gnu.org/software/emacs/manual/html_node/ses/index.html). The :align-to values in header-line and mode-line do not automatically account for line numbers when display-line-numbers-mode is turned on. This is because the display engine cannot possibly know whether the application does or doesn't want this; we certainly don't want that for mode-line, for example. For header lines, there's no guarantee that the text there must align with the buffer text: that is up to the application to decide. So if a Lisp program wants the header-line indentation to be updated according to the screen estate taken by line numbers, it should do the following: . turn on the minor mode header-line-indent-mode . include header-line-indent-width in the :align-to expression In your case, the following change in the :align-to should do what you want: (setq header-line-format (concat (propertize " " 'display '(space :align-to (+ header-line-indent-width 0))) "Column")) You can see further examples of using this in tabulated-list-mode.el. I see that the ELisp manual doesn't mention this minor mode, and moreover, has some text which might mislead you into thinking that the header-line display will automatically be updated to account for the line numbers; I will fix the manual soon. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 05:09:14 2023 Received: (at 61239) by debbugs.gnu.org; 3 Feb 2023 10:09:14 +0000 Received: from localhost ([127.0.0.1]:36551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNt0M-0006LH-9j for submit@debbugs.gnu.org; Fri, 03 Feb 2023 05:09:14 -0500 Received: from mail-ed1-f44.google.com ([209.85.208.44]:37657) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNt0K-0006L4-Fb for 61239@debbugs.gnu.org; Fri, 03 Feb 2023 05:09:13 -0500 Received: by mail-ed1-f44.google.com with SMTP id be12so4670905edb.4 for <61239@debbugs.gnu.org>; Fri, 03 Feb 2023 02:09:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TzGQM2kH0hCC5r6NFWXO0dTQQM94V9fMYS0GAa/pZ5M=; b=KPIDMNU1INF+0rzl6k6Us+aaxbaKiweDP45Dc4XEWCk7ACbf8+CQjMiNF+3yO6gBd7 XbHhqVkQtm8LPQO0C6gMuJWIwRDvDzDtMCAFszioiNvELOa5hEwUWWM/POOo7c17MlYT VS262mELvX4pqX/DPflsykFzwMrT+ukeY5gTATU3En1/qEWbEWivnUK1lsgUvwkXkQLj NsQ02QB+SrC0lJHHstK5TajcTlmWkRvQ+hFu7OZ4nw4TQrRyNZZqVdbOso6/Xo/ieMgC pGnFoPtU6MMafvfafoJxifaotN17JBSspI54Pi12xW3q17+dRi27mXrTdTAb2zeBTlSs JMGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TzGQM2kH0hCC5r6NFWXO0dTQQM94V9fMYS0GAa/pZ5M=; b=Ep4fvzuu421k50NaCMZtQSwaCIajEbXuJphHaSk+DXzbNHQ3ZiIOj6IunRcTC65W2N Mqaira/y9G5EdzWespclF3vgYjo3i4C6v7k9LrRz0AS35edN6xjdlGuAUxCW/t3hYZg2 rKBAweOAMGSejVI2+wCx7GgfcSeB1BF85nEX6IhRr9DQQ0uXdul1Y4idBRDjMllFjh+8 6XI5ou3rbXoktVGwDJDQXFB/2xZhQAgzYjHrio09dV04l0+H5zFG4tPAaVOu23Lo1jOE EPvg8DPqo3wW1++/1e2IxPf6Jdv1Qe5Ga9MXwArs3n2A8LZjiUsqq+WFWrw54kbI6+9K 7utw== X-Gm-Message-State: AO0yUKVCMeoFO9pItCctmViQpCusZhNybe9c8FO8gQ9bk9oPflbOkKjX hLMLpqpwDDFN15QSQRn+Yin0pkE/9DbqLQCBUm20Cp8= X-Google-Smtp-Source: AK7set9eqUF6FjcLvk5d12mCm+aPW516ZKny8vaiiLeqAncdCNYaORjamEA0dtEqVvLFYyHmVjtTPi15Izp0EJUmp24= X-Received: by 2002:a05:6402:207b:b0:4a2:7c06:a6eb with SMTP id bd27-20020a056402207b00b004a27c06a6ebmr2749702edb.79.1675418946338; Fri, 03 Feb 2023 02:09:06 -0800 (PST) MIME-Version: 1.0 References: <87357npxlq.fsf@gmail.com> <83r0v7uo1g.fsf@gnu.org> In-Reply-To: <83r0v7uo1g.fsf@gnu.org> From: Narendra Joshi Date: Fri, 3 Feb 2023 11:08:56 +0100 Message-ID: Subject: Re: bug#61239: 30.0.50; Display property value `((space :align-to))` doesn't handle line numbers To: Eli Zaretskii Content-Type: multipart/alternative; boundary="00000000000025816005f3c8df08" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 61239 Cc: 61239@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: -0.7 (/) --00000000000025816005f3c8df08 Content-Type: text/plain; charset="UTF-8" Thank a lot for the explanation :) Best, Narendra On Fri, Feb 3, 2023, 09:54 Eli Zaretskii wrote: > tags 61239 notabug wontfix > thanks > > > From: Narendra Joshi > > Date: Thu, 02 Feb 2023 22:26:57 +0100 > > > > > > The following code demonstrates the behavior: > > > > (display-line-numbers-mode +1) > > (setq header-line-format > > (concat (propertize " " 'display '((space :align-to 0))) "Column")) > > > > With line numbers displayed, the text above, i.e. "Column" doesn't align > > wit the text in the buffer. This is problematic for modes like SES mode > > (https://www.gnu.org/software/emacs/manual/html_node/ses/index.html). > > > The :align-to values in header-line and mode-line do not automatically > account for line numbers when display-line-numbers-mode is turned on. > This is because the display engine cannot possibly know whether the > application does or doesn't want this; we certainly don't want that > for mode-line, for example. For header lines, there's no guarantee > that the text there must align with the buffer text: that is up to the > application to decide. > > So if a Lisp program wants the header-line indentation to be updated > according to the screen estate taken by line numbers, it should do the > following: > > . turn on the minor mode header-line-indent-mode > . include header-line-indent-width in the :align-to expression > > In your case, the following change in the :align-to should do what you > want: > > (setq header-line-format > (concat (propertize " " > 'display > '(space :align-to > (+ header-line-indent-width 0))) > "Column")) > > You can see further examples of using this in tabulated-list-mode.el. > > I see that the ELisp manual doesn't mention this minor mode, and > moreover, has some text which might mislead you into thinking that the > header-line display will automatically be updated to account for the > line numbers; I will fix the manual soon. > --00000000000025816005f3c8df08 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank a lot for the explanation :)=C2=A0

Best,
Narendra

On = Fri, Feb 3, 2023, 09:54 Eli Zaretskii <e= liz@gnu.org> wrote:
tags 612= 39 notabug wontfix
thanks

> From: Narendra Joshi <narendraj9@gmail.com>
> Date: Thu, 02 Feb 2023 22:26:57 +0100
>
>
> The following code demonstrates the behavior:
>
> (display-line-numbers-mode +1)
> (setq header-line-format
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(concat (propertize " " 'displ= ay '((space :align-to 0))) "Column"))
>
> With line numbers displayed, the text above, i.e. "Column" d= oesn't align
> wit the text in the buffer. This is problematic for modes like SES mod= e
> (https://www.gnu.o= rg/software/emacs/manual/html_node/ses/index.html).=C2=A0 =C2=A0 =C2=A0=

The :align-to values in header-line and mode-line do not automatically
account for line numbers when display-line-numbers-mode is turned on.
This is because the display engine cannot possibly know whether the
application does or doesn't want this; we certainly don't want that=
for mode-line, for example.=C2=A0 For header lines, there's no guarante= e
that the text there must align with the buffer text: that is up to the
application to decide.

So if a Lisp program wants the header-line indentation to be updated
according to the screen estate taken by line numbers, it should do the
following:

=C2=A0 . turn on the minor mode header-line-indent-mode
=C2=A0 . include header-line-indent-width in the :align-to expression

In your case, the following change in the :align-to should do what you
want:

=C2=A0 (setq header-line-format
=C2=A0 =C2=A0 =C2=A0 =C2=A0 (concat (propertize " "
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 'display
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 '(space :align-to
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (+ header-line-indent-= width 0)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "Column")= )

You can see further examples of using this in tabulated-list-mode.el.

I see that the ELisp manual doesn't mention this minor mode, and
moreover, has some text which might mislead you into thinking that the
header-line display will automatically be updated to account for the
line numbers; I will fix the manual soon.
--00000000000025816005f3c8df08-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 09:48:05 2023 Received: (at 61239-done) by debbugs.gnu.org; 3 Feb 2023 14:48:05 +0000 Received: from localhost ([127.0.0.1]:36957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxMC-0001V6-Ur for submit@debbugs.gnu.org; Fri, 03 Feb 2023 09:48:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNxMA-0001Ua-IO for 61239-done@debbugs.gnu.org; Fri, 03 Feb 2023 09:48:03 -0500 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 1pNxM4-00047i-Qd; Fri, 03 Feb 2023 09:47:56 -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=NZhpTPLofAI//c8NMkJCAprazpHx91zAfYe3CNyjw6s=; b=gqeZDZLFm5Tn njyxPOfx5Zo/H/OUk7i6PNyYbwxp3nVI8eCDFZPwY/W4x6Z9np67ypOSvV2MiOKMhVZBogPAitvz7 T0b0522CKAUmGpkNw20sOQZsW+DEPFfDbXizknpANL2CJu4kG/EXwt3MblMh/bdqFd56vMofMyNFa TXLgdNqxHOY7z8/ZoKAUrQHq8qZ7KnFcLUu47I0gbHX1W7vTtty/WmCzX/B16X9ViKHSchj8Lj69P 8Fuu+8w604Q/++STfm9oDCmv7o3/tSrRoNn7DUJZE+QnGr3sJXnT2nzXJnoPjEgLH3MI+y11DwM3B XeilgyugJX+N5bRb7TN/lg==; Received: from [87.69.77.57] (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 1pNxM3-0001Uf-UE; Fri, 03 Feb 2023 09:47:56 -0500 Date: Fri, 03 Feb 2023 16:48:00 +0200 Message-Id: <83h6w2vm8v.fsf@gnu.org> From: Eli Zaretskii To: narendraj9@gmail.com In-Reply-To: <83r0v7uo1g.fsf@gnu.org> (message from Eli Zaretskii on Fri, 03 Feb 2023 10:54:35 +0200) Subject: Re: bug#61239: 30.0.50; Display property value `((space :align-to))` doesn't handle line numbers References: <87357npxlq.fsf@gmail.com> <83r0v7uo1g.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61239-done Cc: 61239-done@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 (---) > Cc: 61239@debbugs.gnu.org > Date: Fri, 03 Feb 2023 10:54:35 +0200 > From: Eli Zaretskii > > I see that the ELisp manual doesn't mention this minor mode, and > moreover, has some text which might mislead you into thinking that the > header-line display will automatically be updated to account for the > line numbers; I will fix the manual soon. Now done. And with that I'm closing this bug. Thanks for bringing this to our attention. From unknown Mon Jun 23 05:59:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 04 Mar 2023 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator