Hacker News new | ask | show | jobs
by tptacek 4 days ago
I have been using Emacs since 1994 (Lucid!) and I still don't understand Dired.
11 comments

NGL, I find the Dired UX out of the box to be frustrating given its reliance on remembering key bindings, so much so that I ended up writing both a Transient menu and a context menu for it, both available in the Casual and Anju packages on MELPA, respectively. If interested, you can read more about them in the following links: https://kickingvegas.github.io/casual/Dired-Usage.html https://kickingvegas.github.io/anju/Dired-Mode-Context-Menu....
Like you, I've been using emacs (gnu) for decades, and dired is my directory/file manipulation tool, for both linux and windows. I never see a desktop with files/folders or anything like that, it's dired for everything.

For example: Just a few minutes ago, in a directory with lots of PDFs, I did:

- wdired to rename pdfs to a consistent convention. Did this with the awesome multiple-cursors package, then interactively spell-checked and corrected my renamed pdfs. All within writeable dired :-)

- delete several non-pdf files

- mark several possible duplicate files and dired-do-shell-command with sha512sum

- move several pdfs to another directory (split window and open target dir, mark files to move, one-button move using dired-dwim-target.

- mark several pdfs and open with reader app

Obviously that's all do-able with a shell or traditional file manager GUI, but dired was a total win here.

Multiply that win by a hundred times per week, and that's a quality of life enhancement.

> dired-dwim-target

Aha! That's what's been missing in my life! Thank you.

Fun fact. DIRED pre-dates EMACS.

DIRED on ITS is also similar enough to today’s DIRED.

It has a million features I don't use. But some features are really, really nice, like C-q for editing file names (C-x-s to persist changes once done). Rectangle editing is so, so nice to have when renaming multiple files.
C-q just tells me the buffer is read-only. How does that work?
They probably mean ‘C-x C-Q’, which toggles a buffer with its read-only state. In this case it lets you edit the contents of the dired buffer (i.e directory or file names) to changing the buffer to wdired-mode, and then ‘C-x C-s’ to save the contents of the buffer, which changes the names and places the buffer back into read-only (dired-mode)
Yes, that worked! Thanks. Though it was C-c C-c to save and exit the r/w mode.
Check out sunrise-commander, it is Dired reskinned as a dual-paner. Love how convenient it is to have a powerful integrated file manager.
Is sunrise commander stable these days?

I tried using it maybe a decade ago and back then it had a tendency to mess up window layouts and leave weird buffers around. I notice there's now a GitHub repository which has two spurts of work in its history that probably didn't exist when I last used it – have they improved its usability?

wdired is still magic to me. Use it almost every day.
Try it out! It has its own learning curve, but it's convenient to use in quick and dirty situations.
Love that the "don't mess something up accidently" aka input lock is working in dired too(C-c C-q) Here it turns off input lock, so you can freely edit filenames in a dir like if it was a regular text buffer.
I think 's' is sort.

More seriously, what I would like to do is ediff files (only the differences) in two directories (have the changed files together one line after the other)

or, ediff two arbitrary lists of files and have them show up in ediff.

it's bare but i'm surprised people would get confused by it, it kinda follows the usual shortcuts over bare unix util output: mark/select, delete, rename, compress, encrypt

then maybe you dislike the low-discoverability of shortcuts, i think someone added a transient layer (aka a visible shortcut summary with some state management for options)

I have an opposite argument - no other file manager ever worked for me and I tried and keep trying so many. And not because Dired "is so much better" or "far more capable", or "has better default keybindings", or due to my muscle memory or Stockholm syndrome, no. It's because I can always introspect every single feature of it, override any command, integrate things with any other packages.

I honestly think that we (programmers) collectively went backwards when we tried to abandon Lisp. Why aren't there [popular] apps with a built-in true Lisp REPL for file management, email, version control?

Misunderstanding (or complete incomprehension) of Lisp lead us to the mess we're in today. Some may say: "people made their choice", etc. Well, like so many times in history, majority is not always right, but quite the opposite. We spent almost 2000 years building with inferior Portland cement, which degrades in seawater within decades, instead of using techniques perfected by Romans. We keep piling the crap, making CO2 emissions even worse. And only because we lost the recipe. The Pantheon built with Roman harbor concrete that strengthens in seawater still stands. Emacs is the Pantheon of software - the monumental example of what we've lost, the shining display of continuous progress in a world of regression.

It is heartbreakingly sad because there's now an entire generation that has no clue, because they have not witnessed the decades of callback hell. They don't know anything (or wouldn't even want to know) about "Beating the Averages", Greenspun's Tenth Rule, Gabriel's "Worse Is Better" and how he was so conflicted about his own essay that he spent a decade writing rebuttals under a pseudonym.

Lisp won't ever die, but it will never regain its former supremacy. Because for humans, economic/social reasons matter more than technical merits.

dirvish is nice