top | item 44076487

(no title)

trey-jones | 9 months ago

dired-mode is fairly necessary in emacs to preserve the continuity of what you are editing.

For example, if I'm editing a file called originalfilename.txt, and I decide it should be called newfilename.txt, I can mv originalfilename.txt newfilename.txt in the terminal and it's all good, but you're still editing the buffer originalfilename.txt in emacs and if you save it you will have a new file with that name.

Using dired to change the filename updates all the buffers that are using that file.

dired gets some hate, I think because it creates a lot of buffers and they tend to stick around, but it's never bothered me.

discuss

order

skydhash|9 months ago

> dired gets some hate, I think because it creates a lot of buffers and they tend to stick around, but it's never bothered me.

There's a variable in recent versions of emacs that deals with that

  dired-kill-when-opening-new-dired-buffer
I'm glad it's a switch, though. I set it to true, but I can see someone being used to the dired command to go to a specific directory, and then manage things with dired-insert-subdir.

mediumsmart|9 months ago

Useful for tramp wireguard dired too I think. Have to investigate.

partdavid|9 months ago

I'm also an emacs user in the habit of using the shell for file management, and I just deal with this mismatch. It hasn't been annoying enough for me to solve by switching to something else. But then again, I guess I don't do a lot "file management", whatever that really means.

trey-jones|9 months ago

I think it's pretty easy to learn to just M-x dired compared to however you switch to terminal in these cases and probably would be worth it. I guess we're using this "file management" term to mean delete or move - it's whatever you want it to be.