GNU bug report logs -
#48301
28.0.50; Dired asks if buffer "" should be deleted with ls flag -p
Previous Next
Reported by: Tassilo Horn <tsdh <at> gnu.org>
Date: Sat, 8 May 2021 22:01:01 UTC
Severity: normal
Tags: moreinfo
Found in version 28.0.50
Done: Tassilo Horn <tsdh <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>> 1. emacs -Q
>> 2. (setq dired-listing-switches "-Alhp") ;; the -p prints dirs as foo/,
>> ;; i.e., with trailing /.
>> 3. M-x dired RET ~ RET
>> 4. Visit directory ~/foobar in dired
>> 5. Delete ~/foobar directory in dired
>> 6. Dired asks: "Kill Dired buffer of , too?" where it should ask if the
>> buffer of foobar should be killed.
>>
>> The reason is that with the -p flag to ls which prints directories with
>> trailing slash, `dired-clean-up-after-deletion' is called with filename
>> FN "/home/foo/foobar/" and then (file-name-nondirectory
>> "/home/foo/foobar/") returns "".
>
> I'm unable to reproduce this bug in Emacs 28 -- I get no prompt at all
> when deleting the foobar directory (when testing with "emacs -Q").
> Are there some missing steps here?
Oh, I'm sorry, you are right. It seems that one needs to require
dired-x, too. So here a completed/amended recipe:
>> 1. emacs -Q
>> 2. (setq dired-listing-switches "-Alhp") ;; the -p prints dirs as foo/,
>> ;; i.e., with trailing /.
2.1 (require 'dired-x)
>> 3. M-x dired RET ~ RET
3.1 Create foobar subdir using `+ foobar RET'
3.2 Refresh using `g' because only then the new foobar directory will be
shown as foobar/ instead of foobar (without the trailing /).
>> 4. Visit directory ~/foobar/ in dired (a new dired buffer)
>> 5. Delete ~/foobar/ directory in the original dired buffer
>> 6. Dired asks: "Kill Dired buffer of , too?" where it should ask if the
>> buffer of foobar should be killed.
Bye,
Tassilo
This bug report was last modified 4 years and 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.