From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Renaming eglot -- or at least add an alias? Date: Wed, 12 Oct 2022 10:15:48 +0300 Message-ID: <83pmexcy1n.fsf@gnu.org> References: <83pmfdduix.fsf@gnu.org> <86wn9ji3ma.fsf@gmail.com> <86tu4lsnqk.fsf@gmail.com> <8335c0p2fn.fsf@gnu.org> <83leproov6.fsf@gnu.org> <83fsfzonwn.fsf@gnu.org> <5a1e604c-4500-a476-da3d-259d9057a7f0@yandex.ru> <838rlromxu.fsf@gnu.org> <83h70dk3wf.fsf@gnu.org> <83fsfxk30x.fsf@gnu.org> <83r0zdd1cy.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9055"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 12 09:20:13 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oiW2G-0002DT-P9 for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 09:20:12 +0200 Original-Received: from localhost ([::1]:57284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiW2F-0005UF-9a for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 03:20:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57226) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiVxw-0003uV-Ty for emacs-devel@gnu.org; Wed, 12 Oct 2022 03:15:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40482) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiVxw-0000p4-Kf; Wed, 12 Oct 2022 03:15:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Ic+MaCsZisgfpAmtk8ifOb4D1R6I5w12Q1ZELS3nu8Y=; b=HsVUESv4hFRUKzhrbMyk Jvb9HTz5T/rQR+wUi+UrGUyKzg9fV4y77SmFntbuYQcG5Bo0EGSFSrjD80SEigkTuI/DrDZFnJuI0 QPmT2sWbEP3XPM1CNebrhBW0kX4T0oC4JcbbUs2RRtLMp3UHT6itFDGwthbnNRN2LuWErmbZTs7li DCIZ/qWBlFYxpc7lHfqMgSLLlAd2ApdAIciESM6xNRsvdzxImiFrwBQkavfqajxnWvApfi2RIVupi U/toXGnu6jhbQzbPdaKQpvmtDMGzuryAyn+6JRFB4Jt6jAsVS6vJldBBtxLVULttfVe+qAxZawM1s EymjRO3iikE2Rw==; Original-Received: from [87.69.77.57] (port=1332 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiVxr-0001EO-Sk; Wed, 12 Oct 2022 03:15:40 -0400 In-Reply-To: (message from Yuan Fu on Tue, 11 Oct 2022 23:37:28 -0700) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:297579 Archived-At: > From: Yuan Fu > Date: Tue, 11 Oct 2022 23:37:28 -0700 > Cc: Richard Stallman , > emacs-devel@gnu.org > > > This discussion is primarily about our design and implementation > > decisions: whether some features need to have more than one "back-end" > > or just one, decided by us. AFAIU, we haven't made the final > > decisions yet. Whether and how users will control that comes later. > > If we decide that each feature will have only one "back-end", the part > > of selecting a "back-end" is automatically resolved to a non-issue. > > IMO in some sense, eglot and major mode sits at the same level, and tree-sitter a level lower. Consider this: take imenu as an example. Major mode sets imenu-create-index-function for imenu to function. A major mode now has two options available, one function uses tree-sitter and one don’t. If the user enables eglot, eglot sets menu-create-index-function to eglot-imenu, overriding major mode’s function. From this perspective, tree-sitter is just a mechanism a major mode could use, not unlike syntax-ppss, while eglot do things its own way, replacing parts of the major mode’s functionality with its own. > > So it’s not really “two back-ends”, tree-sitter and eglot are different in fundamental ways. My vision of the relation is different from yours. Major mode sets imenu-create-index-function to some code that can either use tree-sitter or some other way of detecting the symbols for the index. That other way includes Eglot. The fact that Eglot overrides the mode's setting is just an implementation detail. And none of that matters for the user, btw. Users don't care much about implementation, they only care about the possible ways of getting the functionality, and in this case there are 3 such ways.