From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 14 04:17:30 2025 Received: (at submit) by debbugs.gnu.org; 14 Jul 2025 08:17:30 +0000 Received: from localhost ([127.0.0.1]:59327 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ubENN-0007Ci-MG for submit@debbugs.gnu.org; Mon, 14 Jul 2025 04:17:30 -0400 Received: from lists.gnu.org ([2001:470:142::17]:59058) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ubEK5-0006wt-7g for submit@debbugs.gnu.org; Mon, 14 Jul 2025 04:14:06 -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 1ubEJq-0002Bn-6H for bug-gnu-emacs@gnu.org; Mon, 14 Jul 2025 04:13:50 -0400 Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ubEJl-0004ss-6K for bug-gnu-emacs@gnu.org; Mon, 14 Jul 2025 04:13:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1752480812; x=1752740012; bh=mNeDj1ykzJffWLa3x5IUtLTNywFGhrHf0HDYZTiYGok=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=TFvBVS4g9b7ezUPmN1YwmWNo2U4aaPIqENLpvpt+pvFrCWH3UNEAINWzOl60KF4EY rNFVJmVUGUS61rilWKbgKFcHy+Cz1uvlxLeUbBuoijvcsfPPGoJFiv6bEXpql+hbPL Q1m32Me33C6vuF26GeJ3tiTIzqZFd6Eh732BJ9b/G3CZEXOLilIpIMwtELqrMJFiUb 8uXBfz2FxvMOGjR6HWNkMQvDYM/PuEY91GFqY7tstZPP0q+BfynSdmDiy/icBAlYWb tUfl0NhLZGfGQqvU7aZofO/RFdWP4mu7xLItJa4IJjAk1yeWB+GU1LNmq8caDckT5S IJyXmL+T1uu7g== Date: Mon, 14 Jul 2025 08:13:27 +0000 To: "bug-gnu-emacs@gnu.org" From: Derick Eddington Subject: `window-state-put' uses incorrect alist key `'min-weight' but should use `'min-width'. Message-ID: <3_-9MTkf2Vd8hZz3AjTKcuMXEHB5ScIExUVIJYTu0u1ho-1O5iWHiMRQ3fjgrSRBzobzZQyqFaEOwk0xnrnC5yXrdCO2CxhDm2kw6mUcI8g=@pm.me> Feedback-ID: 13254403:user:proton X-Pm-Message-ID: 29b3de67a82193356f230ad9b61aa68fd575da8d MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.70.43.16; envelope-from=kcired@pm.me; helo=mail-4316.protonmail.ch X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=-1, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-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-Mailman-Approved-At: Mon, 14 Jul 2025 04:17:29 -0400 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 (/) To reproduce: $ emacs -Q --batch --eval \ "(window-state-put '(((min-height . 12) (min-width . 20) (min-height-ignore . 7) (min-width-ignore . 8) (min-height-safe . 3) (min-width-safe . 4)) vc (total-width . 200) (total-height . 60) (normal-height . 1.0) (normal-width . 1.0) (combination-limit)))" Which causes the following error: Wrong type argument: number-or-marker-p, nil because (in the definition of `window-state-put'): (min-width (cdr (assq (if pixelwise 'min-pixel-width 'min-weight) head))) binds `min-width' to `nil' because `'min-weight' is (correctly) not in the input alist. and so: (> min-width (window-size window t pixelwise))) causes the error. Whereas, if you substitute the incorrect key it's currently using, `'min-weight' for `'min-width', in the input alist, then it does not error. But that would be invalid because it's supposed to use `'min-width', like `window-state-get' returns. This mistake was introduced in commit 880e615 "Support resizing frames and windows pixelwise." in the year 2013. Previously, `'min-width' had been used, but when that commit introduced `'min-pixel-width' it also typoed as `'min-weight' its attempt at preserving the `'min-width'. I'll be submitting a patch to fix this. The fix is simply: --- a/lisp/window.el +++ b/lisp/window.el @@ -6803,7 +6803,7 @@ was killed since STATE was made, it will consult the = variable =09=09=09 (if pixelwise 'min-pixel-height 'min-height) =09=09=09 head))) =09 (min-width (cdr (assq -=09=09=09 (if pixelwise 'min-pixel-width 'min-weight) +=09=09=09 (if pixelwise 'min-pixel-width 'min-width) =09=09=09 head))) =09 ;; Bind the following two variables. `window--state-put-1' has =09 ;; to fully control them (see Bug#50867 and Bug#64405). In GNU Emacs 30.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.2) Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: NixOS 24.11 (Vicuna) Configured using: 'configure --prefix=3D/nix/store/bdf77bcxc565y83iyw4i26fyq3wgv07j-emacs-gtk3-30.1 --disable-build-details --with-modules --with-x-toolkit=3Dgtk3 --with-cairo --with-xft --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --with-xinput2 --without-xwidgets --with-dbus --with-selinux' Configured features: CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG 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 GTK3 ZLIB Important settings: value of $EMACSLOADPATH:=20 value of $EMACSNATIVELOADPATH:=20 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: ELisp/d Minor modes in effect: magit-wip-initial-backup-mode: t magit-wip-before-change-mode: t magit-wip-after-apply-mode: t magit-wip-after-save-mode: t magit-wip-mode: t global-git-commit-mode: t magit-auto-revert-mode: t server-mode: t which-key-mode: t show-smartparens-global-mode: t show-smartparens-mode: t smartparens-global-strict-mode: t smartparens-strict-mode: t smartparens-mode: t savehist-mode: t minibuffer-depth-indicate-mode: t counsel-mode: t ivy-mode: t global-flycheck-mode: t global-diff-hl-mode: t global-company-mode: t company-mode: t pixel-scroll-precision-mode: t global-visual-wrap-prefix-mode: t visual-wrap-prefix-mode: t global-so-long-mode: t delete-selection-mode: t override-global-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-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 global-visual-line-mode: t visual-line-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/z/.nix-profile/share/emacs/site-lisp/cmake-mode hides /nix/store/vmrq= lbknjdhnyddp9c39w48j18rmzz7w-emacs-packages-deps/share/emacs/site-lisp/elpa= /cmake-mode-20250304.1338/cmake-mode /nix/store/vmrqlbknjdhnyddp9c39w48j18rmzz7w-emacs-packages-deps/share/emacs= /site-lisp/site-start hides /nix/store/bdf77bcxc565y83iyw4i26fyq3wgv07j-ema= cs-gtk3-30.1/share/emacs/site-lisp/site-start /nix/store/vmrqlbknjdhnyddp9c39w48j18rmzz7w-emacs-packages-deps/share/emacs= /site-lisp/elpa/transient-0.8.8/transient hides /nix/store/bdf77bcxc565y83i= yw4i26fyq3wgv07j-emacs-gtk3-30.1/share/emacs/30.1/lisp/transient /nix/store/vmrqlbknjdhnyddp9c39w48j18rmzz7w-emacs-packages-deps/share/emacs= /site-lisp/elpa/compat-30.1.0.0/compat hides /nix/store/bdf77bcxc565y83iyw4= i26fyq3wgv07j-emacs-gtk3-30.1/share/emacs/30.1/lisp/emacs-lisp/compat /nix/store/vmrqlbknjdhnyddp9c39w48j18rmzz7w-emacs-packages-deps/share/emacs= /site-lisp/elpa/eldoc-1.15.0/eldoc hides /nix/store/bdf77bcxc565y83iyw4i26f= yq3wgv07j-emacs-gtk3-30.1/share/emacs/30.1/lisp/emacs-lisp/eldoc /nix/store/vmrqlbknjdhnyddp9c39w48j18rmzz7w-emacs-packages-deps/share/emacs= /site-lisp/elpa/seq-2.24/seq hides /nix/store/bdf77bcxc565y83iyw4i26fyq3wgv= 07j-emacs-gtk3-30.1/share/emacs/30.1/lisp/emacs-lisp/seq Features: (lsp-zig lsp-yang lsp-yaml lsp-xml lsp-wgsl lsp-volar lsp-vimscript lsp-vhdl lsp-vetur lsp-html lsp-verilog lsp-vala lsp-v lsp-typespec lsp-typeprof lsp-ttcn3 lsp-ts-query lsp-trunk lsp-toml lsp-tilt lsp-tex lsp-terraform lsp-svelte lsp-steep lsp-sqls lsp-sql lsp-sorbet lsp-solidity lsp-solargraph lsp-semgrep lsp-rust lsp-ruff lsp-ruby-syntax-tree lsp-ruby-lsp lsp-rubocop lsp-roslyn lsp-roc lsp-rf lsp-remark lsp-racket lsp-r lsp-qml lsp-python-ty lsp-pylsp lsp-pyls lsp-pwsh lsp-purescript lsp-postgres lsp-pls lsp-php lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-nushell lsp-nix lsp-nim lsp-nginx lsp-nextflow lsp-move lsp-mojo lsp-mint lsp-meson lsp-mdx lsp-matlab lsp-marksman lsp-markdown lsp-magik lsp-fennel lsp-lua lsp-lisp lsp-kubernetes-helm lsp-kotlin lsp-json lsp-jq lsp-javascript lsp-idris lsp-haxe lsp-hack lsp-groovy lsp-graphql lsp-golangci-lint lsp-glsl lsp-gleam lsp-gdscript lsp-fsharp lsp-futhark lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elm lsp-elixir lsp-earthly lsp-dockerfile lsp-dhall lsp-d lsp-cypher lsp-cucumber lsp-copilot lsp-css lsp-c3 lsp-csharp gnutls lsp-crystal lsp-credo lsp-cobol lsp-cmake lsp-clojure lsp-clangd lsp-bufls lsp-go lsp-completion lsp-beancount lsp-bash lsp-awk lsp-autotools lsp-astro lsp-asm lsp-ansible lsp-angular lsp-ada lsp-semantic-tokens lsp-actionscript my-lsp lsp-ui lsp-ui-flycheck lsp-ui-doc lsp-ui-imenu lsp-ui-peek lsp-ui-sideline lsp-ui-util lsp-mode lsp-protocol tree-widget spinner smartparens-markdown markdown-mode color lv inline ht f s sh-script smie treesit executable lpr shadow sort mail-extr cl-print debug backtrace emacsbug ispell tabify man mm-archive network-stream url-cache define-word rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-enc xmltok url-http url-auth url-gw nsm let-alist descr-text magit-dired gitconfig-mode conf-mode noutline outline home-end keypress-multi-event misearch multi-isearch hideshow jka-compr my-tramp my-ssh tramp-sh shortdoc help-fns radix-tree view open-junk-file ibuffer-project my-ibuffer-project my-ibuffer ibuf-ext ibuffer ibuffer-loaddefs mc-hide-unmatched-lines-mode mc-mark-more smartparens-html sgml-mode facemenu dom mc-cycle-cursors multiple-cursors-core rect ivy-overlay goto-addr vc-svn vc-git bug-reference magit-extras mule-util face-remap my-ivy tramp-cache time-stamp vagrant-tramp term disp-table ehelp tramp trampver tramp-integration files-x tramp-message tramp-compat parse-time iso8601 tramp-loaddefs my-magit cus-start magit-submodule 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 puny dired-x dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader add-log magit-core magit-autorevert autorevert filenotify magit-margin magit-transient magit-process with-editor shell pcomplete server magit-mode transient benchmark magit-git magit-base magit-section format-spec cursor-sensor crm llama comp comp-cstr warnings comp-run comp-common compat time-date my-modeline which-key smartparens-config smartparens-text smartparens-go smartparens advice loadhist dash savehist mb-depth counsel xdg swiper ivy ivy-faces colir flycheck find-func diff-hl log-view pcvs-util vc-dir ewoc vc vc-dispatcher diff-mode track-changes 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 rx ibuf-macs edmacro kmacro my-utils cl-extra help-mode cus-edit pp wid-edit pixel-scroll cua-base visual-wrap so-long delsel cus-load go-mode find-file ffap thingatpt etags fileloop generator xref project compile text-property-search comint ansi-osc ansi-color ring use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core all-the-icons-autoloads capnp-mode-autoloads charmap-autoloads cmake-mode-autoloads company-autoloads counsel-fd-autoloads counsel-tramp-autoloads counsel-autoloads csv-mode-autoloads define-word-autoloads diff-hl-autoloads expand-region-autoloads fd-dired-autoloads flycheck-autoloads git-modes-autoloads go-mode-autoloads home-end-autoloads ibuffer-project-autoloads ivy-hydra-autoloads hydra-autoloads keypress-multi-event-autoloads lsp-ivy-autoloads lsp-ui-autoloads lsp-mode-autoloads ht-autoloads f-autoloads lua-mode-autoloads lv-autoloads magit-autoloads markdown-mode-autoloads multiple-cursors-autoloads nasm-mode-autoloads nix-mode-autoloads magit-section-autoloads llama-autoloads open-junk-file-autoloads rg-autoloads rust-mode-autoloads s-autoloads smartparens-autoloads spinner-autoloads swiper-autoloads ivy-autoloads toml-mode-autoloads transient-autoloads vagrant-tramp-autoloads dash-autoloads wgrep-autoloads info with-editor-autoloads yaml-mode-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 my-platform pcase 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 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 834130 1802202) (symbols 48 56114 118) (strings 32 262292 12880= 4) (string-bytes 1 7721712) (vectors 16 87633) (vector-slots 8 1471073 120367= 1) (floats 8 500 22139) (intervals 56 50245 31224) (buffers 992 36)) From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 14 05:08:21 2025 Received: (at 79013) by debbugs.gnu.org; 14 Jul 2025 09:08:21 +0000 Received: from localhost ([127.0.0.1]:59511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ubFAb-0001ts-Av for submit@debbugs.gnu.org; Mon, 14 Jul 2025 05:08:21 -0400 Received: from mail-24418.protonmail.ch ([109.224.244.18]:37541) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ubFAX-0001ta-K9 for 79013@debbugs.gnu.org; Mon, 14 Jul 2025 05:08:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1752484089; x=1752743289; bh=v9wtiMoV1ETtcIUAxXAe+1b7nQDip8hXK5KhFcp/mjc=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=LNYYUws9/HcoXaPYxgFcRL4h9HPdj5aZLGdvPwsVA53/tpn+Q/cXQ20mipAip/CXV p2ysxW8rIv6hxKzNfH5eC0ZBVpF5Aa77qa+JjAzm0R5EeOzNJK3zkwmjc7ttElsF5P pnAqbKcKgH7UdPW0s7fVGmDStMpUq80n06qXQTnGaG6x3cGMHygayPz8Oha1BapB0Q jH/9DrJ3F0XSMHh0ryUGKP59nZa1xie6Ny1aBfN584Udz4K9o+9GTasSwRpAqdIYXZ DnTPGpQcpsyDCFe40xU2n2TRLPIOi+9u++nVYlKvwAwXpDXGdEJRnCTltJGnXRMqL9 +jr9aOnXcjr/w== Date: Mon, 14 Jul 2025 09:08:05 +0000 To: "79013@debbugs.gnu.org" <79013@debbugs.gnu.org> From: Derick Eddington Subject: [PATCH] Fix `window-state-put' `min-width' (bug#79013) Message-ID: Feedback-ID: 13254403:user:proton X-Pm-Message-ID: 1039b19c7b3e77eaa4cfa72813338433227089fe MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1=_rEbJLyBygfkJn0ozfVG12m9UlOo1yTayWh49jcWU8" X-Spam-Score: -1.0 (-) X-Debbugs-Envelope-To: 79013 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.0 (--) --b1=_rEbJLyBygfkJn0ozfVG12m9UlOo1yTayWh49jcWU8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Fixes: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79013 by simply changing the single `'min-weight' typo to `'min-width'. --b1=_rEbJLyBygfkJn0ozfVG12m9UlOo1yTayWh49jcWU8 Content-Type: text/x-patch; name=0001-Fix-window-state-put-min-width-bug-79013.patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-Fix-window-state-put-min-width-bug-79013.patch RnJvbSBmMmE0MWE3MjY0MmY2NDk1ZWNmYTY3ZmY4YmY4NmFhOWVjMGEyYzFhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEZXJpY2sgRWRkaW5ndG9uIDxrY2lyZWRAcG0ubWU+CkRhdGU6 IE1vbiwgMTQgSnVsIDIwMjUgMDE6Mjc6MTMgLTA3MDAKU3ViamVjdDogW1BBVENIXSBGaXggYHdp bmRvdy1zdGF0ZS1wdXQnIGBtaW4td2lkdGgnIChidWcjNzkwMTMpCgoqIGxpc3Avd2luZG93LmVs ICh3aW5kb3ctc3RhdGUtcHV0KToKRml4IGluY29ycmVjdCBgJ21pbi13ZWlnaHQnIGtleSB0aGF0 IHNob3VsZCBiZSBgJ21pbi13aWR0aCcgaW5zdGVhZCwKZm9yIHRoZSBsb29rdXAgaW4gdGhlIGFs aXN0LiAgVGhpcyBtaXN0YWtlIHdhcyBpbnRyb2R1Y2VkIGluIGNvbW1pdAo4ODBlNjE1ICJTdXBw b3J0IHJlc2l6aW5nIGZyYW1lcyBhbmQgd2luZG93cyBwaXhlbHdpc2UuIiBpbiB0aGUgeWVhcgoy MDEzLiAgUHJldmlvdXNseSwgYCdtaW4td2lkdGgnIGhhZCBiZWVuIHVzZWQsIGJ1dCB3aGVuIHRo YXQgY29tbWl0CmludHJvZHVjZWQgYCdtaW4tcGl4ZWwtd2lkdGgnIGl0IGFsc28gdHlwb2VkIGFz IGAnbWluLXdlaWdodCcgaXRzCmF0dGVtcHQgYXQgcHJlc2VydmluZyB0aGUgYCdtaW4td2lkdGgn LgoKU2lnbmVkLW9mZi1ieTogRGVyaWNrIEVkZGluZ3RvbiA8a2NpcmVkQHBtLm1lPgotLS0KIGxp c3Avd2luZG93LmVsIHwgMiArLQogMSBmaWxlIGNoYW5nZWQsIDEgaW5zZXJ0aW9uKCspLCAxIGRl bGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvbGlzcC93aW5kb3cuZWwgYi9saXNwL3dpbmRvdy5lbApp bmRleCBlMjI5NTYyMTYzYi4uNTUwOWYzNmZiZTkgMTAwNjQ0Ci0tLSBhL2xpc3Avd2luZG93LmVs CisrKyBiL2xpc3Avd2luZG93LmVsCkBAIC02ODAzLDcgKzY4MDMsNyBAQCB3YXMga2lsbGVkIHNp bmNlIFNUQVRFIHdhcyBtYWRlLCBpdCB3aWxsIGNvbnN1bHQgdGhlIHZhcmlhYmxlCiAJCQkgICAo aWYgcGl4ZWx3aXNlICdtaW4tcGl4ZWwtaGVpZ2h0ICdtaW4taGVpZ2h0KQogCQkJICAgaGVhZCkp KQogCSAobWluLXdpZHRoIChjZHIgKGFzc3EKLQkJCSAgKGlmIHBpeGVsd2lzZSAnbWluLXBpeGVs LXdpZHRoICdtaW4td2VpZ2h0KQorCQkJICAoaWYgcGl4ZWx3aXNlICdtaW4tcGl4ZWwtd2lkdGgg J21pbi13aWR0aCkKIAkJCSAgaGVhZCkpKQogCSA7OyBCaW5kIHRoZSBmb2xsb3dpbmcgdHdvIHZh cmlhYmxlcy4gIGB3aW5kb3ctLXN0YXRlLXB1dC0xJyBoYXMKIAkgOzsgdG8gZnVsbHkgY29udHJv bCB0aGVtIChzZWUgQnVnIzUwODY3IGFuZCBCdWcjNjQ0MDUpLgotLSAKMi40Ny4yCgo= --b1=_rEbJLyBygfkJn0ozfVG12m9UlOo1yTayWh49jcWU8-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 14 07:37:17 2025 Received: (at 79013-done) by debbugs.gnu.org; 14 Jul 2025 11:37:17 +0000 Received: from localhost ([127.0.0.1]:60217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ubHUi-0005lM-MP for submit@debbugs.gnu.org; Mon, 14 Jul 2025 07:37:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41406) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ubHUe-0005l1-Ha for 79013-done@debbugs.gnu.org; Mon, 14 Jul 2025 07:37:12 -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 1ubHUY-0000Ae-1x; Mon, 14 Jul 2025 07:37:06 -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=Bw3xPcR5Kbup3JIJp5SvTtQEEHhyT2iiREEqKRAnwJM=; b=kvwLZkjQgEZ9 yI/Bq1sWq4DrAUfh0JZW7TwKYymZPelZf7pegIToYg5m4vwm3Sy5iQhxAF4kPx9CtgGW1HGVfgSru vPUnGyV3/ee5JxauoMYwXHogAs2/qgHCpiZhpwqhkcJEOnGV+rSPWzn65htm+8Zj3RjsZRrfW7Y4Z pfm8/WXThQ1/Dxehz3qP1ocPoEejwr2Zh/F7AaDcNl4rgplI60EYnYdFqGrYft2rwckz6jteNBffh 0tfeJ/B+rCdRrm+pq8FOlRVhoR83gLdi/RxTkZkkwN+8Q27XNyEhU7jytDnq3sZmgl6Qa8mHsmx3k uzv90kptJCJdsACmJyZrzg==; Date: Mon, 14 Jul 2025 14:36:29 +0300 Message-Id: <864ivfc8ci.fsf@gnu.org> From: Eli Zaretskii To: Derick Eddington In-Reply-To: <3_-9MTkf2Vd8hZz3AjTKcuMXEHB5ScIExUVIJYTu0u1ho-1O5iWHiMRQ3fjgrSRBzobzZQyqFaEOwk0xnrnC5yXrdCO2CxhDm2kw6mUcI8g=@pm.me> (bug-gnu-emacs@gnu.org) Subject: Re: bug#79013: `window-state-put' uses incorrect alist key `'min-weight' but should use `'min-width'. References: <3_-9MTkf2Vd8hZz3AjTKcuMXEHB5ScIExUVIJYTu0u1ho-1O5iWHiMRQ3fjgrSRBzobzZQyqFaEOwk0xnrnC5yXrdCO2CxhDm2kw6mUcI8g=@pm.me> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79013-done Cc: 79013-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: Mon, 14 Jul 2025 08:13:27 +0000 > From: Derick Eddington via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > To reproduce: > > $ emacs -Q --batch --eval \ > "(window-state-put '(((min-height . 12) > (min-width . 20) > (min-height-ignore . 7) > (min-width-ignore . 8) > (min-height-safe . 3) > (min-width-safe . 4)) > vc > (total-width . 200) > (total-height . 60) > (normal-height . 1.0) > (normal-width . 1.0) > (combination-limit)))" > > Which causes the following error: > > Wrong type argument: number-or-marker-p, nil > > because (in the definition of `window-state-put'): > > (min-width (cdr (assq > (if pixelwise 'min-pixel-width 'min-weight) > head))) > > binds `min-width' to `nil' because `'min-weight' is (correctly) not in > the input alist. > > and so: > (> min-width (window-size window t pixelwise))) > causes the error. > > Whereas, if you substitute the incorrect key it's currently using, > `'min-weight' for `'min-width', in the input alist, then it does not > error. But that would be invalid because it's supposed to use > `'min-width', like `window-state-get' returns. > > This mistake was introduced in commit 880e615 "Support resizing frames > and windows pixelwise." in the year 2013. Previously, `'min-width' had > been used, but when that commit introduced `'min-pixel-width' it also > typoed as `'min-weight' its attempt at preserving the `'min-width'. > > I'll be submitting a patch to fix this. > > The fix is simply: > > --- a/lisp/window.el > +++ b/lisp/window.el > @@ -6803,7 +6803,7 @@ was killed since STATE was made, it will consult the variable > (if pixelwise 'min-pixel-height 'min-height) > head))) > (min-width (cdr (assq > - (if pixelwise 'min-pixel-width 'min-weight) > + (if pixelwise 'min-pixel-width 'min-width) > head))) > ;; Bind the following two variables. `window--state-put-1' has > ;; to fully control them (see Bug#50867 and Bug#64405). Thanks, fixed on the emacs-30 branch, and closing the bug.