From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#49043: 27.1: ibuffer-toggle-filter-group [BUGFIX] Date: Fri, 18 Jun 2021 16:11:04 +0200 Message-ID: <871r8zi7pj.fsf@gmx.net> References: <20210615155231.75wevy3wtzu4vx7l@E15-2016.optimum.net> <87k0mvrto4.fsf@gnus.org> <20210615201851.jwnjx23qptp3agp7@E15-2016.optimum.net> <878s3aql10.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5549"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Michael Albinus , Boruch Baum , 49043@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 18 16:15:07 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1luFH0-0001GF-Rd for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 16:15:06 +0200 Original-Received: from localhost ([::1]:36492 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luFGz-0007O5-Lt for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 18 Jun 2021 10:15:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luFE3-00016P-5H for bug-gnu-emacs@gnu.org; Fri, 18 Jun 2021 10:12:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45964) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luFE2-0002nn-QP for bug-gnu-emacs@gnu.org; Fri, 18 Jun 2021 10:12:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luFE2-0008Fb-Gm for bug-gnu-emacs@gnu.org; Fri, 18 Jun 2021 10:12:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Jun 2021 14:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49043 X-GNU-PR-Package: emacs Original-Received: via spool by 49043-submit@debbugs.gnu.org id=B49043.162402547431657 (code B ref 49043); Fri, 18 Jun 2021 14:12:02 +0000 Original-Received: (at 49043) by debbugs.gnu.org; 18 Jun 2021 14:11:14 +0000 Original-Received: from localhost ([127.0.0.1]:57510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luFDF-0008EW-Qm for submit@debbugs.gnu.org; Fri, 18 Jun 2021 10:11:14 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:42083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luFDD-0008EH-Ot for 49043@debbugs.gnu.org; Fri, 18 Jun 2021 10:11:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1624025465; bh=7ESAoLZ1f6fYtYweC3wN2Lnz3n1Gjm1GVPc9YCt/JYs=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=Fr5T5a38OIfchkM0efE9vRhTKsrJFZGRZ0+70PTqDKg3PC35jk03hMxcvhvNQb4FM 97Q61pJ3qnowYUAVOFdg6J6+BwLWvKKhqKnuhUzXOjCaW66182CfjcN+RdvlbNwBKC FPilnIxGsEAFrFnnfMnDhVBfdJ1RTJ3+b3pdCAWs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs ([178.6.216.50]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N7iCW-1lH74l11Ws-014lpf; Fri, 18 Jun 2021 16:11:05 +0200 In-Reply-To: <878s3aql10.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 16 Jun 2021 10:19:23 +0200") X-Provags-ID: V03:K1:Ud9X10Oj+EsbAXi2Kz/y5xVbSrtz/yMk6H2OhJ2vDG3yGCaFCxO 1CxtPX0ZPmmkRFK0drc24edFIoZfzHbqZjdcDTn+Of1N23+4raKsBhCbnPpQ3QLLcJYwtqR sWPH4l+fO4YqDAu+0tT5y07b3w9LV1w6V6dL7sUCM4McEqn9Dr2czhhl7TsKkqaVbzXZke9 frzFGLa+cbxiRI3XoPdtA== X-UI-Out-Filterresults: notjunk:1;V03:K0:fzHzrfgrs00=:+WxxipdXE1VeYlQ69dxmMI JCePTKE+rF+/Xs2Uo78O3HmJ3Kqq7tKPkf5se1f5FIKc4ydHME5jgGWja6wFWCSVJXQ9OB7p1 F5k4QsmOHwfjaKZfNROkULbANPo0iXeZeE/LW9iwVABsWQbCnZ3lRWtLwQiawKMTCOq8kT5+r q1n3J7hfK81cayF3+ym6bJ7Gbv+qv9xLo5JnJKYyJBdVrIs25GpQRj056u6pKBnOcRbtrzAdr MoxzVb/K48613xSqw7uHGIlgTiIzMGf5lTt1FS88iTN7q+7/gW6VlHYVnyQA4mQo3fb0pEZ8Z T64Ivh3s7gxTvvixj9C4YMDcCVIZB14UwA+RUFdVdRo8ZS7lEjf1iS7vDSEyArrmQj0RGnH0B PEI91r79xOFMw70StD+MKqh/fi135NRUJxiNAV5WrH2GIymzAalOEYU5xxl2tgidruxS2DBgv NmUkWRII83tW1JpZj+//8zEQ4W5hMycpo+kp812i1EUoIdalX1w+RPfc58ZcsKSFhpFW3JuyF uJUjBj33CRGVA5r05k1yyx+CQs7kmI1lTg/P6E1PjR1p9JPHgU0QOh5VIhHtdWnH/90sa0BwW dryhqojCgKVzBy7DqFn9yptP7KkDNaLMPSII2B0p0s7EgIdpbWh/YWHhz1RsWRyCBPjWTNSOH KpFji4oQBOjlAZVW8tX+58dSvtWk1RyHcT8r5/jSuuIrjJiolRULMCPY64cdenBE/GpPrpdFh el3f6/n9K/jZMzCq957RAgCCMSC0rUtvTd/DXFC7SO/TIISuL3mlwPszlst/znt+9ZicXcGo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208694 Archived-At: On Wed, 16 Jun 2021 10:19:23 +0200 Lars Ingebrigtsen wrote: > Boruch Baum writes: > >> Oops. I misquoted the code (because I had submitted the report after I >> had made/tested/byte-compiled/over-writte my only local copy). If you lo= ok at the >> code on the gnu cgit instance, at line 1907, you'll see that it adds one >> to the line-end-position before passing the value the function >> delete-region. > > Right -- so I guess the problem here is that the last line of the buffer > doesn't have a newline... but skimming the code (I'm not super-familiar > with ibuffer), it seems like the final non-newline line is a summary > line and should be kept out of the sorting/filtering process? (If > there's a "buffer line" without a newline, it'll mess up the display > after filtering.) > > So I think that perhaps the bug is somewhere else, but it's hard to say > without a recipe that reproduces the bug. > > Do you have a test case? I do. It's the result of an error being raised in Tramp. Here's the recipe (reliably reproducible on GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.29, cairo version 1.17.4) of 2021-06-06 built on strobelfs=20 Repository revision: 218d2d1509673d8bc67014558a31f5d0da1be5c6 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 Configured using: 'configure --with-native-compilation 'CFLAGS=3D-Og -g3'' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XDBE XIM XPM GTK3 ZLIB ): 0. emacs -Q 1. Create a nonempty ZIP file test.zip (content is irrelevant). 2. Visit the directory containing test.zip in Dired. 3. Type `M-x load-library RET dired-x RET'. 4. With point on the Dired line containing test.zip type `M-!', which prompts with "! on test.zip {3 guesses} [unzip]:" and type RET to execute unzip (this of course requires having the unzip program). 5. With point still on the test.zip line type `D' and at the prompt `y' to delete the ZIP file. =3D> This raises a file-error (see below), but the ZIP file is deleted. 6. Type `M-x ibuffer'. =3D> This raises the error "tramp-error: Method =E2=80=98archive=E2=80=99 i= s not known." 7. In the *Ibuffer* buffer type `g'. =3D> This raises the error "ibuffer-current-state-list: Args out of range: #, 280, 332".=20 The latter error is apparently what the OP reported, and it's because the Ibuffer buffer is corrupted; here's what it looks like after step 7, except for the last character `|', which I added to show EOB: [ Default ] % tmp 802 Dired by name /tmp/ *% *Messages* 754 Messages=20=20=20=20=20=20=20=20=20 % steve 4171 Dired by name ~/ *scratch* 145 Lisp Interaction=20 * *Shell Command ... 114 Fundamental=20=20=20=20=20=20 *tramp/archive ... 0 Fundamental | In other words, as you deduced, the summary line is missing, so the attempt to do delete-region errors out. The corruption of the Ibuffer buffer is due to the error raised at step 6, which is triggered in ibuffer-redisplay-engine during the execution of ibuffer-insert-filter-group. This errors prevent the subsequent execution of ibuffer-update-title-and-summary, resulting in the above corrupted Ibuffer display. As for the error at step 5, which is the cause of the following errors, it is raised in tramp-gvfs-maybe-open-connection. Here's what the *Messages* buffer contains after step 5: Deleting...=20 Waiting for git... [2 times] Tramp: Opening connection for file%3A%2F%2F%2Ftmp%2Ftest.zip using archive.= ..failed file-error: org.gtk.GDBus.UnmappedGError.Quark._g_2dio_2derror_2dquark.Code= 1 Error when getting information for file =E2=80=9C/tmp/test.zip=E2=80=9D: = No such file or directory Step 3 of the recipe is necessary to raise the above errors. I guess dired-guess-shell-command triggers Tramp file handling. CCing Michael Albinus, who should be able to solve the problem. Steve Berman