> — Sensible file handling: backups and auto-saves in a cache/ directory, recentf for recent files, clean buffer naming with uniquify
It's crazy to me how out of the box when you edit nginx file at /etc/nginx/sites-enabled/foo it creates another file foo~ there and nginx tries to load that too
When I tried to ask emacs reddit community they started attacking me for changing the default that only I need and fits everyone perfectly.
Still can't believe I'm the only one finding that default amazingly bad.
show comments
kidsil
Funny, this mirrors almost exactly a decision I made after about a year of struggling with ELPA packages breaking on me repeatedly.
I ended up cutting Emacs off from ELPA entirely, settled on a ~700-line init.el, and now use Emacs as a glorified Org-mode agenda keeper. It's been heavenly (especially with a dedicated monitor).
The one thing I'm still working out is syncing with calendars and email.
show comments
jimbokun
This article shows how Emacs remains a beautiful, relevant project several decades after it was first created. The core design and implementation’s ability to evolve into something still useful today and competitive with modern tools is an amazing achievement.
Also, with LLMs driving so much of current development it potentially makes Emacs even more competitive relative to modern IDEs. Development can be driven primarily by an agent like Claude Code from the command line, then navigating and tweaking the code, handling Git commits, etc with Emacs.
I imagine an LLM would be very good at writing Elisp to leverage EMacs’ strong core functionality to make Emacs work exactly how you want. This author managed to do it by hand, but I imagine someone starting now with an LLM could get there much faster.
show comments
wilkystyle
> That means the code is sketchy sometimes, sure, but it's in my control. I wrote it, I understand it, and when it breaks, I know exactly where to look.
This resonates with me so hard. I'm not a "no external packages" purist, but there are a number of pieces of functionality that I wrote for myself because there wasn't anything quite like what I wanted.
One example is a function to expand the region (selection) to any arbitrary set of pairing delimiters that I define in a defvar (parens, quotes, brackets, or I can can supply a custom left/right regex for matching). Then, when I execute the function, it waits for a second keypress, which is the trigger key I've defined for that matching pair, and it will expand the region to the left and the right until it meets the applicable delimiter.
Repeating the same key presses results in selecting the left and right delimiters themselves, and another repeat will extend to the next set of matching delimiters, and so on.
Even though I use a treesitter-based expand-region plug-in, my custom function is still invaluable for when I want to jump past a series of valid treesitter object expansions, or when certain text objects are just not defined in treesitter.
Some of the helpful custom expansions I have defined are:
"w" to select what Vim considers a lowercase-w word
Space to select what Vim considers an uppercase-W word
"$" to select ${...}-style expressions
"/" to select everything between forward slashes
"*" to select between asterisks (useful when editing markdown)
It's really an invaluable function for me, personally, but I always talk myself out of trying to open-source it because it has some gotchas and limitations, and I just don't want to be on the hook for trying to make everyone who uses it happy.
show comments
Ferret7446
The "why" is kinda sketchy. The difference between what is shipped in Emacs and in ELPA is somewhat arbitrary. In fact, there are many built in packages that have their updates shipped in ELPA, meaning if you aren't using ELPA then your builtin packages might have unpatched bugs.
There's also no reason why you have to literally write everything yourself either. You can find open source licensed packages, read them to understand them, and then copy them into your config. Doing everything from scratch is a waste of time unless you enjoy the process (in which case go nuts).
It's roughly equivalent to trying to discover all of our scientific knowledge yourself from scratch vs taking "for granted" the knowledge discovered by your forebears. There is no shame or disadvantage in doing so.
Also, a critical objection:
> Writing your own packages is the best way to learn Elisp
Absolutely not. Reading a language is crucial. If all you do is write, you will pigeonhole into weird practices and generally fail to improve. Only by reading stuff written by others can you learn, as you're exposed to what other people do right and wrong, both of which will be different from you.
Of course, writing your own packages is also necessary, but not sufficient alone.
show comments
qazxcvbnm
The new Emacs features sound great! (We have native window management finally)
I wish we would someday be able to edit in xref too, wgrep having landed in Emacs 30 (especially since project.el grep goes to xref by default).
By the way, anyone more informed know about any work on getting a graphical browser to work on latest Emacs, now that webkit xwidgets is dead for Emacs 30+? (Have tried EAF; extremely buggy on Mac)
show comments
internet_points
This was a beautiful article; the joy of tinkering just shines through everywhere :-) I'm glad Rahul did the work to upstream some of the changes, I hope some of the maintainers read his post and are inspired to change a few defaults too (with that init.el vs `lisp/` refactor it should be easier for them to see what wants changing). Maybe some of the packages might provide for inspiration too; I'd love to see vc-mode provide builtin gutter support, for example. And viper extensions sounds like something that should just be upstreamed. (Less so exchange rates and weather.) Emacs is so close to being quite good out-of-the-box.
NetOpWibby
I’m always impressed by people who are hardcore EMacs or Vim devs, their setups are impressive af.
I’m a GUI guy though. As soon as I try delving in, I abort when I see things like “just type c-C dingle bob to do x thing.” I’m happy these people found something that works with their brains. I just want a GUI that works like what they use.
I recently saw a Zed fork stripped of AI stuff but there’s no binaries yet (you gotta compile and get an Apple dev account and I don’t care enough). Zed and Sublime Text are the closest to my stylistic sensibilities but I’m always on the lookout for something better.
If you’re one of these EMacs freaks who also love GUIs, sign me up to your app!
show comments
lvass
This is beautiful, incredibly sane, and awesome reference material. There's no way I'd use a 3500 lines init.el or most of the extras, but somehow I feel like a good chunk of the stuff here should be upstreamed if we one day consider it reasonable to change default behaviors in a major update.
jamespo
Being able to sudo edit inside emacs via tramp is something I've only recently discovered and I've being using emacs for years...
yunnpp
Is Eglot on par with emacs-lsp for C++? Specifically thinking about pointing it to a compile_commands.json and all of the usual C++ nonsense required for code navigation and autocomplete.
show comments
CodeCompost
Emacs is awesome but customizing it costs me way too much of my precious time.
hirvi74
This might be a paragon of masochism. Though, I am not only beyond impressed. I am beyond jealous as well.
I've been using Emacs since one of professors/mentors converted me over a decade ago back when I was attending university. As the years have progressed, I have found myself reaching for Emacs less and less. I still maintain my config and use it fairly often. I cannot use Emacs at my employer either, so that doesn't help.
However, I have always wanted to do what the author has demonstrated. I would love to be liberated from the all package dependencies I currently have. I just do not have the time nor self-discipline to do something like this. Even if the functionality would be less than or equal parity with 3rd-party packages, I would prefer the Devil I know over the ones I don't.
throwaway27448
Why are we so bad at naming things? Modules and packages are so abstract I need to google what they mean relative to the development environment just to move forward.
show comments
gyrgtyn
The only reason I'm still using emacs is magit (and muscle memory). I could not make magit myself.
show comments
fedreg
super impressive!! Going to steal some of this lisp for sure
iJohnDoe
This guy Emacs!
In all seriousness very impressive and cool. Great information and post.
shevy-java
Poor guy - stuck with lisp on an ancient operating system ...
And no - vim isn't any better either. I always felt that in
the emacs-versus-vim debate there were two losing sides.
show comments
bananamogul
If I was going to reimplement Emacs it wouldn't be with Lisp.
Is there some reason Lisp is superior to any other general-purpose programming language for text editing? I'm skeptical because to my knowledge, Emacs is the only major text editor written in Lisp.
> — Sensible file handling: backups and auto-saves in a cache/ directory, recentf for recent files, clean buffer naming with uniquify
It's crazy to me how out of the box when you edit nginx file at /etc/nginx/sites-enabled/foo it creates another file foo~ there and nginx tries to load that too
When I tried to ask emacs reddit community they started attacking me for changing the default that only I need and fits everyone perfectly.
Still can't believe I'm the only one finding that default amazingly bad.
Funny, this mirrors almost exactly a decision I made after about a year of struggling with ELPA packages breaking on me repeatedly.
I ended up cutting Emacs off from ELPA entirely, settled on a ~700-line init.el, and now use Emacs as a glorified Org-mode agenda keeper. It's been heavenly (especially with a dedicated monitor).
The one thing I'm still working out is syncing with calendars and email.
This article shows how Emacs remains a beautiful, relevant project several decades after it was first created. The core design and implementation’s ability to evolve into something still useful today and competitive with modern tools is an amazing achievement.
Also, with LLMs driving so much of current development it potentially makes Emacs even more competitive relative to modern IDEs. Development can be driven primarily by an agent like Claude Code from the command line, then navigating and tweaking the code, handling Git commits, etc with Emacs.
I imagine an LLM would be very good at writing Elisp to leverage EMacs’ strong core functionality to make Emacs work exactly how you want. This author managed to do it by hand, but I imagine someone starting now with an LLM could get there much faster.
> That means the code is sketchy sometimes, sure, but it's in my control. I wrote it, I understand it, and when it breaks, I know exactly where to look.
This resonates with me so hard. I'm not a "no external packages" purist, but there are a number of pieces of functionality that I wrote for myself because there wasn't anything quite like what I wanted.
One example is a function to expand the region (selection) to any arbitrary set of pairing delimiters that I define in a defvar (parens, quotes, brackets, or I can can supply a custom left/right regex for matching). Then, when I execute the function, it waits for a second keypress, which is the trigger key I've defined for that matching pair, and it will expand the region to the left and the right until it meets the applicable delimiter.
Repeating the same key presses results in selecting the left and right delimiters themselves, and another repeat will extend to the next set of matching delimiters, and so on.
Even though I use a treesitter-based expand-region plug-in, my custom function is still invaluable for when I want to jump past a series of valid treesitter object expansions, or when certain text objects are just not defined in treesitter.
Some of the helpful custom expansions I have defined are:
"w" to select what Vim considers a lowercase-w word
Space to select what Vim considers an uppercase-W word
"$" to select ${...}-style expressions
"/" to select everything between forward slashes
"*" to select between asterisks (useful when editing markdown)
It's really an invaluable function for me, personally, but I always talk myself out of trying to open-source it because it has some gotchas and limitations, and I just don't want to be on the hook for trying to make everyone who uses it happy.
The "why" is kinda sketchy. The difference between what is shipped in Emacs and in ELPA is somewhat arbitrary. In fact, there are many built in packages that have their updates shipped in ELPA, meaning if you aren't using ELPA then your builtin packages might have unpatched bugs.
There's also no reason why you have to literally write everything yourself either. You can find open source licensed packages, read them to understand them, and then copy them into your config. Doing everything from scratch is a waste of time unless you enjoy the process (in which case go nuts).
It's roughly equivalent to trying to discover all of our scientific knowledge yourself from scratch vs taking "for granted" the knowledge discovered by your forebears. There is no shame or disadvantage in doing so.
Also, a critical objection:
> Writing your own packages is the best way to learn Elisp
Absolutely not. Reading a language is crucial. If all you do is write, you will pigeonhole into weird practices and generally fail to improve. Only by reading stuff written by others can you learn, as you're exposed to what other people do right and wrong, both of which will be different from you.
Of course, writing your own packages is also necessary, but not sufficient alone.
The new Emacs features sound great! (We have native window management finally)
I wish we would someday be able to edit in xref too, wgrep having landed in Emacs 30 (especially since project.el grep goes to xref by default).
By the way, anyone more informed know about any work on getting a graphical browser to work on latest Emacs, now that webkit xwidgets is dead for Emacs 30+? (Have tried EAF; extremely buggy on Mac)
This was a beautiful article; the joy of tinkering just shines through everywhere :-) I'm glad Rahul did the work to upstream some of the changes, I hope some of the maintainers read his post and are inspired to change a few defaults too (with that init.el vs `lisp/` refactor it should be easier for them to see what wants changing). Maybe some of the packages might provide for inspiration too; I'd love to see vc-mode provide builtin gutter support, for example. And viper extensions sounds like something that should just be upstreamed. (Less so exchange rates and weather.) Emacs is so close to being quite good out-of-the-box.
I’m always impressed by people who are hardcore EMacs or Vim devs, their setups are impressive af.
I’m a GUI guy though. As soon as I try delving in, I abort when I see things like “just type c-C dingle bob to do x thing.” I’m happy these people found something that works with their brains. I just want a GUI that works like what they use.
I recently saw a Zed fork stripped of AI stuff but there’s no binaries yet (you gotta compile and get an Apple dev account and I don’t care enough). Zed and Sublime Text are the closest to my stylistic sensibilities but I’m always on the lookout for something better.
If you’re one of these EMacs freaks who also love GUIs, sign me up to your app!
This is beautiful, incredibly sane, and awesome reference material. There's no way I'd use a 3500 lines init.el or most of the extras, but somehow I feel like a good chunk of the stuff here should be upstreamed if we one day consider it reasonable to change default behaviors in a major update.
Being able to sudo edit inside emacs via tramp is something I've only recently discovered and I've being using emacs for years...
Is Eglot on par with emacs-lsp for C++? Specifically thinking about pointing it to a compile_commands.json and all of the usual C++ nonsense required for code navigation and autocomplete.
Emacs is awesome but customizing it costs me way too much of my precious time.
This might be a paragon of masochism. Though, I am not only beyond impressed. I am beyond jealous as well.
I've been using Emacs since one of professors/mentors converted me over a decade ago back when I was attending university. As the years have progressed, I have found myself reaching for Emacs less and less. I still maintain my config and use it fairly often. I cannot use Emacs at my employer either, so that doesn't help.
However, I have always wanted to do what the author has demonstrated. I would love to be liberated from the all package dependencies I currently have. I just do not have the time nor self-discipline to do something like this. Even if the functionality would be less than or equal parity with 3rd-party packages, I would prefer the Devil I know over the ones I don't.
Why are we so bad at naming things? Modules and packages are so abstract I need to google what they mean relative to the development environment just to move forward.
The only reason I'm still using emacs is magit (and muscle memory). I could not make magit myself.
super impressive!! Going to steal some of this lisp for sure
This guy Emacs!
In all seriousness very impressive and cool. Great information and post.
Poor guy - stuck with lisp on an ancient operating system ...
And no - vim isn't any better either. I always felt that in the emacs-versus-vim debate there were two losing sides.
If I was going to reimplement Emacs it wouldn't be with Lisp.
Is there some reason Lisp is superior to any other general-purpose programming language for text editing? I'm skeptical because to my knowledge, Emacs is the only major text editor written in Lisp.