Mastering Emacs: What's new in Emacs 29.1

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • TypeScriptCompiler

    TypeScript Compiler (by LLVM)

  • I'm not really very happy with the number of times I have recently had to resort to sending it SIGUSR2 to force it to stop whatever it's doing when I re-indent some code in a file of Typescript. It happens about once a day. When it does I quickly save all my work and restart. I haven't looked too closely at it yet but from what I've seen in backtraces I suspect there's a bad pattern match situation in there somewhere, like what you might get from the exponential behavior of a poorly written regex.

    I'm also not happy about the fact that I can no longer open large C++ files like https://github.com/ASDAlexander77/TypeScriptCompiler/blob/ma... in C++ mode without scrolling becoming so sluggish as to be unusable. I either have to disable C++ mode or open them in an older version.

    It's good that emacs is getting some long needed attention, but I'm sad the latest version isn't as usable for me.

  • tree-sitter-module

    Building script for tree-sitter language definitions

  • Sorry, was AFK over the weekend.

    > Minor modes enabled in this buffer: Font-Lock Tree-Sitter-Hl Tree-Sitter

    > The major mode is TypeScript mode defined in typescript-mode.el:

    > Major mode for editing typescript.

    This actually indicates that you are in fact using some tree sitter extension for doing "font-locking". Do you happen to have installed "elisp-tree-sitter" in the past? Perhaps this setup has some bugs. Or your font-locking is still running regexes in your mix.

    This is how it looks for me using Emacs 29.1's built-in tree sitter support:

    > Minor modes enabled in this buffer: Auto-Revert Auto-Save Company

    > Eldoc Flycheck Flyspell Font-Lock Lsp-Headerline-Breadcrumb

    > Lsp-Modeline-Workspace-Status Lsp-Ui-Doc Lsp-Ui Lsp-Ui-Sideline Yas

    > The major mode is TypeScript mode defined in typescript-ts-mode.el:

    > Major mode for editing TypeScript.

    (I am also running "lsp-mode.el" so there are more minor modes running than perhaps in your case.)

    So, I would remove any tree sitter extension you may have installed in the past. Then to activate the new "typescript-ts-mode" you need to do the following:

    1. Clone this repository: https://github.com/casouri/tree-sitter-module/

    2. run "./build typescript" (you'll need build-essentials and a C++ compile but I gathered you are programming in C++, so)

    3. Copy the resulting shared library "dist/libtree-sitter-typescript.so" into "~/.emacs.d/tree-sitter/".

    4. Open a random typescript file and try "M-x typescript-ts-mode" which should not give you any error but nice syntax highlighting.

    5. Of course, you'll need some tweaking to make it your default. Basically, you'll have to add "'typescript-ts-mode" to your "'auto-mode-list".

    You'll have to do the same for your C++ setup. Unfortunately, the convenience "tree-sitter-module" build script does not support out of the box. But it does not look complicated to extend it for your purposes.

    If you do not want to go ahead and migrate to built-in treesitter yet -- as you see it's still a bit fiddly to setup as it is brand new -- I would tackle your C++ performance problem first by using Emacs' profiler:

    1. M-x profiler-start (select "CPU")

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • git-sim

    Visually simulate Git operations in your own repos with a single terminal command.

  • Has anyone figured out how to pair magit with git-sim (https://github.com/initialcommit-com/git-sim) so that you can use magit's controls but then get a picture of what you're about to do before you do it?

  • rust-analyzer

    A Rust compiler front-end for IDEs

  • I am not a Rust dev. It surely looks great.

    However, from what I understand it seems to supply just a parser separate from the Rust compiler (https://github.com/rust-lang/rust-analyzer/tree/master/crate...) trying to keep up with Rust‘s development. So, in principle, it could have been just another treesitter parser plugin, too.

    So, again, the LSP framework does not directly provide any magical benefit over a static parsing framework. All the semantic analysis capabilities stem from a good parser.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts