10 ms·
The Second Golden Age of Emacs
- cyrialize 3y agoI think another reason why Emacs is in a second golden age is due to all of the new plugins that have come out in the past 3-5 years and how those plugins have affected Emacs. For example, Eglot and use-package being part of Emacs core. Additionally, there's also just many new plugins for the base-level things. I never thought there would be alternatives to completion frameworks like Helm or Ivy, until new ones came out. It's all been very exciting.
- wolverine876 3y agoCould you describe some of these plugins to people outside Emacs, and those who might be (re)considering it?
- cyrialize 3y agoMy apologies for missing this! Eglot is a package that works with LSP (Language Servers). There is another one called lsp-mode. Eglot is integrated within Emacs over lsp-mode because it was specifically made to use existing hooks that Emacs has. What this means is that you'd use the base Emacs command for finding a reference, and Eglot will populate the source for that command. Whereas with lsp-mode, it has it's own command you'd run for finding reference. I do think you could also write code to have lsp-mode populate Emacs commands. That being said, my impression is that Eglot has better integration with Emacs - which is why it became part of Emacs core. (It's been a while since I've reviewed the Eglot vs lsp-mode discussions, so anyone feel free to correct me). Use-package is a package for setting up your Emacs configurations. It allows you to place settings for individual packages in nice little sections. It's mainly used for organization but you also gain a plethora of options as well, like deferring to load a package until you open a file that requires it. You also don't technically need to configure Emacs by hand by writing code lines. You could always do M-x customize and change settings that way. Emacs will auto-generate code from that and place it at the end of your configuration file. That being said, this becomes quite messy to look at - so people prefer to use M-x customize to find the setting they want, and then they write it by hand in their config. A big usage of use-package that I love is that you could specify specific settings that tell Emacs to enable it through M-x customize. If you don't know what I mean by that - that is totally ok. You'll learn about this more if you ever dive into Emacs and want to configure your own settings.
- pasc1878 3y agoThink of any one plugin you have for another editor - and you probably have it in emacs. The one that I think makes most change is treemacs - this gives you a tree view at the side of the window of files.
- ttepasse 3y agoLike every other GUI Editor and IDE of the last 20 years has built in as core part of their interface? Or du you mean something different?
- seti0Cha 3y agoI don't know what plugins OP had in mind, but for me at least, a bunch are usability improvements that make the Emacs environment easier to program. use-package, for example, provides a nice way to programmatically install and configure all the plugins you need. My emacs file config file now is self-bootstrapping - I drop it on a new machine, fire up emacs and everything is there and configured as I like. You could do this before, but it was more work and I had never bothered previously.
- TeMPOraL 3y agoSomeone else can tell you about Magit (the gold standard UI for Git), or Org Mode (the best markdown alternative / journal / planner / TODO / PM software, if only more people used it...). I want to take a moment to comment on: > many new plugins for the base-level things GP mentions Helm and Ivy. These "completion frameworks" are editor-wide, full-blown rich and ergonomic UI enhancements, each with its own philosophy. Each one is an island though - you have to buy into their philosophy wholesale[0]. At some point, however, the community identified the various paradigms and patterns in those completion UIs/frameworks, and where they map to existing core Emacs ideas, and a new breed of libraries were born - Corfu, Vertico, Embark, and many others, each of which provides a single piece of the equation, and deeply integrates into built-in Emacs APIs whenever possible. As a result, you can now mix and match those libraries to replicate something like Helm or Ivy, that works better, is more flexible, and more friendly to code against. This is perhaps less interesting for casual users, but it means an important philosophical shift in community, towards more targeted and composable plugins. For casual users it just means more powerful, stable, better cooperating plugins. -- Okay, I lied. Let me talk about Org Mode. My favourite little feature, which I miss from literally any other software I'm using (like Microsoft's To Do I've been using lately for ad-hoc personal things[1]), is `org-extend-today-until`. Made by and for people like me, who always find themselves reviewing plans after midnight, it's a variable you can set to make Org Mode extend "today" past midnight. See: http://doc.endlessparentheses.com/Var/org-extend-today-until.html http://doc.endlessparentheses.com/Var/org-extend-today-until.... I set mine to 3 (as in 03:00). Flexibility of Emacs means people just implement random stuff like this in the first place - features not relevant to Minimal Viable User, but very useful for a subset of users. -- [0] - Though in Emacs land, this just means it's only tad more annoying to extend, modify or repurpose pieces of those frameworks. [1] - Org Mode is the bestest, but still has so-so mobile support; currently MS To Do is just the least annoying tool for private planning on the go.
- wolverine876 3y ago> make Org Mode extend "today" past midnight. See: http://doc.endlessparentheses.com/Var/org-extend-today-until http://doc.endlessparentheses.com/Var/org-extend-today-until.... I set mine to 3 (as in 03:00). That's pretty neat. Now I'm trying to remember how I live without it.
- spit2wind 3y agoEglot and use-package allow Installing packages from source, allowing you to easily switch between bleeding edge, tagged versions, and contribute changes.
- iLemming 3y ago> Could you describe some of these plugins In this deeply nested Reddit comment, when someone said: "Imo emacs shines when editing, not writing.", I tried giving a few practical examples of how I use Emacs for writing plain text. I'm just gonna list the use cases without specifics, you can click the link below and find details of each package if you're interested. Note that this is a single aspect of things for which I use Emacs. Many other possibilities are abound. Emacs is incredibly incomparable for writing. I don't even try to type anything longer than three words in anything else. I always try to find "edit-with-emacs" feature wherever I go - I built one for Mac, then I wrote one for exwm, then I did the same for stumpwm . I recently started using AwesomeWM, and now I have it there too. If I'm ever forced to work in Windows, I can promise you, finding a way to edit with Emacs would be the very first thing I will try to solve. When I'm typing in Emacs, I have: - Spellchecking. When I mistype the previous word, I would just tap the comma twice, and it autocorrects it. If I need to actually insert comma, I'd use comma and space (which I always do anyway) - I have thesaurus. - I have Google Translate, for which I don't even have to switch the keyboard layout, meaning if I want to translate from Russian, it would automatically switch the layout to 'ru' and back to English when it's done - I can check the etymology and definition of any word. - I can count the number of sentences, words and characters. - I can keep an eye on my writing with writegood-mode, it can look for duplicate words and use of passive voce, and perform Flesch–Kincaid readability test. - Until recently, I was using Grammarly to check the text, these days I simply send it to chat-gpt, and it even shows me the diff upon completion. - I can toggle "distraction free, zen mode", for writing. - I can launch a web search on any selected text. - There are various ways how you can preview the markdown. - You can write helpers like wrapping a region in a collapsible section, or create "code sections" without any hassle. - You can edit the code sections in their language environment, with syntax highlighting and REPL. https://www.reddit.com/r/emacs/comments/1aey0eo/they_are_surely_not_joking_when_they_say_emacs/koca123/ https://www.reddit.com/r/emacs/comments/1aey0eo/they_are_sur...
- wduquette 3y agoSo, I went and took a look at Spacemacs, linked from the original post. I guess you're supposed to have some version of Emacs already installed? Because the "Download" doesn't appear to include a binary, and the "Installation" just appears to set up your ~/.emacs.d/ folder. Funny, I presumed that an "Emacs Distribution" would include Emacs.
- noelwelsh 3y agoYes, you need to install Emacs. It is probably available from whatever package manager your system uses. I prefer Doom (https://github.com/doomemacs/doomemacs https://github.com/doomemacs/doomemacs) to Spacemacs. However I haven't looked at Spacemacs for many years; perhaps it's now on par with Doom.
- avgcorrection 3y agoAn OS distribution is a whole OS because you need an OS. An Emacs “distribution” (quotes) doesn’t include Emacs because you can already install vanilla Emacs yourself. Que Emacs is an OS jokes.
- SuperNinKenDo 3y agoIt's a fair point IMO. Especially with something like Spacemacs, which really presents a fairly radical different experience to vanilla. I'm not sure anything is really gained by NOT including their own Emacs binary. I guess Emacs doesn't break external code that often, so it might not be a huge issue, but I can't imagine there is never a version mismatch that leads to unnecessary user confusion.
- iammiles 3y agoClojure for the Brave and True[0] is what introduced me to Emacs. Getting a job writing Clojure(script) cemented my use of it. [0] - https://www.braveclojure.com/basic-emacs/ https://www.braveclojure.com/basic-emacs/
- croo 3y agoI also see close and almost unbreakable relation between clojurians and Emacs. I always tell them to snap out of it and stop wasting precious company time on configuration and writing + as the first character when doing an addition. When I get serious they always see the light as they convert to python + vim.
- hobos_delight 3y agoMany years ago, I was writing Clojure for a job and took to finally learning emacs beyond just saving a file and closing the editor. It took about a week to finally get used to paredit-mode (and rainbow-parens, because…) but once I did it is the most productive I have ever felt, I keep trying to find that experience again. Unfortunately the dynamic types and slow build system (lein) made the build step quite tedious (this was 11-12 years ago) - but in terms of expressing ideas, man - paredit + lisp style was amazing!
- applied_heat 3y ago>So, why should you try Emacs in 2024? >You’re a curious person and a constant tinkerer who likes playing with (insanely cool) vintage software. >You want to experience life outside the mainstream. >You’ve always wanted to learn a bit of Lisp. >You want to build an editor that’s uniquely tailored to your needs and preferences. >You’ve got a lot of time to kill. Is this sarcasm? I think focusing on the killer apps might have hooked me more than that closer!
- dingnuts 3y agoI think it's not sarcasm so much as it is gentle self-chiding. Emacs configuration can certainly be a timesink, especially if you enjoy it. That said, it's pretty easy to put your Emacs config on the back-burner for a long time once you have things how you like them, and it becomes a much more OPTIONAL time sink at that point. Using something like Doom Emacs could even prevent it from really ever being much of a time killer, but in my experience, once one is bit by the customization bug, one doesn't -mind- the time sink so much because the fruits of your labor are worth it
- thraxil 3y ago> That said, it's pretty easy to put your Emacs config on the back-burner for a long time once you have things how you like them, and it becomes a much more OPTIONAL time sink at that point. To illustrate this, I'm a heavy emacs user. I've been using emacs more or less exclusively since 1999 (I had two years where I forced myself to use vim to make sure I'd really given it a fair shake), including org-mode, using gnus for my email client, and writing code pretty much every day (with magit, helm, and projectile, tramp for working on remote servers). Here's: ~/.emacs.d <master> » git log --pretty=format:"%h %ad %s" --date=short|head -n 20 6795c07 2023-12-23 rust-mode dd241ec 2023-10-24 full screen automatically on mac 1cf8287 2023-10-22 mac stuff bc1e456 2023-10-22 conditionally set home dir e7d3577 2023-10-22 mac font size f8ba89c 2023-10-22 add ligature stuff 7ef9bce 2023-10-22 add ligature.el 1aaf1e1 2023-05-06 gitignore some stuff de56154 2023-05-06 update the other capture template entries 948d2ea 2023-05-06 capture template works differently now 5b2d34e 2023-05-06 copilot 00991ae 2019-12-28 whitespace d334506 2019-12-28 don't need the other conditional either 95ffdf7 2019-12-28 still working 23378b8 2019-12-28 oh... working now? c1fb771 2019-12-28 that works fine again caf80c0 2019-12-28 removing recenter seems to help 04eba58 2019-12-27 setup 171f175 2019-12-27 weird 05c4163 2018-03-14 terraform/hcl mode 20 commits in the last six years. A good chunk of them because I got a Mac last fall (for work) and so I finally had get my config working somewhere other than Linux. Mostly I only have to tough the config when I add a mode for a new language or when I go through a major OS upgrade that pulls in a new enough version of emacs that I need to make some fixes. I would say that none of those took more than 5-10 minutes of my time. I have about 100 commits total in my git history (so going back to about 2008). Meanwhile, I see colleagues using VSCode constantly trying out new plugins and configs. I think I've spent more time in pairing sessions in just the last year watching other people tweak their editor settings than I've spent configuring emacs in the last decade. When I get a new machine, I just clone that config repo and I'm good to go.
- choilive 3y agoI want to love emacs I really do. Couple things that I really get hung up on MELPA isn't user friendly - I don't mean in the usability sense. The maintainers routinely remove packages that are being used. Breaking your end-user's dependencies for non-security related reasons seems unusual for a package repository. If it goes into MELPA and a user has downloaded it, it should stay there for basically forever or as long as feasible. Performance - emacs is noticeably slow even on latest Apple hardware and I can't seem to get to it to an acceptable performance level. The bar for acceptable for me is VS Code.
- perihelions 3y ago- "Performance - emacs is noticeably slow even on latest Apple hardware and I can't seem to get to it to an acceptable performance level. The bar for acceptable for me is VS Code." Is it plain Emacs that's noticeably slow, or Emacs after installing 3rd-party packages? Some of the popular ones are very performance-costly.
- dingnuts 3y agobefore native compilation Emacs itself was pretty dang slow on its own, and you probably have to compile yourself to get nativecomp (which won't always be true) depending on the distro you're using etc
- armitron 3y agonativecomp is pretty much a gimmick and should make absolutely no difference in perceived Emacs slowness during actual usage and not stupid microbenchmarks.
- ParetoOptimal 3y agoThis is absolutely not true. I mistakingly used an emacs without native compilation and very much noticed in large org buffers.
- techbro92 3y ago
- systems 3y agoemacs just need to things * make it fast (magit is the benchmark, if magit becomes fast emacs is fast, for those who dont know magit is slow, very very slow) * add more UI stuff (graphical tree browsers, tables , etc ..) the core concepts and main UI of emacs are the best there is in my opinion, simple, uncluttered , logical
- dingnuts 3y agocurious if you're using nativecomp or not? magit does not seem slow to me and while I do use it on real repositories I do not use it on any insane monorepos or anything like that
- smackeyacky 3y agoIt could also use a decent editor
- SoftTalker 3y agoI find emacs moves plenty fast for my human brain. Including magit, anything to do with git slows my brain to a crawl anyway. I get that it might be slow if you're trying to use it to automate something complex, as some part of a server, etc. but it more than keeps up with me.
- nequo 3y agoWith regards to Magit being slow, are you using it on Windows?
- systems 3y agoyes
- nequo 3y agoThen the slowness that you're seeing is probably Windows-specific, and that's why everyone else is telling you that Magit is actually fast. WSL might make things faster.[1] IIUC, the problem is that starting new processes is much slower on Windows than on Linux/Unix and Magit relies heavily on that. This seems to have plagued Git tooling more generally but maybe this got fixed since then.[2] [1] https://emacs.stackexchange.com/a/58444 https://emacs.stackexchange.com/a/58444 [2] https://github.com/magit/magit/issues/2395#issuecomment-171023551 https://github.com/magit/magit/issues/2395#issuecomment-1710...
- dunk010 3y agoLSP is basically an open(-ish) source implementation of Google’s internal tool called Grok. Grok was made by Steve Yegge, a formerly famous tech blogger. Steve Yegge uses emacs, and half his motivation was to equalise editors by moving the language processing elements to an external place that’s shareable by all. He has a great talk on it: https://youtu.be/KTJs-0EInW8 https://youtu.be/KTJs-0EInW8. So it’s, like, not an accident that emacs can leverage this :-D. Though I never see anyone giving him credit.
- agumonkey 3y agoOh wow, another form of circularity in the lisp world :p Thanks steve for all the things.
- graemep 3y ago> Steve Yegge uses emacs, and half his motivation was to equalise editors by moving the language processing elements to an external place that’s shareable by all. That is cool. I was thinking just today (without knowing it was the intention) that LSP has meant I moved from an IDE to an editor with plugins (Kate, not Emacs), because an editor now has so much more of what the IDE can do.
- foobarbaz33 3y agoSteve Yegge also made js2-mode. Which is basically treesitter for javascript. He was ahead of his time on dev tooling. I'm still using js2-mode to this day.
- vkazanov 3y agojs2-mode was the coolest major mode for Emacs back in the day. The js2 parser is primitive, non-incremental and language-specific. semantic-mode almost, a-a-a-lmost did something similar (mostly based on LR incremental parsing) but was Emacs-only and never gained enough traction. Tree-sitter is decades ahead of both. It's hard to compare js2 to a modern GLR incremental parser generator of Tree-sitter. I am not even talking about the size of the community building grammars useful in all the editors out there.
- 3y ago
- phtrivier 3y agoSo, why should you try Emacs in 2024? ... You’ve got a lot of time to kill. Yes, that.
- iLemming 3y agoThat is an obscured perspective. Yes, learning a skill takes time. Mastering a tool requires patience and time. Developing intuition, sharpening your instincts and gaining insight takes time. Software development is a multi-faceted discipline. There are many different ways to become good at it. The ultimate goal is not only achieving excellence in productivity but also gaining perspective on remaining happy. The most important medium through which we convey ideas, information, and even emotions is text. Often, programmers place a greater emphasis on the formal language of precise and structured nature of programming languages. They may even become emotionally attached to a single programming language. Notoriously, most people overlook the importance of plain, simple, unstructured text. The value of taming the wild nature of plain text (even before programming languages) is underestimated. Find Graydon Hoare's post "Always bet on text", it's revelatory. There is no equivalent in any other communication technology for the social, communicative, cognitive and reflective complexity of a library full of books or an internet full of postings. Nothing else comes close. One can spend many cycles learning tool after tool, jumping from one to another, newest, shiniest, "most innovative" thing that comes out, in attempt to find the most effective way, most productive way, most delightful way to gain power over text. I myself spent years trying things like Evernote, OneNote, Google Keep, Notion, Workflowy, Apple Notes, Zoho Notebook, and countless other tools. There were always some factors that made me switch. Initially I decided to learn Emacs, thinking it's just another code editor. It took me quite some time to master it to the point that I can now bravely try to implement some wildest ideas. I came for a specific tool for coding, instead, I found a world of incredible possibilities to manage text, any text, not just programming. All my notes, all my writing, my browser history, retrieving YouTube transcriptions, Anki cards, pdf annotations, emails, rss feeds, and of course, coding, all that I do in Emacs. Why? Because it is not only extremely powerful and allows me to be immensely efficient. It also gives me enormous pleasure, allowing me to perform things my way. If frustration could be measured in wasted fiscal expenditure, Emacs would've saved me quite significant amount of money. Yes, that long-term satisfaction and liberating power were not granted to me. I had to spend many hours, days, and months of learning until I felt empowered. But that is a lifetime investment that is unlikely to ever diminish. Even if Emacs itself becomes obsolete, the mindset it helped me develop will remain. I will never be the same again. No other highly specialized tool will sway me to pay for it or waste my time, unless it is as extendable as Emacs. And there's nothing today that comes even close. Anyone who says otherwise either doesn't know the limitations of their tools or is unaware of the capabilities of Emacs.
- ReleaseCandidat 3y agoWhen I started using Emacs about 25 years ago and 20 years ago started using it professionally, _everybody_ used it to program on Linux - yes, I have had two colleagues who used Vim and Kdevelop, but apart from these two goofballs, everybody used Emacs (for C++). I even paid for Xrefactory https://www.emacswiki.org/emacs/XreFactory https://www.emacswiki.org/emacs/XreFactory 20 years ago. Now? There is one left (yes, I switched to VS Code :() who still uses Emacs and there are even more Vim users (not admins!). And whenever I read something about Emacs online it's mostly Magit (I don't get that, I either use the CLI or a real GUI frontend) or Org-Mode (not for me either).
- coldtea 3y ago>20 years ago started using it professionally, _everybody_ used it to program on Linux For C++ maybe. For C most used Vim
- NoGravitas 3y agoThough the standard text editor was, and still is, ed.
- bee_rider 3y agoI think Emacs users want led the best IDE-like experience they could get in the terminal, while Vim users wanted Vim. As a result Emacs is always fighting a much tougher fight. (FWIW I like Vim; this isn’t an example of an Emacs fan touting their advanced ide-like editor).
- deleted 3y ago[deleted]
- alexeiz 3y agoEmacs survived because it adapted. LSPs are the new hotness? Here's the LSP mode for Emacs. VSCode emerged with a massive number of extensions? Here's Doom Emacs with declarative package management. Emacs continues to evolve to face new challenges. And hey, no editor does Emacs key bindings emulation as well as Emacs itself.
- clircle 3y agoEmacs key binding emulation? Only a special kind of masochist would want to use emacs keys more often.
- avgcorrection 3y agoIntellij hotkeys at least are a Ctrl+Alt+Shift nigthmare. Are Emacs keybinds really that bad? Well, I wouldn’t know anymore since I use Evil…
- chrsig 3y agoI don't want to, my fingers do it anyway. Send help please. Joke aside, the key bindings work in a lot of places outside of emacs, which unfortunately are slowly eroding away. Keybindings are all a crapshoot when it comes to working with different platforms though. macos is notably frustrating in this regard.
- dustfinger 3y agoIt is nice to know that I am special ;-). Do I get extra points if I told you that I do it all on a custom mechanical plank keyboard with blank keycaps? Of course, I don't use emulation. My windows manager is exwm, so I do everything in emacs.
- tmtvl 3y agoEmacs keybinds are great. How do you move the cursor up, down, left, and right without them, the arrow keys? My pinky doesn't stretch that far, and if I have to move my hand I'm gonna lose time moving back because I need to find the articulation for my index finger. Vi bindings are even worse: you start typing and the text goes haywire because you're in the wrong mode.
- SoftTalker 3y agoMy .emacs and usage is pretty much the same as it was 20 years ago. I should probably take a look at what's new. OK that's an exaggeration, I have dabbled with org-mode and use magit, but really for editing code, it's pretty much same as it ever was for me.
- tptacek 3y agoeglot (for LSP integration) is a pretty big win.
- bgibson 3y agoWhat's the best Emacs-Vim hybrid now, with a Vim keybinds and modal editing interface to Emacs? Doom? Spacemacs? Or something new?
- logicprog 3y agoIMHO, Doom without a doubt. It is much cleaner, less buggy, and chooses better packages and configuration defaults in my opinion. It's also even more committed to vim key bindings everywhere than spacemacs is iirc
- foobarbaz33 3y agoThey all use evil-mode for Vim emulation. So it's just their choice of defaults and configuration style that sets them apart. Doom might have a slight edge with a focus on performance. Evil-mode is not the only way. There are other approaches like devil you might want to check out. https://susam.github.io/devil/
- SuperNinKenDo 3y agoI think the author is right about some things (e.g., MELPA, killer packages) and less right about others (e.g., GitHub, Clojure, Maintainers). I personally suspect that the big reason behind Emacs' resurgence is the feeling lately that computing is no longer responsive to user needs. That it's all about designing, and redesigning, and redesigning again, interfaces to make pretty screenshots, with the user being totally downstream and hardly even a factor in the minds of whatever designer has been assigned to work on the product most recently. Emacs by contrast gives you an ugly interface that cares about function almost to a fault, that you can then make your own. It gives you the tools to look inside what the program is doing and change its appearance, its functionality, how much or how little information it shows, what that information is, etc.etc. All without constantly shifting under your feet, even with the significantly accelerated development over the last few years. I do have some concerns about that last part to be honest, with Emacs seeming a little too eager these days to add features that seem to violate its underlying philosophy or design, but it doesn't seem like big, breaking changes are happening on the regular, so for now it's still a platform you can develop atop of as an individual, and feel like you understand and can at least partially map out in your mind. In short, it presents a philosophy and experience of computing that you don't get very often anymore, even in open-source, especially if you're not a fairly advanced programmer already.
- lycopodiopsida 3y agoI would say that it is also no coincidence that author talks about Clojure as an example - a lisp language, which have obviously great support in Emacs. For the rest of development ecosystem support is of lower quality and now, with the transition between LSP and eglot and the unfortunate way how treesitter mods were implemented, the ecosystem is even more fragmented. I still like some aspects of emacs (configuration on-the-fly), do not care about others (magit, org-mode) but the state of development ecosystem is the true problem for me. Neovim is a much sharper development tool as of now in my opinion.
- deleted 3y ago[deleted]
- arrakeen 3y ago> Killer “Apps” ... What would you add to this list? use-package, hands down. my decades old rat's nest of a config actually became organized and emacs starts instantly now similarly, being able to configure emacs with a real programming language was a game changer compared to vim with vimscript. this is not so much an issue now with neovim, but i still prefer elisp :P