GNU bug report logs - #10458
24.0.92; ! in dired on a file starting with a hyphen

Previous Next

Package: emacs;

Reported by: michael_heerdegen <at> web.de

Date: Sun, 8 Jan 2012 20:13:01 UTC

Severity: minor

Found in version 24.0.92

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #44 received at 10458 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: michael_heerdegen <at> web.de, 10458 <at> debbugs.gnu.org
Subject: Re: bug#10458: 24.0.92; ! in dired on a file starting with a hyphen
Date: Sun, 20 Feb 2022 14:50:36 +0100
Stefan Monnier <monnier <at> IRO.UMontreal.CA> writes:

> Indeed.  Quoting the file name by doing something like:
>
>     foobar '-toto' titi
>
> won't help (`foobar' won't see the quoting anyway because the shell
> will strip it away before passing the result to `foobar').
> But we could do something like:
>
>    foobar ./-toto titi
>
> which would not suffer from this problem.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

The discussion then turned to whether "--" was a possibility, and it
isn't.

But adding ./ to file names that start with - should be safe, I think?
So I've now done that in Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 56 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.