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: c-ts-mode Date: Fri, 08 Sep 2023 18:34:39 +0300 Message-ID: <83jzt0wueo.fsf@gnu.org> References: <5F73CB5D-DB00-439F-AD7C-7E209EC83A35@gmail.com> <83jzt2z5mk.fsf@gnu.org> <83y1hhykni.fsf@gnu.org> <877cp1lvih.fsf@gmail.com> <83v8clyhqi.fsf@gnu.org> <83tts5ygv2.fsf@gnu.org> <83msxxxkc0.fsf@gnu.org> <871qf9ktxd.fsf@gmail.com> <838r9gykia.fsf@gnu.org> <83pm2sx10t.fsf@gnu.org> <83msxwx02s.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="6451"; mail-complaints-to="usenet@ciao.gmane.io" Cc: theo@thornhill.no, casouri@gmail.com, spacibba@aol.com, emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 08 17:35:43 2023 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 1qedWJ-0001P1-Pw for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Sep 2023 17:35:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qedVW-00042v-7n; Fri, 08 Sep 2023 11:34:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qedVR-00042N-0Q for emacs-devel@gnu.org; Fri, 08 Sep 2023 11:34:49 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qedVQ-0001VJ-9q; Fri, 08 Sep 2023 11:34:48 -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=0zmj6gRgzx1ARoP2/+Ij6NHEcMKXGIlNFn5X74P86EQ=; b=LNP92AsXwGO+AlSVTO0Q 77ekZ96ITfzJtkefznZOklwS2QQfG/oNiho7rFvE4Wzpd51PoxJj35iZHNpi7/G7oCB3EhNxuAerU bgorUfcoVu0qFBpc+tWBEh+5EU44Lz3TpI50PANUhtEQIgJzL1Mzl5LjfpL2a2AHHQuU69SavXXmj tcW6j7dJqfvT6wbxdkBN5hpqpmkjJY13glwMvaCL3VJD3wVvGre/wv2tTLgUGzOgHImDPV+wuaa0P txzbaHKYWZCm1gzJtYGiZzZsq+3xf/SuE26KZK5AU6YdT5TM/jM+fRXru9EkfH+uMmL3y0s5Qsv2v LHbQzSqnN82z8w==; In-Reply-To: (message from =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= on Fri, 8 Sep 2023 16:15:09 +0100) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:310336 Archived-At: > From: João Távora > Date: Fri, 8 Sep 2023 16:15:09 +0100 > Cc: theo@thornhill.no, casouri@gmail.com, spacibba@aol.com, > emacs-devel@gnu.org > > > > I guess this means we should add a TODO item for supporting such > > > external specifications? > > > > Done; patches welcome. > > I couldn't find your TODO item (in etc/TODO at least). Chrystal ball says you looked on master. I made my change on the emacs-29 branch instead. > But I'm curious as to how you will phrase it: "supporting" can have > many meanings. > > If it means "have some kind of interface for using" then Emacs already > has one, which is `eglot-format`. Although indirect (because LSP), it > is a pretty effective in abstracting away different specs of different > such tools (clang-format, prettier, eslint, etc). I think we should try to support this without LSP servers. > But if "supporting" means "plug into indent-line-function and > indent-region-function", then it's going to be relatively hard, because > as I explained, these are formatters, not indenters, so it's a bit > of a round-peg, square-hole problem. Which, as we all know, is a problem that was solved at least once. > So if you want to keep the existing interface of those two functions > (which would be ideal, since a lot of tooling already depends on > them), there would have to be some way to communicate with these > tools so that they only talk about indentation. Not saying it's > impossible, but it's hard, at least when LSP is used for abstracting > away differences. Let's talk after you read what I wrote in TODO.