My favorite dired feature is that if you C-x C-q (the standard Emacs binding to toggle the read-only status of a file), it makes the directory buffer writable. You can then edit the buffer like a regular file, including changing file names (or symbolic link targets, or other things, I presume), and when you're done, C-c C-c and it applies all the changes as renamed files, symbolic link retargeting, etc etc. Very handy, since you can use all the usual Emacs features like query-replace or kmacros while doing it.
Ugh, I find dired incredibly annoying and avoid it at all costs in Emacs. You use it once and suddenly have a gazillion buffers open, it's just the worst! They don't even go away when you deliberately close them with q!
This does not solve the issue, if you enter a folder with RET (a slightly more obvious key than `a`), it still opens a new buffer for every directory. What you would have to do is to remap the key in dired's keymap. Which still doesn't solve the issue that it keeps the buffer open even though you close it with `q`, which requires some other fix.
Or: you can use a file manager that isn't made by crazy people, which is what I do. I say this as a loyal Emacs user: there are so many things in Emacs that are amazing (org-mode and magit are the two famous ones obviously, but a personal favorite is Emacs calc, which is just a work of art), but dired is not one of them.
Why do you care about open buffers? When I first started using emacs I cared because other text editors force you to care by displaying "tabs" or the like for each open buffer. But emacs is better than that. The only time I ever see all open buffers is if I do M-x list-buffers, and I never do that. Other than that, open buffers never get in the way. I do use midnight-mode to kill all "old" buffers in the middle of the night to stop the memory usage growing indefinitely, though.
A buffer per directory is just the right thing for dired to do, for the same kind of reason that it is right that git has a staging area. Your problem is that this behaviour causes friction with how you prefer to manage buffers. Some suggestions:
- With the regular buffer list, if you keep typing letters, the view will restrict to buffers containing that string
- All the usual selection narrowing options, e.g. Helm, work here
- You can rebind 'q' to 'kill-buffer-and-its-windows
- A lot of people like ibuffer, which allows you to group kinds of buffer in its buffer list, e.g. all dired buffers
When you see a “Show HN”, the odds are very high that it is written in an ergonomic language such as Python, JS, Go, or Rust, rather than C or C++. Rust is the only one of these that has native performance, so I think this is useful information.
For software that isn't in the package repository of your distro written in Rust (or Go or any other language with something similar to cargo) means I can clone the repository, run a build command and it'll likely compile easily and successfully. As a user this is much better than hunting down dev package names and versions for a C or C++ source.
Ignoring benchmarking only deps, this crate has 10 direct dependencies and 60 in total. Through some of them are just internally split's of the same dependency, e.g.: pest, pest_derive, pest_generator, pest_meta. And some are build dependencies only.
So why is the lock file so big?
1. It also locks the test dependencies, i.e. the criterion benchmarking suite which is big and it's transitive dependencies (without it's ~750 lines in the lock file).
2. The lock file is human-readable formatted, because of this every "entry" takes at least 6 lines.
3. Each entry has one additional line per dependency, but dependencies are often shared internally (e.g. libc) so this can "bloat" the lock file without adding any additional dependency.
1000 lines of Cargo.lock is 100-200 total dependencies. Importantly, a "dependency" in Rust is a little more granular than in some other languages. A single dependency might have ~4 sub-crates which are there own "dependency".
I would guess the 1000 lines of Cargo.lock represent ~32K of Rust code. That is probably no longer minimal by most definitions, but having a dependency on libc is like 200K of C so an additional 30K seems not so bad (assuming the dependencies are well known).
I probably should have said discussion instead of understanding, but as someone else said it specifies a total of 60 dependencies (I didn't check their work), if you knew that just saying "1000 line" instead is downright misleading... If you didn't I don't buy buy that you really understood it.
Also, I don't think `Cargo.lock` is a valid measure of bulk as it contains both dev and prod dependency tree. For compiled languages, the binary size probably can be a better measurement, but that's also debatable since c and c++ use shared libraries while rust uses self-contained ones.