GNU bug report logs - #62096
30.0.50; find-dired, dired-goto-file and spaces

Previous Next

Package: emacs;

Reported by: Manuel Giraud <manuel <at> ledu-giraud.fr>

Date: Fri, 10 Mar 2023 14:55:02 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Martín <mardani29 <at> yahoo.es>
Cc: 62096 <at> debbugs.gnu.org, stephen.berman <at> gmx.net, manuel <at> ledu-giraud.fr, drew.adams <at> oracle.com
Subject: bug#62096: 30.0.50; find-dired, dired-goto-file and spaces
Date: Sat, 11 Mar 2023 14:00:50 +0200
> Cc: stephen.berman <at> gmx.net, drew.adams <at> oracle.com, manuel <at> ledu-giraud.fr
> Date: Fri, 10 Mar 2023 21:48:04 +0100
> From:  Daniel Martín via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Manuel Giraud via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <bug-gnu-emacs <at> gnu.org> writes:
> 
> > Ok, so commenting the string-replace at dired.el:3529 in
> > 'dired-goto-file-1' (ie. not replacing " " with "\\ ") does the trick
> > for me...
> >
> > That being said those are here for a reason.  It might be a difference
> > between OpenBSD's find and the GNU one (I don't know for Windows).
> 
> This bug also affects macOS.  After reading the code I'd say that, even
> on GNU/Linux, there are probably other corner cases where
> dired-goto-file would fail:
> 
> ;; FIXME: to fix this for embedded control characters etc, we
> ;; should escape everything that `ls -b' does.
> (setq str (string-replace " " "\\ "  str)
>       str (string-replace "\t" "\\t" str)
>       str (string-replace "\n" "\\n" str))
> 
> For example, on GNU/Linux, ls -b outputs:
> 
> vacation\ 2022
> 
> while on macOS it outputs:
> 
> vacation 2022

Shouldn't we be talking ab out what "find ... -ls" produces instead?




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.