Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



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


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


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.


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.


I suppose (strictly speaking it's easier to C-x o into the terminal frame or Alt-tab to the terminal window; but it's negligble either way), but the "cost" is not really about invoking it, but learning it for an unclear payoff. Everything is different for me in dired window, navigation doesn't work the way it does in a text buffer, you have to drill down and up in steps.

On the occasion where I'm even tempted to interact with a list of files, it seems easier to do

  git diff development --name-only | gci | ocgv | sco -exp fullname | xargs e
And then pick from the list and boom, they're all in buffers. I mean, sure, that's because I set it up that way (in particular the emacsclient wrapper e, which does other smart things like find the TRAMP server, etc. etc.), and presumably there's an equivalent in dired but the distance from here to there seems paved with a lot of clunkiness. The nice thing about using the shell is that I can add to or subtract from these expressions and manipulations at will.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: