alexluigit / dirvish

A polished Dired with batteries included.
GNU General Public License v3.0
793 stars 44 forks source link

`dired-goto-file` does not index subtree entries #177

Open LemonBreezes opened 1 year ago

LemonBreezes commented 1 year ago

Thank you for the bug report

Bug description

In the dirvish-side window, dired-goto-file does not move point at all.

Steps to reproduce

I bootstrapped straight in a clean instance of Emacs, and installed straight. Then, I opened my init.el and used dirvish-side, then typed j to use dired-goto-file and selected a different file from my init.el.

Expected behavior

dired-goto-file should move point to the line containing the selected file.

OS

Linux

Emacs Version

gccemacs-29

Emacs Configurations

Doom Emacs, though I tested in emacs -Q as well.

Error callstack

No response

Anything else

No response

alexluigit commented 1 year ago

selected a different file from my init.el.

What do you mean by select a file from your init.el? This command only moves your cursor to a filename within the current directory, and it seems working fine on my Linux machine. Can you give me a more clear reproduce steps? Thanks.

LemonBreezes commented 1 year ago

selected a different file from my init.el.

What do you mean by select a file from your init.el? This command only moves your cursor to a filename within the current directory, and it seems working fine on my Linux machine. Can you give me a more clear reproduce steps? Thanks.

It seems to only happen when I am in a subtree like if I'm in a large project with nested directories and I use dirvish-side. dired-goto-file works however if the directories were inserted with dired-maybe-insert-subdir instead.

alexluigit commented 1 year ago

It seems to only happen when I am in a subtree like if I'm in a large project with nested directories

dired-goto-file only lists entries of current subdir, in other words, all subtree entries are ignored. AFAIK it's unavoidable to append an advice function on this command to meet the requirement you mentioned. But this command is widely used as a dependency in Dired, so I don't think it's a good idea. I would suggest you to use consult-line instead.