378 points · by pimeys · 3y ago · 308 comments
Every time a new IDE arrived, crowds cheered, and it was all the rage and fashion, while my Emacs was called "obsolete", "hard to use", "bizarre", and other things. I spent some time over those 30 years looking at new IDEs, trying them out, configuring them, and each and every time this was time wasted, because the IDE was discontinued, abandoned, or otherwise became useless.
If I could tell something to my younger self, it would be: keep faith in solutions that are open and have been around for a while, you will save a lot of time over the years.
I was pleasantly surprised when I was issued a mac at work that most of the basic editing commands on macos text widgets support emacs key bindings (ctrl+a/e/k/p/n).
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs"
Sadly, I think support was removed. Part of the problem was that this and other themes were in conflict with preset bindings, e.g C-p for a print dialog.Well, Emacs isn't designed for a common user, but for a power user. From my experience, first time using Emacs was really frustrated.
In contrary, VSCode, Atom, Sublime Text etc. were usable right from the start. But these IDEs didn't stick for me. Easy come, easy go, I guess.
Emacs and Vim, although took a lot of effort to configure them into usable text editors/IDEs, stick with me 'til these days and I'm continuing to use them in the future. The power of configurations are astounding and I can shape them into whatever I want.
That's not different from a piano. Musical instruments are not designed for "common users" or "beginners". The ones that are, are not good for playing good music.
As a daily emacs user, it is all those things. It's just also awesome if you put in the time to get over the hump and learn it.
The "out of box" experience for emacs is really, really bad.
That's not much different from a piano :-). Musical instruments are not designed for "common users" or "beginners". The ones that are, are not good for playing good music.
"wasted" sounds a bit too hard to me. If you learn and use some tool productively for some years, even if this stops, the years were not wasted. Ephemeral things can also have value.
When I was young (and, ahem, stupid), I didn't care — I was all gung-ho, shoot from the hip, and if something breaks, tough. As I matured, I learned that backwards compatibility and long-term maintenance should be valued and cherished. Not just because if you're not careful, you have to fix the things that break, but also because as you start doing more and more things in your life, you have less time for each thing and you'd rather move forward rather than spend time fixing things that break.
I blame sTeve jObs.
Source: a certain developer/admin/netadmin with >30 years of experience using open source software.
I doubt if Emacs was a commercial product, that many people would bother to use it, same applies to VI derivatives.
If the experiece is above anything else out there, certainly it is worth paying for.
Similar executable org-mode files are used to configure the environment (sway) and personal information management (email, calendar & contacts). The latter one got so complicated that I had to add an integration diagram using the draw.io app.
Why settle for an extra layer of indirection that makes interactively working with source code more time consuming?
Your comment reveals your bias - that the code is more important than the commentary. The counterpoint is:
No. You can't make the documentation as rich as you want. I want inline images. Can I put those in an .el file? Links. Tables. Bold, italics, etc. For many, this is more important than the code in the config.
Thanks for adding this. Literate programming with org-mode is indeed one of my favorite from Emacs.
Yep! That's the key, imo. I love using Org mode wherever I feel that documentation is primary. So right now, most of my code that lives in Org files at work is shell snippets I've used for managing and configuring software. The literate approach is all I need there: I'm keeping track of what configuration I've done, not writing a giant, complicated program. Then I get the added benefit: the Org files form a wiki that I can use to refer colleagues to whether they use or care for Emacs or not!
Similarly, tangling shell snippets into scripts lets you write tests for your documentation! The examples become scripts and then the scripts can be run and verified in CI.
I understand what you mean. But it never seemed to be a problem for me. Anyway, the real reason why I ended up with org-mode is that I heavily customize Emacs. The only way to be able to handle that much configuration was to split it up into a dozen or so elisp files. Org-mode's biggest advantage (for me) is that it can manage complexity very well. The org-mode configuration file is neatly divided into topics along with their documentation. The topics are also folded up - so it's very easy to find certain configuration segment.
Amazing that this is offered up as a selling point. If I didn't know I was reading a thread full of emacs users, I'd think this was a parody of a thread full of emacs users.
Haha! Indeed! Let me just clarify what I meant. I have a personal information management (email, calendar & contacts) where all information is stored locally and offline. The advantage is that I will never be locked out of my own data. However, this setup has so many components for syncing the info online and to interact with it. Quite frankly many of those components should be integrated into a single application. For example, mbsync can sync mail to a mail directory. But it needs go-imapnotify to trigger it when I receive a new mail. It's so frustrating that I considered writing those applications myself.
In short, Emacs has nothing to do with the complexity. Instead, Org-mode and emacs has actually allowed me to manage that complicated configuration in one place, with lots of documentation. The draw.io diagram was for the information flow between different software components for the PIM and email setup - not for Emacs itself.
Coming back to the complicated setup for PIM, I see a lot of new developments that promises to make it simpler. Hopefully, I won't need the org-mode power in the future to rein in the complexity.
There are many cases where if I didn't have it's features like this I would have to sacrifice ease of use of my full system or hold tons of edge cases in my head.
Can I see (an example)? Wondering how much goes into that init.el.
https://paste.sr.ht/~gokuldas/30c47d1c2721111171a51ecc44f257...
The .org file gets processed and the source code blocks extracted into an elisp-only file which is what actually gets executed.
Some people prefer an alternate approach[0] with the "stub" init.el that just loads other modules.
[0] https://github.com/cute-jumper/.emacs.d/blob/master/init.el
Off-topic: what is an emacs quality alternative for docker? It’s such a piece of garbage for something so pervasive.
I've been enjoying podman.
On windows, docker desktop has all of the same issues as it does on mac. Docker's concept of volumes and file permissions on windows are nonsense. Windows updates and Docker Desktop regularly decide to disagree, [1] It's networking support interferes with other applications (like OpenVPN and the Xbox Game Center) [2].
[0] https://github.com/docker/for-mac/issues/1432
If you can, avoid using x86 Linux containers on Apple Silicon. Build some aarch64 ones for development and test your x86 images in CI and on the machines of devs using x86.
Similarly, if you can avoid deploying your environment via Linux containers on macOS, do it. Use Nix to get reliable dev envs, and then use Nix to build your production containers. You'll have to take your time and learn something new, but it's insane how much faster it is and you can avoid dealing with all kinds of hassles with filesystem mounting and port forwarding and so on.
There are tortuous and awful arguments around about whether this is inherent or not, or whether the tradeoffs are worth it or not, or where the blame lies. And I'm not interested in getting into any of that.
Nonetheless the core idea behind Docker is slow on a Mac, because the Mac doesn't implement anything like the kernel feature on which it was built.
To add: Mac OS X docker actually, after a while, without errors, stops responding to running dockers and you cannot remove them without reboot. It’s total garbage, but cannot move from it as everyone uses it.
So, emacs-stable alternative for docker. Maybe that should be a movement; emacs-alternative-for. I have many already; software that is fast, can run for months/years and doesn’t get slow vs stuff you need to actually reboot for to run ok. I mean emacs is bloated (yeah right, compared to whatever others are pushing out?) but disk space, even sdd is almost free; it simply runs for months without memory growth or performance degradation. The only reason I stop it because of reboot for sec updates.
Nix and direnv via envrc-mode.
Does anyone know if it's coming? Anything in the JPEG XL or JPEG XL libs license that makes it a problem to incorporate in Emacs?
You can try evaluating (imagemagick-types) to see if it's enabled. If it fails with "void-function" that means that your Emacs was not built with ImageMagick enabled. If it returns a list of file types but the list doesn't contain "JXL" then your libMagick might be too old or not compiled with JPEG XL support.
I did check: I'm running the latest Debian stable, Bookworm, which basically just came out and it ships ImageMagick 6.9.11 but apparently JPEG XL support was only added in 7.0.10.
Oh the joy of running Debian! (I'll see if I bump ImageMagick to a more recent version or not).
Moreover I take it that, say, for someone who added WEBP support to Emacs, adding JPEG XL would be kinda a no-brainer.
But I fully get your point...
AFAIK native GTK should be unrelated to macOS since macOS version uses its own cocoa frontend
But, emacs is in most cases fast enough, faster than vscode and has other advantages.
Gui emacs is much, much slower than nvim
(thats on intel monterey though)
I put together a simple tool to generate a starter Emacs config from a few configurable options, which I can now update to point at a proper release channel instead of a prerelease:
> Symbol's function definition is void: package-vc-install
[1]: https://emacs-config-generator.fly.dev/config?font_family=Me...
Yes!
Official release announcement: <https://lists.gnu.org/archive/html/info-gnu/2023-07/msg00008...>
I can imagine how hard it must be to learn the basics buried within a mountain of functionality. The way I learned to use Emacs originally was by learning to use a stripped down Emacs-like editor that ran on my home PC running MS-DOS. This editor used the same basic key bindings and supported the fundamental operations one uses to edit files: navigation, directory browsing, reading and saving files and so forth, all with the same keys that full blown Emacs uses.
Instead of installing Emacs, try installing micro-Emacs (its actual name is mg). This should run on Linux, MacOS, or Windows. On the Mac, you can install mg using homebrew. This is a perfectly good editor, and it uses the keys and commands that make up most of the ones I use every day. It just has fewer features, no Org mode, no image browsing, no support for git, no Email clients, no GPG support, no Voice output, no games, etc. It's just a solid text editor that will run in text mode.
Within a few days of using mg, you will be able to navigate around a document, open and save files, browse directories, and know how to get basic help within the editor. Then try Emacs and only add extensions as you need or want them.
Emacs is usually batteries included, couldn't an lsp server have been part of the package..
AFAIK, the only alternative to the clangd language server is ccls: https://github.com/MaskRay/ccls
From the following it sounds more like a first step towards true adoption:
> built-in support for TreeSitter. This means that a few years down the road we’ll have many Emacs major modes that are much faster, robust and feature-rich.
But yes, compared to Emacs , Code is a passing fad, and I doubt it'll be around in 15 years, let alone in 38
Newer builds have better usability (although there are definitely still quirks). I recommend using it with the Hacker Keyboard for easy Meta-key access.
Is hackers keyboard available on latest android?
This makes it difficult to install emacs on a resource constrainted environment like a embedded system, and hard to justify installing on a server. (Yes we can use tramp but it's not always a option)
It's a real shame and why I still need to know vi and vim.
1: https://gitweb.gentoo.org/repo/gentoo.git/tree/app-editors/e...
I'm still a Guix newb, so all I can say is that there may be some tweaking to be done if you're using non-default paths, (e.g. XDG Base Directory Specification) [0].
[0]: https://mail.gnu.org/archive/html/guix-devel/2019-03/msg0045...
Last I tried building Emacs, it took me more than hour. I now use a snap that's updated very quickly and is already updated to 29.1:
https://github.com/alexmurray/emacs-snap/
In fact, it's already updated
ELISP> (emacs-version)
"GNU Emacs 29.0.60 ..."
Ah... Time to upgrade ; )Anyone else use fzf successfully with 29.x?
E.g. for lsp support, are the frameworks switching to the native one or are they going to rely on their current setup for now? Or is there no common approach?
However with Emacs, there are a few thousand other people working on the car too, so despite the fact it's the volkswagen beetle you bought in 1972 and your butt shape is indelibly formed in the cockpit, it has _also_ got electric power train, full self driving and JATOs. :)
It isn't for me. At least not anymore.
Dealing with Emacs is a lot like dealing with software written in Python: probably great if you really like going trough long descriptions of how to get something to work. Not so great if you are more concerned with using the tools rather than fiddling with the tools.
I've been in contexts where I can't use vscode and I've been in contexts where I can't use intelliJ and so on. The contexts where I can't use emacs (specifically, emacs configured to my preferences) are thin on the ground.
It's a space alien user interface and software abstraction relative to most out there, but the payoff is I never have to put it down.
From the NEWS file:
Emacs is now capable of editing files with very long lines. The display of long lines has been optimized, and Emacs should no longer choke when a buffer on display contains long lines.
https://git-send-email.io/ has a great tutorial for getting started.
There's probably also a lot of emacs contributors that use emacs as their mail client that would be disrupted by replacing it with something web based.
Git was made for email. Needing a separate service for it is mostly cruft, when you have mailing lists. Yes, github has mass appeal, but a lot of software has been written with just email collaboration.
As for attracting low-quality contributions, I don't think they matter. People who use Emacs and depend on it will contribute. Interest in Emacs has increased and so have the available features.
The further I get into "emacs for everything" the more I appreciate using email for everything.
Gitlab has some threading support but not very good one.
What maintenance? I have not changed a single line of my .emacs file for 3 years.
I have ~80 lines outside the customize variable block added by emacs. Nothing too fancy but there are a few hot keys and functions that I can't live without.
1. lsp-mode/eglot
2. package management
3. treesitter grammars
4. Portability - win/linux/mac/unix/android
5. Graphical User Interface - you can browse the web and watch YouTube in Emacs. Customize has buttons, forms, menus.
6. Treemacs/Treeview/speedbar: you know the multipanel view in Intellij or the project explorer in Intellij/vscod? Yeah, that.
7. Actual macros and function definitions, without needing to post them as an extension.
8. Interactive repl.
9. 5 different terminal emulators built-in.
10. Automated fuzzy everything with helm-M-x and helm. Exactly like Command-p in vscode.
11. github, gitlab integration with magit.
12. Copilot, tabnine, and chatGPT integration.
13. Hundreds of themes.
14. We've had shareable, secure remote collaboration for over a decade with wemux.
15. Use any ttf.
16. Mouse editing and command binding.
17. Use every build tool with projectile-compile-project.
18. Refactoring with lsp.
19. Autocompletion and jump to source.
20. Session save and restoration with desktop-save.
21. Slack integration.
22. Debugger with dap-mode.
23. Individual test only runs with dap and avy-lens.
24. blame with.magit-blame.
25. Pixel scrolling.
25. Transparency with seethru.
28. Rest client with variables and session storage (like postman, but free).
29. Browse compressed files as if they are normal directories and save to them.
30. Containerized deployment via flatpak.
31. Docker, docker-compose integration, kubernetes, aws, datadog, Azure integrations...
All of this fits in around 500 lones of copy_paste/cloneable emacs configuration, most of which is use-package declarations. Nary a defun or global-bind-key in sight, and because emacs is a full elisp ide, and it is actually executable code, it's debuggable on launch, unlike myriads of json files.
I'm trying to think of anything else that can possibly be interpreted as 'modern' from a ux standpoint. I certainly can't think of a feature that Intellij has that emacs doesn't that is core to the ide experience. And most of my emacs tools are better than the vscode version of them, at least in terms of invasion into the editor buffer or integration with the editor ux.
The one thing that's not modern is the standard copy and paste commands, but that's super easy to customize. I guess you can't drag and drop buffer frame borders in multiple buffer layouts if you hide scrollbars, and the message buffer isn't resizable...
As someone who uses emacs most often: VSCode is shaped a lot more closely to a modern aesthetic by default. If you've been following along with emacs all this time and keep up to date with the latest changes, you can easily accrete the configuration to make your emacs look like a modern tool, but it doesn't start configured that way.
It is like assembling IKEA furniture if IKEA furniture didn't come with a usable manual and there are nine different descriptions online of how to assemble your new chair. Of which 5 don't actually produce a chair and two that are strangely incompatible with how you prefer to situate your couch.
Rather than be angry with people for pointing out something that is very likely to be true, how about listening to _valid_ user criticisms? And perchance see if something can be learned from it?
This is valid feedback.
I know you see this fashionable UX as an advantage, but what I think about is how you're going to have fashionable evolution in UX thinking inflicted on you. It feels to me like someone coming into my shop and moving all my tools.
Gratuitous example from an adjacent area of nerdliness: Were you around when Microsoft decided to drop the UX they'd been using for a few decades and change to "The Ribbon" ?
Are you sure ?
Vscode out-the-box is much more complete for coding than Emacs out-the-box.
While my Emacs-foo is not that great, I have relied on it for a lot over 25 years of programming. Recently, though, I gave Vscode a try, and while it's buggy as hell when you load up on the extensions you need, it's not that bad!
Slow? Yes, compared to a Vim or Emacs similarly set up. A wee bit bloated? Certainly, compared to my Vim and Emacs configuration.
But, really, it's the one I recommend to new developers. Not Vim, nor Emacs, even though I use those myself.
- code "peek" (that little windows is super useful)
- good integration with debugger (again, vscode kills it here). For example: how to look a at a numpy array in emacs (in vscode there's a data viewer for that)
- robust LSP (for example, when I complete a formatting string f"{... on a big file, emacs simply becomes unresponsive for a minute or so (it's much quicker ona powerful computer though); pylance is simply superior on edge cases.
But although I'm a long time emacs user, there's one thngs where VSCode is much better, it's discoverability. I've learned much of what I need in 2-3 weeks, without ever looking at a manual.
Note: I'm a regular emacs user since since about 10 years (I came for the freedom, stayed for the community). I'm using VSCode since about a year.
I'll be happy to ear a way to make my emacs better.
But I think most people don't care about it enough because they either never close Emacs and/or use it in server-mode where emacsclient is pretty much instantaneous. Can I ask why you don't like doing that?
With lsp-mode it has that little window: https://emacs-lsp.github.io/lsp-ui/#lsp-ui-peek
Personally I use eglot with consult which temporarily switches the entire buffer to do the "peek" functionality rather than popping up a tiny window: https://github.com/minad/consult
who ever does such a thing? Emacs starts up on my machine soon after I login. It remains open until I logout. Current instance has 123 buffers (files). Loading speed just isn't important to me as a full-time native (C++) developer.
> - robust LSP
I tried LSP a bit. Gave up because it just didn't really help me with my actual work. Could understand why someone with less experience programming would find it helpful, but it just wasn't so for me (I use emacs dynamic completion a lot)
Edit:
The unpopular opinion is to say that one has stopped tinkering with Emacs for hours and started using a tool like VS Code or intelliJ to do actual coding work.
I will use IntelliJ or Eclipse over Emacs or VS Code for Java development any day. But having used both VS Code and Doom Emacs for other development, the latter is quicker, more featureful, and more discoverable, just as easy to configure, and more extensible.
Well, I'm not that obsessed with tweaking every bits, though. When I'm using vim/emacs, I never intend to configure them into IntelliJ replacement.
In VS Code it's certainly easy to install an extension. Some mystery thing happens, and there are new commands available and some programming language support might be enhanced, but it is all very opaque. If I wanted to debug the code, I have no clue where to start. I'm sure it's there somewhere but all this looks to me much less discoverable than in Emacs.
The real problem with Emacs is the shitload of bugs that case weird, undocumented and annoying behavior. A scripting language like elips is not meant for programming something as large and complex as Emacs.
Could you name a few of these "bugs"? I use Emacs for practically everything and bugs are very difficult to encounter, even on Emacs HEAD.
> A scripting language like elips is not meant for programming something as large and complex as Emacs.
Well, that's just plain wrong. A lot of vanilla Emacs functionality is written in Elisp.
But any elisp package will have lots of annoying small day-to-day bugs and glitches.
I agree Emacs has too many bugs (but I haven't found anything that suits me better for maintaining notes and to-do lists and such).
I would say most modern editors (Helix, Neovim) do TreeSitter and LSP better than Emacs today and probably for many years to come
Emacs' LSP client Eglot and many of the LSP servers have nothing to do with Microsoft. Honestly, LSP is one project that I'm thankful to MS for. Personally, I value open standards like LSP more than any single FOSS project.
(And also some have been based on the out of tree implementation that's been around for a while now)
The dynamic module system is generally a win for pragmatism over ideology, and it has been around for 7 years already. You can't do everything, like say extending core graphics of Emacs, but you can do a lot in any language of your choice if you feel constrained by Elisp. Tree-Sitter feature is built on top of that so it's not clear to me why do you think Emacs can't do better than say neovim. I use neovim and tree-sitter daily and generally don't think tree-sitter itself is rock solid yet, I run into indentation and slow query issues semi-routinely. But I am much more impressed with the work happening on Emacs community that leverages tree-sitter for advanced tooling [1].
Besides, even if that wasn't the case, Emacs has long had a policy of interoperating with non-free software. It runs on versions of Windows from 98 to 11. That's not because its developers don't value free software, but because they realize that this is a more effective way of convincing people to use free software than insisting on absolute purity.
Not really dependent (you can build and use Emacs without either).
I don't know what ideology you're talking about, but the only one I've ever had is the Emacs ideology: use the best program ever made and be happy.