GNU bug report logs - #70593
30.0.50; Dired: buffers of renamed dirs are broken

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 26 Apr 2024 12:04:06 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: michael_heerdegen <at> web.de, 70593 <at> debbugs.gnu.org
Cc: eliz <at> gnu.org
Subject: bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken
Date: Fri, 10 May 2024 16:52:04 +0000
> > > Not sure what you mean.  Even in vanilla Emacs,
> > > I think subdir insertion is supported.  E.g.:
> > >
> > > M-: (dired (list "foobar" "/tata/file.txt"
> > >                  "/toto/dir/" "/titi/"))
> >
> > Hmm, indeed, this works in -Q.  Seems one of my local hacks broke this
> > case.
> 
> No no... not my fault: this does only work when starting from a buffer
> whose `default-directory' is a parent of the listed directories.  Else I
> get (in master emacs -Q) a buffer looking like
> 
>  /home/micha/.config:
>   drwxr-xr-x 24 micha micha 4096 Nov 22 14:27 /home/micha/Treasure
>   drwxr-xr-x  4 micha micha 4096 Mai  7 17:38 /home/micha/bin
> 
> and hitting i gives me the error "dired-insert-subdir-validate:
> /home/micha/Treasure/: Not in this directory tree".

Sorry, you're right; good point.

Dired+ redefines `dired-insert-subdir-validate'
to be a no-op, to allow inserting dirs that
aren't under `default-directory'.

And it redefines `dired-insert-subdir-newpos'
so that if arg NEW-DIR isn't a descendant of a
directory in the buffer then the new position
is at eob.

So if you load dired+.el in `emacs -Q' I think
you'll see that `i' on a directory line (any
directory line) will insert a listing of that
directory.

Or just evaluate the Dired+ definitions of
`dired-maybe-insert-subdir',
`dired-insert-subdir-validate', and
`dired-insert-subdir-newpos'.
___

However, including a nondirectory file (e.g.
"/tata/file.txt" in my example) does raise the
error, because `ls-lisp-insert-directory' tries
to insert it as a directory.  (I'm on Windows,
so ls-lisp is used.)

(file-error "Reading directory"
  "Directory doesn't exist or is inaccessible"
  "z:/path/to/the/file.txt")

(Something in my setup (but not Dired+) shows
the error message in *Messages* but doesn't
open the debugger for it.)

HTH.




This bug report was last modified 105 days ago.

Previous Next


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