GNU bug report logs - #73736
31.0.50; project and therefore eglot don't work without git

Previous Next

Package: emacs;

Reported by: Eric Gillespie <epg <at> pretzelnet.org>

Date: Thu, 10 Oct 2024 16:45:02 UTC

Severity: normal

Found in version 31.0.50

Full log


Message #29 received at 73736 <at> debbugs.gnu.org (full text, mbox):

From: Jim Porter <jporterbugs <at> gmail.com>
To: Dmitry Gutov <dmitry <at> gutov.dev>, Eric Gillespie <epg <at> pretzelnet.org>,
 73736 <at> debbugs.gnu.org
Subject: Re: bug#73736: 31.0.50; project and therefore eglot don't work
 without git
Date: Fri, 11 Oct 2024 14:49:33 -0700
On 10/10/2024 2:59 PM, Dmitry Gutov wrote:
> If it's just for Eglot, though, maybe ideally it would have a separate 
> detector for directories in which to run the language server in - it 
> doesn't have to correspond to what the user considers to be the entire 
> project's root (they might prefer it to be a parent directory). Not sure 
> how automatic it can be in the general case, though, and it'd require 
> Eglot to know about root markers for all supported languages.

Yeah, that raises a good point: what exactly counts as a "project" 
depends on the context. For simple scenarios, a project is approximately 
equal to a VC repository, but for more complex scenarios, I think it 
depends on what you want to *do* with the project. For example, suppose 
I have a Git monorepo that has several different Python packages in it. 
Should Emacs consider the monorepo to be the lone project, or should 
each Python package be a project? I don't know if either answer is 
correct 100% of the time.

(Even if we're just thinking about VC, "what project is this file in?" 
can have multiple answers. Sometimes if I'm working in a Git submodule, 
I want that submodule to be the project, not the parent repo.)

I'm not sure if we should open this can of worms yet though...

> I'm not a fan of adding a file that has no other purposes, but if people find this useful, no problem. For personal projects it certainly shouldn't hurt.
> 
> Eric, Jim, how would you like this resolution? 

I'm fine with recognizing ".project" by default, since it seems we'd 
just be adopting an already-existing practice. In addition to the cases 
already discussed, it seems that the Eclipse and STM32 IDEs also use a 
".project" file at the project root for various things.

To turn it around though, are there cases we know of where we *wouldn't* 
want ".project" to mark a project root? Maybe if an Eclipse IDE project 
were in a Git subdir? (In that case, maybe ".project" should only be 
checked for as a fallback if we couldn't determine the project using a 
"real" VC file.)




This bug report was last modified 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.