From unknown Sat Aug 09 18:41:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79152: [PATCH] ibuffer-update-title-and-summary: Fix out of range error Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: eliz@gnu.org, bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Aug 2025 11:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 79152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 79152@debbugs.gnu.org Cc: Eli Zaretskii X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: Eli Zaretskii Received: via spool by submit@debbugs.gnu.org id=B.175413333811224 (code B ref -1); Sat, 02 Aug 2025 11:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Aug 2025 11:15:38 +0000 Received: from localhost ([127.0.0.1]:34654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiADB-0002uw-Ab for submit@debbugs.gnu.org; Sat, 02 Aug 2025 07:15:37 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49818) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiAD8-0002ud-J7 for submit@debbugs.gnu.org; Sat, 02 Aug 2025 07:15:35 -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 1uiAD2-0000YL-37 for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2025 07:15:28 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiACy-00071I-PX for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2025 07:15:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: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=uO9oBhJp11QMnOa4rzXSSpv8cz1IXY2Vhke5jGu7q1g=; b=VY6sNgQRBtOThpP7JYORMNyVN3 OVuOcpkFxUt/O/poEhMfLgxofRNUFRWmH23FFaCe9NBbqFR82tcX2rOH0Ze8EfP2hCg/mcA5nzqvP SeDJm49Buq36Lqb30F4XIvz0taEZkflsbb9SJBYA38bZbd7VM6+VzQ/xot+aBXIOAThk=; From: Daniel Mendler Date: Sat, 02 Aug 2025 13:15:20 +0200 Message-ID: <875xf6ezzr.fsf@daniel-mendler.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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.1 (/) --=-=-= Content-Type: text/plain Tags: patch This patch fixes an error in Ibuffer when the buffer list is empty and `ibuffer-use-header-line' is set to the value `title', which has been introduced recently. In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-07-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux 13 (trixie) Configured using: 'configure --prefix=$HOME/.local/share/emacs --without-compress-install --with-tree-sitter --with-native-compilation --with-dbus --without-selinux --without-threads --disable-gc-mark-trace --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --with-xinput2 --with-x-toolkit=gtk3 --without-toolkit-scroll-bars 'CFLAGS=-O3 -mtune=native -march=native'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-ibuffer-update-title-and-summary-Fix-out-of-range-er.patch >From 326c4f6d46ae40fdb2ff77d43eb049cd0020e1b2 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sat, 2 Aug 2025 13:07:58 +0200 Subject: [PATCH] ibuffer-update-title-and-summary: Fix out of range error When `ibuffer-use-header-line' is set to `title' and the buffer list contains no buffers due to a filter, `ibuffer-update-title-and-summary' errors with an "Args out of range: 0, 0" error. * lisp/ibuffer.el (ibuffer-update-title-and-summary): Check if buffer is empty to prevent out of range error. --- lisp/ibuffer.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 95deb2db478..ae7e8dd4117 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2136,7 +2136,8 @@ ibuffer-update-title-and-summary `(ibuffer-title t font-lock-face ,ibuffer-title-face))) ;; Now, insert the summary columns. (goto-char (point-max)) - (if (get-text-property (1- (point-max)) 'ibuffer-summary) + (if (and (> (point-max) (point-min)) + (get-text-property (1- (point-max)) 'ibuffer-summary)) (delete-region (previous-single-property-change (point-max) 'ibuffer-summary) (point-max))) -- 2.47.2 --=-=-=-- From unknown Sat Aug 09 18:41:42 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Daniel Mendler Subject: bug#79152: closed (Re: bug#79152: [PATCH] ibuffer-update-title-and-summary: Fix out of range error) Message-ID: References: <867bzlsvk9.fsf@gnu.org> <875xf6ezzr.fsf@daniel-mendler.de> X-Gnu-PR-Message: they-closed 79152 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 79152@debbugs.gnu.org Date: Sat, 02 Aug 2025 13:28:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1754141282-21133-1" This is a multi-part message in MIME format... ------------=_1754141282-21133-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #79152: [PATCH] ibuffer-update-title-and-summary: Fix out of range error which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 79152@debbugs.gnu.org. --=20 79152: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D79152 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1754141282-21133-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 79152-done) by debbugs.gnu.org; 2 Aug 2025 13:27:29 +0000 Received: from localhost ([127.0.0.1]:35057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiCGm-0005TQ-Jh for submit@debbugs.gnu.org; Sat, 02 Aug 2025 09:27:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34204) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiCGj-0005T4-JO for 79152-done@debbugs.gnu.org; Sat, 02 Aug 2025 09:27:26 -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 1uiCGd-0001f8-Lp; Sat, 02 Aug 2025 09:27:19 -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=KyEbNM+JMz7ux3R8RKWQtiUaABVSCVQuUaCes7qkUFI=; b=fJwMgucOS9bC lP0nb6v3gz6oDtMBYcwj9kfrMivFluSmrxoHoS5J8w/xfGshahQmuEZEhsmFGQ4h/wm2NHjue8Oxv rLZR3pyKHT9ugKvgrvPO5GLT+nhrSugPm+Jfd3oJtgE5uc2RMA2qSTVAfnNS+r4hYEQFjBsK0s0s6 E2JgkppvmyFh8kp21kRiUcN96dx0V5WM3rUZg6g0yGiR0Ujkg9iZ4KzBjSI5H0+kaDXr3RMVq2zdl nIFW/y8u82krbtseBdFtJn9PEFED6/VaCkIGFN8pGvXBAUDclteecsnM/6/WXBA9i8UqH8JKnZiY5 p46D9fzvPNUdE5c2DZ1kjw==; Date: Sat, 02 Aug 2025 16:27:18 +0300 Message-Id: <867bzlsvk9.fsf@gnu.org> From: Eli Zaretskii To: Daniel Mendler In-Reply-To: <875xf6ezzr.fsf@daniel-mendler.de> (message from Daniel Mendler on Sat, 02 Aug 2025 13:15:20 +0200) Subject: Re: bug#79152: [PATCH] ibuffer-update-title-and-summary: Fix out of range error References: <875xf6ezzr.fsf@daniel-mendler.de> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79152-done Cc: 79152-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: Eli Zaretskii > From: Daniel Mendler > Date: Sat, 02 Aug 2025 13:15:20 +0200 > > This patch fixes an error in Ibuffer when the buffer list is empty and > `ibuffer-use-header-line' is set to the value `title', which has been > introduced recently. Thanks, installed on master and closing the bug. P.S. There's no need to CC me on bug reports, as I'm reading the bug list all the time. ------------=_1754141282-21133-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 2 Aug 2025 11:15:38 +0000 Received: from localhost ([127.0.0.1]:34654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiADB-0002uw-Ab for submit@debbugs.gnu.org; Sat, 02 Aug 2025 07:15:37 -0400 Received: from lists.gnu.org ([2001:470:142::17]:49818) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiAD8-0002ud-J7 for submit@debbugs.gnu.org; Sat, 02 Aug 2025 07:15:35 -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 1uiAD2-0000YL-37 for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2025 07:15:28 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uiACy-00071I-PX for bug-gnu-emacs@gnu.org; Sat, 02 Aug 2025 07:15:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding: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=uO9oBhJp11QMnOa4rzXSSpv8cz1IXY2Vhke5jGu7q1g=; b=VY6sNgQRBtOThpP7JYORMNyVN3 OVuOcpkFxUt/O/poEhMfLgxofRNUFRWmH23FFaCe9NBbqFR82tcX2rOH0Ze8EfP2hCg/mcA5nzqvP SeDJm49Buq36Lqb30F4XIvz0taEZkflsbb9SJBYA38bZbd7VM6+VzQ/xot+aBXIOAThk=; From: Daniel Mendler To: bug-gnu-emacs@gnu.org Subject: [PATCH] ibuffer-update-title-and-summary: Fix out of range error X-Debbugs-Cc: Eli Zaretskii Date: Sat, 02 Aug 2025 13:15:20 +0200 Message-ID: <875xf6ezzr.fsf@daniel-mendler.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a01:4f8:c012:9177::1; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) 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.1 (/) --=-=-= Content-Type: text/plain Tags: patch This patch fixes an error in Ibuffer when the buffer list is empty and `ibuffer-use-header-line' is set to the value `title', which has been introduced recently. In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.49, cairo version 1.18.4) of 2025-07-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12101016 System Description: Debian GNU/Linux 13 (trixie) Configured using: 'configure --prefix=$HOME/.local/share/emacs --without-compress-install --with-tree-sitter --with-native-compilation --with-dbus --without-selinux --without-threads --disable-gc-mark-trace --without-gsettings --without-gpm --with-cairo --with-cairo-xcb --with-xinput2 --with-x-toolkit=gtk3 --without-toolkit-scroll-bars 'CFLAGS=-O3 -mtune=native -march=native'' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-ibuffer-update-title-and-summary-Fix-out-of-range-er.patch >From 326c4f6d46ae40fdb2ff77d43eb049cd0020e1b2 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sat, 2 Aug 2025 13:07:58 +0200 Subject: [PATCH] ibuffer-update-title-and-summary: Fix out of range error When `ibuffer-use-header-line' is set to `title' and the buffer list contains no buffers due to a filter, `ibuffer-update-title-and-summary' errors with an "Args out of range: 0, 0" error. * lisp/ibuffer.el (ibuffer-update-title-and-summary): Check if buffer is empty to prevent out of range error. --- lisp/ibuffer.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index 95deb2db478..ae7e8dd4117 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2136,7 +2136,8 @@ ibuffer-update-title-and-summary `(ibuffer-title t font-lock-face ,ibuffer-title-face))) ;; Now, insert the summary columns. (goto-char (point-max)) - (if (get-text-property (1- (point-max)) 'ibuffer-summary) + (if (and (> (point-max) (point-min)) + (get-text-property (1- (point-max)) 'ibuffer-summary)) (delete-region (previous-single-property-change (point-max) 'ibuffer-summary) (point-max))) -- 2.47.2 --=-=-=-- ------------=_1754141282-21133-1-- From unknown Sat Aug 09 18:41:42 2025 X-Loop: help-debbugs@gnu.org Subject: bug#79152: [PATCH] ibuffer-update-title-and-summary: Fix out of range error Resent-From: Daniel Mendler Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Aug 2025 13:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 79152 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 79152-done@debbugs.gnu.org Received: via spool by 79152-done@debbugs.gnu.org id=D79152.175414170422675 (code D ref 79152); Sat, 02 Aug 2025 13:36:02 +0000 Received: (at 79152-done) by debbugs.gnu.org; 2 Aug 2025 13:35:04 +0000 Received: from localhost ([127.0.0.1]:35107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uiCO8-0005tf-02 for submit@debbugs.gnu.org; Sat, 02 Aug 2025 09:35:04 -0400 Received: from server.qxqx.de ([2a01:4f8:c012:9177::1]:50915 helo=mail.qxqx.de) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uiCO5-0005t6-MH for 79152-done@debbugs.gnu.org; Sat, 02 Aug 2025 09:35:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=daniel-mendler.de; s=key; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SURfKUfaslOtbbEb5CF/5YMPNKeXOhJXTEvZEcYeY+E=; b=pyArJbS3hep/M0ldqp3g8AnuPr 0Mz18S90rNXf9zcoanlwUGSiGXZFYammlk9W21Y/IYG1QZ2aoqSqHQ7ALpL2hxs0rq653ebYa1lu1 vzMLQl5NgO0peAVtanktmDwpQF45dGB2CBI80cBJfneZH/iCmJYM2JV3UYf30QXhvYl4=; From: Daniel Mendler In-Reply-To: <867bzlsvk9.fsf@gnu.org> References: <875xf6ezzr.fsf@daniel-mendler.de> <867bzlsvk9.fsf@gnu.org> Date: Sat, 02 Aug 2025 15:34:54 +0200 Message-ID: <87zfchoni9.fsf@daniel-mendler.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) 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: -1.7 (-) Eli Zaretskii writes: >> Cc: Eli Zaretskii >> From: Daniel Mendler >> Date: Sat, 02 Aug 2025 13:15:20 +0200 >> >> This patch fixes an error in Ibuffer when the buffer list is empty and >> `ibuffer-use-header-line' is set to the value `title', which has been >> introduced recently. > > Thanks, installed on master and closing the bug. > > P.S. There's no need to CC me on bug reports, as I'm reading the bug > list all the time. Thanks, good to know.