Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dirivish-toggle-subtree Gives error: "Not a directory" [Bug] #106

Closed
3 tasks done
tdstoff opened this issue Jul 25, 2022 · 11 comments
Closed
3 tasks done

dirivish-toggle-subtree Gives error: "Not a directory" [Bug] #106

tdstoff opened this issue Jul 25, 2022 · 11 comments
Labels
bug Something isn't working

Comments

@tdstoff
Copy link

tdstoff commented Jul 25, 2022

Thank you for the bug report

  • I am using the latest version of dirvish related packages.
  • I checked FAQ|CUSTOMIZING|EXTENSIONS.
  • You may also try reproduce the issue using clean environment and minimal configurations with
    the command emacs -Q.

Bug description

My config gives the error "Not a directory" when I run dirvish-toggle-subtree (TAB) on lines that are clearly directories in a dirvish buffer, and thus doesn't expand into a subtree.

Steps to reproduce

I think this is a clash with either one of the Doom modules I have installed or another package I import, as running the vanilla Doom config doesn't reproduce the issue. I attach my init.el (Doom modules) and packages.el (other packages) which produces the issue for me if I just put the Dirvish sample config in config.el.

Looking for any suggestions on how to debug this, as dirvish-toggle-subtree works wonderfully from what I've seen. I've tried disabling basically every minor mode I could in the Dirvish buffer to no avail. Tried this running both Emacs 28 and 29. I see where the error gets called in dirvish-subtree.el, but don't understand exactly how the directory paths are processed there.

packages.el.txt
init.el.txt

Expected behavior

dirvish-toggle-subtree Should neatly expand or collapse directories.

OS

MacOS

Emacs Version

28

Emacs Configurations

Doom Emacs

Error callstack

I tried this, and the user-error call for some reason doesn't send me into debug mode.

Anything else

I've noticed too that diff-hl-dired is not integrating properly with the git-msg extension, as they both show in the margin at once. Perhaps these issues are related, as this issue has the same persistence.

image
image

@tdstoff tdstoff added the bug Something isn't working label Jul 25, 2022
@alexluigit
Copy link
Owner

alexluigit commented Jul 25, 2022

Go to the dirvish buffer that you can reproduce the error with the dired-hide-details-mode turned off (shift + 9), what is the first character of that line (more specifically the first char in the priv column)?

I've noticed too that diff-hl-dired is not integrating properly with the git-msg extension, as they both show in the margin at once. Perhaps these issues are related, as this issue has the same persistence.

As is documented here, you should just turn off diff-hl-dired-mode and disable the dired-git-info in the dired module, or you can wait for this PR get merged.

@tdstoff
Copy link
Author

tdstoff commented Jul 25, 2022

Okay, I see that about diff-hl-dired-mode now, thanks.

The error still persist with dired-hide-details-mode off. The first character you're referring to I think is the 'd'?

image

@alexluigit
Copy link
Owner

What's the output of ls --version on terminal?

@alexluigit
Copy link
Owner

Do you have --size flag in your dired-listing-switches? Would remove it work?

@tdstoff
Copy link
Author

tdstoff commented Jul 25, 2022

The --version command isn't supported on my MacOS ls. Actually, no long-formatted arguments are supported except for --size is what it looks like. Maybe this is the root of my problem?

The listing switches I currently have are "-alFtshr".

@tdstoff
Copy link
Author

tdstoff commented Jul 25, 2022

Setting the listing switches to the basic "-al" doesn't do it either.

@alexluigit
Copy link
Owner

alexluigit commented Jul 25, 2022

Install gnu ls and set your insert-directory-program to gls, then follow the instructions in this section

brew install coreutils

Just make sure "drwx...." is the first column.

@tdstoff
Copy link
Author

tdstoff commented Jul 25, 2022

Okay, running GNU coreutils now. Made sure it's on shell $PATH as well as exec-path. I can run with all the ls switches like on that page. The error actually still persists. For some reason the directory icons are blank now, don't know if that has to do with anything.

"opt/homebrew/bin/gls" is the insert-directory-program now as well.

image

@tdstoff
Copy link
Author

tdstoff commented Jul 25, 2022

Oh okay, "drwx..." is actually still not the first column. I see that's not conventional now.

image

@alexluigit
Copy link
Owner

alexluigit commented Jul 25, 2022

Remove the "--size" (or "-s") flag in your dired-listing-switches and make it to have the same form as the one in the sample config (long name flag). I don't think you'll need the "--size" flag since you enabled the file-size attribute and has it also on mode line. I'll mention it in the doc anyways.

Edit:` the icon problem is caused by the "-F" flag. I'll look into it.

@tdstoff
Copy link
Author

tdstoff commented Jul 25, 2022

Yes, that did it. Thank you!

@tdstoff tdstoff closed this as completed Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants