[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add cl-defgeneric project-name; first use case eglot

From: João Távora
Subject: Re: Add cl-defgeneric project-name; first use case eglot
Date: Mon, 21 Nov 2022 13:50:37 +0000
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Stephen Leake <stephen_leake@stephe-leake.org>
>> Cc: João Távora <joaotavora@gmail.com>
>> Date: Sun, 20 Nov 2022 14:09:49 -0800
>> eglot builds a name for a server using the root directory of the
>> project - in effect:
>> (file-name-base (directory-file-name (project-root (project-current))))
>> That name shows up in the elgot mode line, to tell the user which server
>> the buffer is connected to, in progress report messages, and in the name
>> of the EGLOT log buffer, which is useful for debugging things.
>> If the project root directory happens to have a meaningful name, that's
>> fine. In my use cases, it's usually not meaningful.
> So Eglot should allow customization of what is shown on the mode line.

Surely Eglot could offer that: a boolean option controlling whether to
show the project's name in the mode-line.  Or a more sophisticated
eglot-mode-line-format in the style of e.g. flymake-mode-line-format so
that multiple other things can be shown or hidden.

As to where Eglot gets the project's human-readable name from, I can't
think of a place other than project.el.  As Stephen explained, currently
Eglot guesses it from the name of the root directory, and that guess
isn't suitable 100% of the time.

So Stephen's suggestion sounds pretty reasonable to me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]