Bozhidar Batsov has been blogging up a storm on recent additions to Emacs that make our editing sessions easier. His latest post is about a successor to expand-region, expreg. Batsov has been a heavy user of expand-region for many years. The problem with it is that it requires hand written functions for each language that it supports.
As a result of his recent work integrating Tree-sitter into many of his packages, he thought it would make sense to reimplement expand-region as a Tree-sitter based package so that bespoke functions wouldn’t have to be written for each language. It turns out that Yuan Fu, who implemented the Emacs builtin Tree-sitter, had already done it.
Batsov loves expreg and doesn’t see why anyone who isn’t depending on some artifact of expand-region wouldn’t adopt it. Take a look at his post for more details.
In the comments over at the Emacs subreddit Karthink says that he has a constellation of packages that depend on expand-region and that it would be very hard for him to change. Spartanork says that he had a hard time getting Tree-sitter installed. Those two comments suggest that expreg may not be for everyone.
I’ve had expand-region installed for a long time but I don’t use it as much as I should. At this point in my life, virtually all my coding is done in either Elisp or C, for which expand-region works well. It also does the right thing in a prose buffer so I see no reason to change but if you’re using a lot of languages, you should definitely check out expreg.