reddit / emacs

Dired only showing files between brackets

huron1234 · 2022-05-14 06:16
As read, when I open dired it only shows this: [Emacs Dired](https://preview.redd.it/xp4kdciwvdz81.png?width=1366&format=png&auto=webp&s=e2833255206f4623b82d6437005961a87526bcaa) However I don't want that and I want the "normal" look of dired Anyone know how to disable this? ​ FIXED: Full fix in my comment
TheFrenchPoulp · 2022-05-14 13:04
Dired typically uses `ls` output to render directories, what `ls` have you got installed? As a debugging measure, try to enable `dired-switches-in-mode-line` to see what flags are beeing passed to `ls` in Dired buffers. Alternatively, report the values for `dired-listing-switches` and `dired-actual-switches`
00-11 · 2022-05-14 15:21
Presumably you don't see this problem if you start Emacs using `emacs -Q` (no init file). If so then **bisect your init file** to find where you're shooting yourself in the foot. Bisecting is quick and requires no imagining. ;-) It's a binary search.
huron1234 · 2022-05-14 15:26
I use the "ls" from coreutils. The value of `dired-listing-switches` is `ls -ahl -v --group-directories-first` and the original value is `-al` The value of `dired-actual-switches` is `ls -ahl -v --group-directories-first` Edit: If I use that command `ls -ahl -v --group-directories-first` on the terminal (zsh) it outputs the same as seen on dired.
huron1234 · 2022-05-14 15:28
I think that's not the problem, I tried that and it still shows me the same. Thanks :D
huron1234 · 2022-05-14 17:44
Using LSP (Language Server Protocol) on Emacs and trying to install a server for bash, tries to install `bash-ls` using npm `npm install -g bash-ls`, however, for any reason it won't work at first because there's a conflict with names of `ls` from coreutils and `ls.js` from, so if you force the installation of `bash-ls` it will delete `ls` from coreutils, showing every time that output. Uninstalling `bash-ls` using `npm uninstall -g bash-ls` will uninstall that conflict, however `ls` from coreutils won't be avalaible, so you will need to reinstall `coreutils` using the package manager of the distribution.
huron1234 · 2022-05-14 17:45
Thanks a lot! You guided me to the answer, my newest comment have the fix.
TheFrenchPoulp · 2022-05-14 17:49
There's your issue then, see if there are additional aliases set under `ls` with `which`. Here is what mine shows on my MacBook: $ which -a ls ls: aliased to ls --color --group-directories-first /usr/local/opt/coreutils/libexec/gnubin/ls /bin/ls (only the first 2 results are relevant in my case) And for reference, here are my options set for Emacs: `-agho --group-directories-first`. Though I don't get JSON-like output with your flags
TheFrenchPoulp · 2022-05-14 18:11
Good find, I've never considered LSP for shell purposes but I'll keep that in mind if I do
[deleted] · 2022-05-15 02:25
[removed]