From unknown Tue Aug 19 21:03:09 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#70485 <70485@debbugs.gnu.org> To: bug#70485 <70485@debbugs.gnu.org> Subject: Status: 30.0.50; Asymetrical margins break mode-line-right-align-edge Reply-To: bug#70485 <70485@debbugs.gnu.org> Date: Wed, 20 Aug 2025 04:03:09 +0000 retitle 70485 30.0.50; Asymetrical margins break mode-line-right-align-edge reassign 70485 emacs submitter 70485 Charles Gonnaud severity 70485 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 20 17:38:48 2024 Received: (at submit) by debbugs.gnu.org; 20 Apr 2024 21:38:49 +0000 Received: from localhost ([127.0.0.1]:38327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryIQ2-00047l-Ku for submit@debbugs.gnu.org; Sat, 20 Apr 2024 17:38:48 -0400 Received: from lists.gnu.org ([2001:470:142::17]:55540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ryIQ1-00046s-2U for submit@debbugs.gnu.org; Sat, 20 Apr 2024 17:38:45 -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 1ryIPg-0001ld-IY for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 17:38:24 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ryIPe-0000jK-Cf for bug-gnu-emacs@gnu.org; Sat, 20 Apr 2024 17:38:24 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-41a23222463so892735e9.1 for ; Sat, 20 Apr 2024 14:38:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713649100; x=1714253900; darn=gnu.org; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=Ag/UWsgPNYPcMNYVVHm7+NUfmFSm4iWS0SrQCtSyr/w=; b=NlHoFjdOV+/nZV3WcdxxahXO41bx8uwKVaqzzbnP6ImGTvvE7ZAMnA9n6bO1B8jnPs 7MNxDXIKR1JMolanreBBl3rKndexaEcL1J8MevVUrQIJU5Q2JXA/Dn6P7OZdXpowWJS+ MKJ0YP503bWH0iHfIU/JMV7a+MLNVvJc/4z8NaGUrAKmNMmThG13QdQmzZlb83KIo61L mpc63ZU8wZ5eSoyPQRX6QTzzSp22MDZyidX3iPN4q2gPuaUynEZ3JFtuKbDjFIqR47Tr 79saZdLdQVPqYsXndeK5t7mS+OsY3izZlOFf5eLBFB7eEKFNsPU9upRYxNM6wuyhOLbe XUNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713649100; x=1714253900; h=content-transfer-encoding:from:content-language:subject:to :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Ag/UWsgPNYPcMNYVVHm7+NUfmFSm4iWS0SrQCtSyr/w=; b=GjerMz4xnwTv1jEI0NgxcNG6GJnIJTogo0cIvrpra76EBt3IFqhZeTWX9HpurwzDZW O7XJSf3lQ3hhaoeUoq/1zwI6nwfSuNPo2IiSZ+K+RMWG6SHIK5B/x4WVPvZK4xeU5LYe 8ZGRccHeE2I4v2iUeEa90EA2F27NjQqfdCaFJNDnl61giTFenK2j5hiVfOeTu0X0A896 QnpmD3xHXDx+ZmFJzeCFyYIYsAIeYkTisvrsXIDvNCXHAC6OFBMcIhzrMPVU96hvXhcK cHrqjivgdwzQn8KtcUT3eYJPH32mdnDFDVR5w9iaVLECv52tqmqtTmCTUQ0Tb4d//RF3 izEA== X-Gm-Message-State: AOJu0YyqBnOTduqfDjuTktpUlokdJ0ZIbm/+zDTxrp6kw8I7ACqsjmkU zREeysxu2znW4EgOQoeNXxBRGp0zYtHYhtl90AU2idIaAX4IKlE6Lo27IA== X-Google-Smtp-Source: AGHT+IGUCj5v1DJ+FIR8FyAvt0ByAi042Y1WiBwccEMPFvo+iEc0DWHXkTFLGCBE0COYpEI21oezyg== X-Received: by 2002:a05:600c:4691:b0:417:d4f6:1aa2 with SMTP id p17-20020a05600c469100b00417d4f61aa2mr5261864wmo.4.1713649099776; Sat, 20 Apr 2024 14:38:19 -0700 (PDT) Received: from ?IPV6:2a02:842a:3e6:1201:da95:9f99:fc33:a22? ([2a02:842a:3e6:1201:da95:9f99:fc33:a22]) by smtp.gmail.com with ESMTPSA id o12-20020a05600c4fcc00b00418a6d62ad0sm14997344wmq.34.2024.04.20.14.38.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 20 Apr 2024 14:38:19 -0700 (PDT) Message-ID: <6eaaede9-97a5-4199-bf6c-52bb812e9007@gmail.com> Date: Sat, 20 Apr 2024 23:38:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: bug-gnu-emacs@gnu.org Subject: 30.0.50; Asymetrical margins break mode-line-right-align-edge Content-Language: en-US From: Charles Gonnaud Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=charles.gonnaud@gmail.com; helo=mail-wm1-x32e.google.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, 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.0 (+) 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: -0.0 (/) Hello to all, Thank you for your work maintaining emacs, this is my first bug report so please be indulgent. *** Bug description I use a minor-mode similar to olivetti (https://github.com/rnkn/olivetti), which uses margins to center the text in the window. Playing around with the doom modeline, which copied emacs 30's implementation of `mode-line-right-align-edge', I noticed that setting a different margin on the left and right resulted in a cropped modeline to the right. *** Suggested patch In mode--line-format-right-align() (lisp/bindings.el:384) - (* (or (cdr (window-margins)) 1) + (* (or (car (window-margins)) 0) *** Minimal init.el to reproduce ;; Use a custom mode-line with text aligned to the right ;;|foo bar| (setq-default mode-line-format (list "foo" 'mode-line-format-right-align "bar" )) ;; Helper commands to set a margin left, right, or reset to nil. ;; Cycle between those and see the mayhem happen on the modeline. ;; Reset margins (keymap-global-set "" (lambda() (interactive) (set-window-margins (selected-window) nil))) ;; Set margin to the left only (keymap-global-set "" (lambda() (interactive) (set-window-margins (selected-window) 10 0))) ;; Set margin to the right only (keymap-global-set "" (lambda() (interactive) (set-window-margins (selected-window) 0 10))) Thank you for your time, Cheers, Charles In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-04-20 built on archcharles Repository revision: 21e33567fabdc1310005ff6f96684be514527e8d Repository branch: master System Description: Arch Linux Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/l Minor modes in effect: recentf-mode: t outline-minor-faces-mode: t outline-minor-mode: t electric-pair-mode: t rainbow-delimiters-mode: t ijkl-mode: t ijkl-local-mode: t corfu-terminal-mode: t global-corfu-mode: t corfu-mode: t my/clang-format-auto-mode: t yas-global-mode: t yas-minor-mode: t marginalia-mode: t vertico-mode: t key-chord-mode: t which-key-mode: t delete-selection-mode: t global-auto-revert-mode: t savehist-mode: t display-time-mode: t display-battery-mode: t my/keys-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 file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t size-indication-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t hs-minor-mode: t Load-path shadows: /home/charles/.config/emacs/elpa/transient-20240415.1548/transient hides /usr/local/share/emacs/30.0.50/lisp/transient Features: (shadow sort mail-extr emacsbug message yank-media puny rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils comp-common texinfo texinfo-loaddefs emacs-news-mode expand-region text-mode-expansions er-basic-expansions expand-region-core expand-region-custom cus-start tramp-sh tramp trampver tramp-integration tramp-message tramp-compat xdg shell pcomplete parse-time iso8601 tramp-loaddefs jka-compr vc-git diff-mode track-changes vc-dispatcher bug-reference files-x grep compile comint ansi-osc ansi-color find-file xref face-remap time-date misearch multi-isearch recentf tree-widget consult project bookmark text-property-search mule-util orderless thingatpt helpful cc-langs cc-vars cc-defs imenu trace cl-print edebug debug backtrace info-look advice find-func help-fns radix-tree elisp-refs display-fill-column-indicator pulse color term/xterm xterm outline-minor-faces noutline outline elec-pair rainbow-delimiters hideshow dired-aux dired dired-loaddefs transient hydra ring lv corfu-terminal popon corfu-info corfu treesit yasnippet edmacro kmacro marginalia vertico key-chord which-key delsel display-line-numbers autorevert filenotify savehist cus-edit pp cus-load wid-edit time format-spec battery dbus xml doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path rx f s dash nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon compat vscode-dark-plus-theme diminish use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode cl-extra help-mode use-package-core finder-inf clang-format-autoloads consult-autoloads corfu-terminal-autoloads corfu-autoloads csv-mode-autoloads diminish-autoloads doom-modeline-autoloads evil-autoloads expand-region-autoloads goto-chg-autoloads helpful-autoloads elisp-refs-autoloads hydra-autoloads key-chord-autoloads lv-autoloads magit-autoloads pcase git-commit-autoloads marginalia-autoloads markdown-mode-autoloads nerd-icons-autoloads olivetti-autoloads orderless-autoloads org-bullets-autoloads org-download-autoloads async-autoloads org-present-autoloads org-roam-autoloads magit-section-autoloads emacsql-autoloads outline-minor-faces-autoloads popon-autoloads prettier-js-autoloads python-coverage-autoloads rainbow-delimiters-autoloads shrink-path-autoloads f-autoloads s-autoloads telephone-line-autoloads transient-autoloads vertico-autoloads visual-fill-column-autoloads vscode-dark-plus-theme-autoloads web-mode-autoloads which-key-autoloads with-editor-autoloads xml+-autoloads info dash-autoloads yasnippet-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 icons 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 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 dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo gtk x-toolkit xinput2 x multi-tty move-toolbar make-network-process emacs) Memory information: ((conses 16 551922 121165) (symbols 48 29879 12) (strings 32 175254 6561) (string-bytes 1 4198058) (vectors 16 50184) (vector-slots 8 1132229 191276) (floats 8 356 762) (intervals 56 12770 574) (buffers 992 29)) From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 25 12:37:21 2024 Received: (at 70485-done) by debbugs.gnu.org; 25 Apr 2024 16:37:21 +0000 Received: from localhost ([127.0.0.1]:33177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0262-0006Cj-R0 for submit@debbugs.gnu.org; Thu, 25 Apr 2024 12:37:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s025z-0006B2-8i for 70485-done@debbugs.gnu.org; Thu, 25 Apr 2024 12:37:16 -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 1s025c-0001HT-0x; Thu, 25 Apr 2024 12:36:52 -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=0RN2Au65wlA+lNTaxhdvKnH40hp4GAsSEggSBXIZjoA=; b=KMcvGDX8P+vb izHN0DjNDos5k1ta+QeXItUfL0Flv+rrrJPy4qo6gBMeapidpMFRXGR7Xog5WMvNK8yBHR03PIUEq uOBMIh49p8hAnasBwYz4jwaQNOGgachL5cwHl7HYNg3vmxJ5qG73inNtHMj+ilrOu48PQdKD4Vkre T3vXOOQAelJZPrVWgvcy5ve/jrs3eyjxRh/5XoTbAyRxg+HAqT5u1uLQqomhxDY+cVss3sZui3MPe 7O2qTyOUkhLE/GJSk3UkY6zUlyMrlE8NzdbeoEKz/7Vh87rm+A4wtWQY4odYLMeRkX25RhlHkpe2h 7uTe6nTkHVYuCg2oCsiRFg==; Date: Thu, 25 Apr 2024 19:36:47 +0300 Message-Id: <865xw51js0.fsf@gnu.org> From: Eli Zaretskii To: Charles Gonnaud In-Reply-To: <6eaaede9-97a5-4199-bf6c-52bb812e9007@gmail.com> (message from Charles Gonnaud on Sat, 20 Apr 2024 23:38:18 +0200) Subject: Re: bug#70485: 30.0.50; Asymetrical margins break mode-line-right-align-edge References: <6eaaede9-97a5-4199-bf6c-52bb812e9007@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 70485-done Cc: 70485-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 (---) > Date: Sat, 20 Apr 2024 23:38:18 +0200 > From: Charles Gonnaud > > Hello to all, > Thank you for your work maintaining emacs, this is my first bug report > so please be indulgent. > > *** Bug description > > I use a minor-mode similar to olivetti > (https://github.com/rnkn/olivetti), which uses margins to center the > text in the window. > > Playing around with the doom modeline, which copied emacs 30's > implementation of `mode-line-right-align-edge', I noticed that setting > a different margin on the left and right resulted in a cropped modeline > to the right. > > *** Suggested patch > > In mode--line-format-right-align() (lisp/bindings.el:384) > - (* (or (cdr (window-margins)) 1) > + (* (or (car (window-margins)) 0) Thanks, you are right. I've now installed your proposed change on the master branch, and I'm therefore closing this bug. From unknown Tue Aug 19 21:03:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 24 May 2024 11:24:07 +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