DEV Community

Aman Shekhar
Aman Shekhar

Posted on

Emacs 31 is around the corner: The changes I'm daily driving

I’ve been immersed in the world of Emacs for quite some time now, and let me tell you, it’s been a rollercoaster ride. With the imminent release of Emacs 31, it’s like being a kid in a candy store, but with a much more complex selection of sugary treats (and maybe a few bitter pills). I’ve been daily driving the pre-release versions, and I can’t help but share what I’ve discovered along the way—both the sweet and the not-so-sweet.

The Upgrade Journey: Embracing Change

Ever wondered why some developers cling to their old tools like a life preserver? I’ll admit, I was one of those folks. When I first began using Emacs, I found comfort in the familiar keybindings and workflows. But when I started exploring Emacs 31, a whole new world opened up. The new features have been a game-changer for my productivity, but it did take some adjustment.

The first thing that caught my attention was the new native compilation support. It was an "aha moment" for me. I was working on a small project using a simple Elisp package, and I decided to test this feature. To my surprise, the compilation speed was noticeably faster. Code that used to take seconds to compile was now done in the blink of an eye. This isn’t just a quality-of-life change; it’s a time-saver that translates into real productivity gains.

Emacs as a Modern IDE

Now, I’ve always had mixed feelings about using Emacs as an IDE. It’s beautiful and powerful, but sometimes it feels like trying to use a Swiss Army knife to fix a Ferrari. However, with Emacs 31’s improved support for LSP (Language Server Protocol), it’s starting to feel more like a complete development environment.

For instance, I was working on a TypeScript project recently and decided to leverage lsp-mode. Setting it up was straightforward, and to my surprise, I got real-time syntax checking and autocompletion right out of the box. Here’s a quick snippet of what I did:

(use-package lsp-mode
  :ensure t
  :hook ((typescript-mode . lsp))
  :commands lsp)
Enter fullscreen mode Exit fullscreen mode

The first time I saw the lsp-mode in action, I felt like I was living in the future. It made me realize how far Emacs has come. Yet, I still found myself falling back into the classic Emacs ways—sometimes you just can't beat the simplicity of a good old-fashioned buffer.

The Challenge of Customization

Here’s where things got a bit tricky. Emacs has always been about customization, but with the new changes, I found myself drowning in a sea of options. It’s like being given an empty canvas but having no idea what to paint. One of my favorite things about Emacs is the ability to mold it to my workflow, but Emacs 31’s plethora of new customization options left me feeling overwhelmed at times.

I remember trying to configure the new org-mode features, as it’s one of my go-to tools for project management. With the new properties and tables in org-mode, I got lost in the weeds. After a few failed attempts and an embarrassing amount of time spent on Stack Overflow, I finally settled on a setup that worked for me. My advice? Don’t be afraid to experiment, but also don’t hesitate to dial back if you find you’re overcomplicating things.

Improved Performance: Not Just Hype

Let’s talk about performance. I’ve always loved Emacs, but I won’t lie—there were times when it felt sluggish, especially with larger projects. With Emacs 31, I’ve noticed a significant improvement in performance. The garbage collection optimizations are real. I used to dread loading heavy projects, but now, they pop open like a can of soda on a hot day.

I was working on a data science project that involved large datasets and complex calculations. I had a few hiccups initially, mainly because I couldn’t figure out the best way to manage memory. But once I tweaked the garbage collection settings, I experienced a smoother workflow. Here’s a snippet of what I did:

(setq gc-cons-threshold (* 50 1024 1024)) ;; Increase the threshold
Enter fullscreen mode Exit fullscreen mode

The difference was night and day! It’s moments like these that keep me excited about the future of Emacs.

Troubleshooting Tip: Don’t Panic!

One of the biggest challenges I faced during this transition was dealing with package conflicts. If you’ve been using Emacs for a while, you know it’s not uncommon to run into this issue. I learned the hard way that not all packages play nicely together, especially with the new version.

When I ran into a conflict, I took a step back and methodically worked through it. I started by checking the Messages buffer for any clues. Often, the error messages would point me in the right direction. If you’re battling similar issues, don’t panic. Just remember: every conflict is a learning opportunity.

The Community: An Endless Source of Inspiration

I can’t emphasize enough how amazing the Emacs community is. Whenever I hit a wall, there’s a forum post or a blog that has the answer. I’ve learned so much from the shared experiences of others. It’s like having a massive support group, but instead of discussing feelings, we’re discussing keybindings and workflows.

Watching others share their configurations and custom functions inspired me to start sharing my own. There's something liberating about putting your work out there for feedback. If you haven't already, consider contributing to the community. It’s rewarding and can lead to some incredible collaborations.

Looking Ahead: Excited About the Future

As I wrap up this exploration of Emacs 31, I can’t help but feel a sense of excitement. I’ve seen how far Emacs has come, and I’m genuinely excited about where it’s headed. The changes have sparked fresh enthusiasm in my daily workflow, and I find myself diving deeper into the intricacies of the editor each day.

In my experience, change is often met with resistance, but sometimes it’s the very thing we need to grow. Emacs 31 is more than just a version update; it’s a testament to the resilience and adaptability of the Emacs community. So, what’s next for me? I plan to keep pushing the limits of what’s possible with Emacs, exploring its potential in AI/ML projects, and of course—sharing whatever I learn along the way.

Emacs 31 isn’t just around the corner; it’s a whole new adventure waiting to unfold. What will you discover when you take the plunge?


Connect with Me

If you enjoyed this article, let's connect! I'd love to hear your thoughts and continue the conversation.

Practice LeetCode with Me

I also solve daily LeetCode problems and share solutions on my GitHub repository. My repository includes solutions for:

  • Blind 75 problems
  • NeetCode 150 problems
  • Striver's 450 questions

Do you solve daily LeetCode problems? If you do, please contribute! If you're stuck on a problem, feel free to check out my solutions. Let's learn and grow together! 💪

Love Reading?

If you're a fan of reading books, I've written a fantasy fiction series that you might enjoy:

📚 The Manas Saga: Mysteries of the Ancients - An epic trilogy blending Indian mythology with modern adventure, featuring immortal warriors, ancient secrets, and a quest that spans millennia.

The series follows Manas, a young man who discovers his extraordinary destiny tied to the Mahabharata, as he embarks on a journey to restore the sacred Saraswati River and confront dark forces threatening the world.

You can find it on Amazon Kindle, and it's also available with Kindle Unlimited!


Thanks for reading! Feel free to reach out if you have any questions or want to discuss tech, books, or anything in between.

Top comments (0)