Emacs: overriding the project.el project directory

1 · · April 2, 2021, 12:08 p.m.
I recently learnt about the Emacs package project.el, which is used to figure out which files and directories belong to the same project. This is used under the covers by Eglot, for example. In practice, a project is recognized by looking for Git repositories, which is a decent first approximation that often just works. But what if the detection fails? For example, maybe you want to anchor your project-based commands in a parent directory that contains multiple Git repositories. Luckily, we can ...