Tags: patch This patch adds an annotation-function and display-sort-function to the completion-table used for project-prompt-project-dir and project-prompt-project-name, as well as a user customization variable to customize the behavior of the annotation and sorting functions. The idea is that projects are annotated with useful information for deciding which one you want to switch to, and sorted based on how likely you are to want to switch to or work on them. For example, a user might want to know how many buffers they have open in each project, to help tell them apart at a glance. Furthermore, a user might be more likely to switch to projects they've already been working on in this Emacs instance, so they might want projects with more buffers open to be sorted before projects with no buffers. All this is customized by the variable project-annotations which is a list of functions used to generate the annotations and sorting metadata. The user can add their own functions to add new annotations and sorting behavior. See its docstring for more details. I added three annotation functions as a starting point, which when added to project-annotations will annotate with the number of buffers, the modification time of the root directory, and compilation results. In this patch I have turned all three of these annotations on by default, by putting all three in project-annotations, but probably when this is actually pushed we want project-annotations to be empty by default. (Maybe?) In my own packages, building on this, I hope to add annotation functions like "number of bugs assigned to you in this project" and "number of lines of incoming code to review in this project", so that project-switch-project is a nice way to pick what to work on next. This patch is still a bit rough around the edges, but I'm posting it now to get feedback. In GNU Emacs 29.0.90 (build 6, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.12) of 2023-06-02 built on igm-qws-u22796a Repository revision: ff6163fac51759945aa619ca6bf28413be4a53e0 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --with-x-toolkit=gtk --with-gif=ifavailable'