GNU bug report logs -
#76732
30.1; image-dired fails with files with only open bracket
Previous Next
Reported by: Sanel Zukan <sanelz <at> gmail.com>
Date: Tue, 4 Mar 2025 04:31:01 UTC
Severity: normal
Found in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 76732-done <at> debbugs.gnu.org (full text, mbox):
Sanel Zukan <sanelz <at> gmail.com> writes:
> Hi,
>
> When image-dired is run on folder where at least one file has open
> bracket ('[') in it's name, without closing bracket, it will fail with
> this stacktrace:
>
> Debugger entered--Lisp error: (invalid-regexp "Unmatched [ or [^")
> search-forward-regexp("^/home/user/ooo/[img.png" nil t)
> image-dired-list-tags("/home/user/ooo/[img.png")
> image-dired-insert-thumbnail("/home/user/.emacs.d/image-dired/7099b45a60beaf2cdfa5d644d7cc5ad99d915ca0.jpg" "/home/user/ooo/[img.png" #<buffer ooo>)
> image-dired-display-thumbs()
> image-dired("~/ooo/")
> funcall-interactively(image-dired "~/ooo/")
> call-interactively(image-dired record nil)
> command-execute(image-dired record)
> execute-extended-command(nil "image-dired" nil)
> funcall-interactively(execute-extended-command nil "image-dired" nil)
> call-interactively(execute-extended-command nil nil)
> command-execute(execute-extended-command)
>
> To reproduce it:
>
> 1. Start Emacs with "emacs -Q"
> 2. Create temporary folder and copy one png file to it and rename it to
> '[img.png'.
> 3. Try to open that folder with image-dired. You should get stacktrace
> as above.
>
> It will fail also with files like 'im[g.png' but not with files with
> only closed bracket. E.g. this works: ']img.png' or 'im]g.png'.
Thanks for the bug report!
This is actually already fixed on master. I have now backported the fix
to the emacs-30 branch, which means that it will be in Emacs 30.2.
I'm therefore closing this bug report.
This bug report was last modified 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.