all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: michael_heerdegen@web.de, 70593@debbugs.gnu.org
Cc: eliz@gnu.org
Subject: bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken
Date: Fri, 10 May 2024 16:52:04 +0000	[thread overview]
Message-ID: <SJ0PR10MB548808B6F68586B2CFF5855AF3E72@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87h6f5ddc5.fsf@web.de>

> > > 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.





  reply	other threads:[~2024-05-10 16:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 11:59 bug#70593: 30.0.50; Dired: buffers of renamed dirs are broken Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-26 14:55 ` Eli Zaretskii
2024-04-29 14:42   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 13:46     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 14:05       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 16:30       ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 19:27         ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-09 21:20           ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 12:56             ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 13:08               ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 16:52                 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-05-10 16:51               ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 17:02                 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-10 18:32                   ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-17 14:29                     ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-18 20:45   ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-19  5:32     ` Eli Zaretskii
2024-05-21 22:43       ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB548808B6F68586B2CFF5855AF3E72@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=bug-gnu-emacs@gnu.org \
    --cc=70593@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=eliz@gnu.org \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.