GNU bug report logs -
#62096
30.0.50; find-dired, dired-goto-file and spaces
Previous Next
Full log
Message #8 received at 62096 <at> debbugs.gnu.org (full text, mbox):
> I've found out that 'dired-goto-file' does not work with file name with
> spaces in them. It is only in buffers generated by 'find-dired' (it
> works in a "normal" dired buffer).
>
> How to reproduce:
>
> --8<---------------cut here---------------start------------->8---
> emacs -Q --eval "(find-dired \"~\" \"-type f -name \\\"*.jpg\\\"\")"
>
> j a-file-name-without-space.jpg ;; it jumps to the file
> j vacation 2022/we needed space.jpg ;; it doesn't
> --8<---------------cut here---------------end--------------->8---
>
> In GNU Emacs 30.0.50 (build 1, x86_64-unknown-openbsd7.2, cairo version
Good catch. I can confirm seeing the bug (on
MS Windows) also in 28.2 and older versions.
The problem appears to be in `dired-get-filename'.
FWIW, I also see it in my (Dired+) code, except
that in my code I see it only for a file name
that starts with a space, not also for a name
that just has an embedded space. E.g, I see the
problem for " space-prefixed-filename" but not
for file "has embedded space".
Not sure what the right fix would be.
This bug report was last modified 2 years and 92 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.