João Távora writes: > On Sat, Jun 29, 2024, 15:24 Spencer Baugh wrote: > > Or, here's an alternative idea, more aggressive: > > What if Eglot just sets project-mode-line=t in eglot-managed buffers, and removes the project-name from the Eglot entry > entirely? > > Then the language identifier would be the major mode, the project identifier would be project-mode-line, and the eglot status > indicator would just be for the status of the server. > > Works for me, it's in line with Eglot's policy of setting other modes when managing buffers. Show a patch. Attached. I do think this is a great way to resolve this - now that project-mode-line exists, using it deletes one small bit of eglot-specific functionality, which is in line with the Eglot design philosophy. The only issue is that this was only added to mode-line-format in Emacs 30, so we can only use it in Emacs 30 or later. The attached patch detects that with: + (when (member '(project-mode-line project-mode-line-format) mode-line-format) but I'm also totally fine with: + (when (version<= "30" emacs-version) Or I guess we could sidestep the issue if project.el itself ensured, when loaded, that mode-line-format contains project-mode-line. eglot itself does this with eglot--mode-line-format, running the following at load time: (add-to-list 'mode-line-misc-info `(eglot--managed-mode (" [" eglot--mode-line-format "] "))) Juri, any opinion? > But also, my idea of eglot-mode-line-format should be alsoh considered. AFAICT there no big technical hurdle, it's just relatively > boring work and some naming decisions to make. And as I mentioned, it would fix more issues than just the one at hand. Yes, I think that would also be useful as a separate patch.