From: Stephen Berman <stephen.berman@gmx.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Michael Albinus <michael.albinus@gmx.de>,
Boruch Baum <boruch_baum@gmx.com>,
49043@debbugs.gnu.org
Subject: bug#49043: 27.1: ibuffer-toggle-filter-group [BUGFIX]
Date: Fri, 18 Jun 2021 16:11:04 +0200 [thread overview]
Message-ID: <871r8zi7pj.fsf@gmx.net> (raw)
In-Reply-To: <878s3aql10.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 16 Jun 2021 10:19:23 +0200")
On Wed, 16 Jun 2021 10:19:23 +0200 Lars Ingebrigtsen <larsi@gnus.org> wrote:
> Boruch Baum <boruch_baum@gmx.com> 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 look 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
Repository revision: 218d2d1509673d8bc67014558a31f5d0da1be5c6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
Configured using: 'configure --with-native-compilation 'CFLAGS=-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.
=> This raises a file-error (see below), but the ZIP file is deleted.
6. Type `M-x ibuffer'.
=> This raises the error "tramp-error: Method ‘archive’ is not known."
7. In the *Ibuffer* buffer type `g'.
=> This raises the error "ibuffer-current-state-list: Args out of range:
#<buffer *Ibuffer*>, 280, 332".
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
% steve 4171 Dired by name ~/
*scratch* 145 Lisp Interaction
* *Shell Command ... 114 Fundamental
*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...
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.Code1 Error when getting information for file “/tmp/test.zip”: 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
next prev parent reply other threads:[~2021-06-18 14:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 15:52 bug#49043: 27.1: ibuffer-toggle-filter-group [BUGFIX] Boruch Baum
2021-06-15 16:15 ` Lars Ingebrigtsen
2021-06-15 20:18 ` Boruch Baum
2021-06-16 8:19 ` Lars Ingebrigtsen
2021-06-16 8:26 ` Boruch Baum
2021-06-16 8:51 ` Lars Ingebrigtsen
2021-06-16 12:04 ` Eli Zaretskii
2021-06-16 17:01 ` Boruch Baum
2021-06-16 17:10 ` Eli Zaretskii
2021-06-18 14:11 ` Stephen Berman [this message]
2021-06-19 12:06 ` Lars Ingebrigtsen
2021-06-19 12:12 ` Michael Albinus
2021-06-19 15:56 ` Michael Albinus
2021-06-19 19:56 ` Stephen Berman
2021-06-19 21:41 ` Stephen Berman
2021-06-20 8:12 ` Boruch Baum
2021-06-20 14:29 ` Michael Albinus
2021-06-21 12:25 ` Lars Ingebrigtsen
2021-06-15 16:20 ` Eli Zaretskii
2021-06-15 20:13 ` Boruch Baum
2021-06-15 20:39 ` Boruch Baum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871r8zi7pj.fsf@gmx.net \
--to=stephen.berman@gmx.net \
--cc=49043@debbugs.gnu.org \
--cc=boruch_baum@gmx.com \
--cc=larsi@gnus.org \
--cc=michael.albinus@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).