emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dired delete(d) the wrong file!


From: Eli Zaretskii
Subject: Re: Dired delete(d) the wrong file!
Date: Fri, 05 Jul 2024 13:52:25 +0300

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Fri, 5 Jul 2024 09:53:05 +0000
> Cc: luangruo@yahoo.com, emacs-devel@gnu.org
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > diff --git a/lisp/files.el b/lisp/files.el
> > index 042b8e2..c518273 100644
> > --- a/lisp/files.el
> > +++ b/lisp/files.el
> > @@ -8087,8 +8087,8 @@ insert-directory-clean
> >               (end (insert-directory-adj-pos
> >                     (+ beg (read (current-buffer)))
> >                     error-lines)))
> > -         (if (memq (char-after end) '(?\n ?\s))
> > -             ;; End is followed by \n or by " -> ".
> > +         (if (memq (char-after end) '(?\n ?\s ?/ ?* ?@ ?% ?= ?|))
> > +             ;; End is followed by \n or by output of -F.
> >               (put-text-property start end 'dired-filename t)
> >             ;; It seems that we can't trust ls's output as to
> >             ;; byte positions of filenames.
> >
> 
> It would be useful to have a test for this, BTW.

I agree.  Patches welcome.

Note that the problem does not exist if ls-lisp is used, so the test
should specifically test the configuration where that is not so.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]