From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Bozhidar Batsov" Newsgroups: gmane.emacs.devel Subject: Re: Brand new clojure support in Emacs ;-) Date: Sun, 03 Sep 2023 17:37:07 +0200 Message-ID: <8bf9ac13-d620-4b5c-8e03-de21c4d85506@app.fastmail.com> References: <87il9kksqz.fsf@dfreeman.email> <87a5uw9ivs.fsf@posteo.net> <87ttt42gna.fsf@dfreeman.email> <87wmy080kn.fsf@posteo.net> <83v8djcydl.fsf@gnu.org> <87350ndquw.fsf@dfreeman.email> <83350ncbns.fsf@gnu.org> <87cyzrjbd8.fsf@dfreeman.email> <83zg2vav46.fsf@gnu.org> <87o7j99304.fsf@dfreeman.email> <87zg2hsyrd.fsf@dfreeman.email> <87h6ontwfv.fsf@posteo.net> <87r0nlngmo.fsf@posteo.net> <2d6a9558-4a4f-47e8-9122-62c7665e5f73@app.fastmail.com> <87ledn1dyu.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=caf2a3897cdf4f38be7362d36814ce7e Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18971"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-701-g9b2f44d3ee-fm-20230823.001-g9b2f44d3 Cc: =?UTF-8?Q?Jo=C3=A3o_T=C3=A1vora?= , "Richard Stallman" , "Danny Freeman" , "Eli Zaretskii" , "Emacs Devel" , "Manuel Uberti" To: "Philip Kaludercic" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 03 17:37:54 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 1qcpAf-0004fo-3v for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Sep 2023 17:37:53 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcpAO-0002il-Uj; Sun, 03 Sep 2023 11:37:36 -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 1qcpAM-0002ic-DE for emacs-devel@gnu.org; Sun, 03 Sep 2023 11:37:34 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcpAI-0001O7-Sl; Sun, 03 Sep 2023 11:37:34 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 202F75C00C4; Sun, 3 Sep 2023 11:37:29 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Sun, 03 Sep 2023 11:37:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=batsov.dev; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1693755449; x=1693841849; bh=pJ o/ozTtd7bSVWohoddlnuCiQ3B09ucrJSD9qlAAMAc=; b=PD16QFfZlkgbgCE+pg fZBk17a7avPwNsyFUoJ4iOhLDh6eBegLXWVVBgoghLGpMUETRH3PrYBOx1yVoXkf ZwWtsurkthc9CNUbRzgpvDOnVEGythkeyq2V82qEDPUU0ktiiuGHoMMFjRIckPHE HvGNPLeiIvv0pLNxWBC0y4d+v5KyWNKjqvA67BsJds4ke5hfcMbIxFA9LSzxqB2r +0FhIHYeCX4zw7dhsExgWZ/PMC8L8K8bnpHe4K1sk9PGovBwOcgLfSQcayl5gjTD es+Q29OVSHFfjDlCA5Vttf0lXaQETBOS6dsF4K0zoUXNHUJfZAuRT+p5RGiPDeRL g5kw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1693755449; x=1693841849; bh=pJo/ozTtd7bSV WohoddlnuCiQ3B09ucrJSD9qlAAMAc=; b=myKyC9PdyTOnh0NrZAGYHt/5/15yH 1R0SKAzob1VrN9bg50uvOle/pqEEN8c7TQ+VmZriIYQZNov6YBT8IoSiTHVud0z2 dxXAfKVhqYAzRy96CJYqKTcpVUCS06QZjx0j/vlNwNnr2tFRPht8lS4QaQ+47RFN H5A34XC+bRKIcW789/3o9ry+YvZtTaTGm5xa5APOTCMOCvNDBve0xYeKJ9IA3IKl pbVK3KezpydsjWtj5alABdapcRh4Von1v3evTAhgPKGhvLzKcQ64adg8jbTdQicv JI0/erId52yxUrV2q3GoYGOg2CVRKIeMd9WjfjWmue+itoR4QV7KPjxtQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegiedgledvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtsegrtderreerreejnecuhfhrohhmpedfueho iihhihgurghruceurghtshhovhdfuceosghoiihhihgurghrsegsrghtshhovhdruggvvh eqnecuggftrfgrthhtvghrnhepteeuveeiiedvieeivdeifeffudduheduleetgedtlefg udfgfedtfeevveefieeinecuffhomhgrihhnpegrrhgthhhlihhnuhigrdhorhhgnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepsghoiihhihgu rghrsegsrghtshhovhdruggvvh X-ME-Proxy: Feedback-ID: i025946a9:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id BC6782D4008F; Sun, 3 Sep 2023 11:37:28 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87ledn1dyu.fsf@posteo.net> Received-SPF: pass client-ip=66.111.4.26; envelope-from=bozhidar@batsov.dev; helo=out2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:309988 Archived-At: --caf2a3897cdf4f38be7362d36814ce7e Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable > Of course, it would be even better if you and your co-maintainers could > be convinced to distribute clojure-mode along with Emacs (again, this > doesn't mean development must be moved away from GitHub), but just like > with CC-mode, Org, cperl, Modus-Themes, releases would just have to be > synchronised with the core. But IIUC, your main issues is the copyrig= ht > assignment and the concern that it might limit who might contribute, > right? Other than the contributor agreement there's development overhead to con= sider: - where are issues reported? I don't want to use the Emacs issue tracker= , but that'd be unavoidable for something built-in, so instead of having= one issue tracker you end up with two (one of which I really dislike) - some patches will be submitted on GitHub, some on emacs-devel - I high= ly doubt that all the clojure-mode maintainers would be willing to deal = with this - discussions related to problems/ideas would be happening in different = places - there's also so overhead of keeping the GitHub repo and the code in Em= acs in sync I can go on and on about this - hybrid development models simply come wi= th a lot of overhead. I get that here many people think that GitHub is t= he root of all evil, but political preferences aside - it's the largest = forge in the world by a huge margin and I think it provides unique benef= its to projects that can't be replicated elsewhere. At least not today.=20 On Sun, Sep 3, 2023, at 5:19 PM, Philip Kaludercic wrote: > "Bozhidar Batsov" writes: >=20 > >> I would guess that anyone who is seriously interested in working wi= th > >> Clojure, would install the proper major mode and the proper package > > > > That's one of the things that bother me the most in the conversations > > so far - lots of people tell us what the Clojure users need, but oth= er > > than me and Danny, no one here has any real interest in Clojure. :-) > > Without an understanding of Clojure and its tooling ecosystem (and > > it's history) it's hard to make good suggestions about what makes > > sense and what doesn't. >=20 > This suggestion comes from a different point of view, namely that if I > open a clojure file, that I have anything else but fundamental mode to > structure the file. And if it is true that LSP integration could > provide xref, imenu, capf, etc. support, one would come a long way for > modest needs with very little code. Just like with the common-lisp > mode, the support is of course better if you install SLIME or Sly, but > having some basic OOTB support is already a good thing and all this > thread started out with. >=20 > Of course, it would be even better if you and your co-maintainers could > be convinced to distribute clojure-mode along with Emacs (again, this > doesn't mean development must be moved away from GitHub), but just like > with CC-mode, Org, cperl, Modus-Themes, releases would just have to be > synchronised with the core. But IIUC, your main issues is the copyrig= ht > assignment and the concern that it might limit who might contribute, > right? >=20 > > I already wrote we tried the "thin layer on top of lisp-mode" and th= is > > didn't worked out great in the past. Of course, people are welcome to > > try and learn from experience themselves if they thing they can do > > things better/differently. > > > > On Wed, Aug 30, 2023, at 9:17 AM, Philip Kaludercic wrote: > >> Jo=C3=A3o T=C3=A1vora writes: > >>=20 > >> > On Fri, Aug 25, 2023 at 8:26=E2=80=AFAM Philip Kaludercic wrote: > >> >> > >> >> Richard Stallman writes: > >> >> > >> >> > [[[ To any NSA and FBI agents reading my email: please conside= r ]]] > >> >> > [[[ whether defending the US Constitution against all enemies,= ]]] > >> >> > [[[ foreign or domestic, requires you to follow Snowden's exam= ple. ]]] > >> >> > > >> >> > It appears that there is no clojure-mode command in core Emacs. > >> >> > There is a Clojure mode package, but it is in NonGNU ELPA. > >> >> > > >> >> > I think that language is important enough that, notwithstandin= g not > >> >> > really being similar to Lisp, we ought to have a major mode to= support it. > >> >> > Would someone please work on that? > >> >> > >> >> I had brought this up in the recent clojure-ts-mode thread, that= I > >> >> assume you are referring to. Sadly, I have no experience with t= he > >> >> language, but one idea might be to extend lisp-data-mode by what= ever the > >> > > >> > I don't know if this counts as "work on that" but here's two inte= resting lines > >> > Elisp: > >> > > >> > (define-derived-mode clojure-mode lisp-data-mode "Clojure" > >> > "Barebones Clojure") > >> > (add-to-list 'auto-mode-alist '("\\.clj" . clojure-mode)) > >>=20 > >> I suggested something along these lines up the thread, but didn't t= ry it > >> out myself. Nice to see that the idea works. To avoid confusion, I > >> think it might be a good idea to not call this `clojure-mode' as we= ll, > >> but something like "clojure-proto-mode" or "primitive-clojure-mode". > >>=20 > >> > Since it is a lisp dialect many things works here, like indentati= on, > >> > symbol recognition, parenthesis balancing, C-M navigation, and th= ing-at-point. > >> > > >> > And then there's LSP, right? > >> > > >> > So I installed clojure-lsp from here: > >> > https://aur.archlinux.org/packages/clojure-lsp-bin > >> > > >> > I created a hello world project with the "lein" tool, git init, f= ound the > >> > src/helloworld/core.clj inside it, pressed M-x eglot and suddenly= I had > >> > at-point-documentation, diagnostics, lots of refactorings, comple= tion, etc. > >> > > >> > The thing that's a bit minimal is the syntax highlighting, but it= 's > >> > not that bad either IMHO. Eglot doesn't yet support LSP-mandated = syntax > >> > highlighting. I have no idea what it takes to add TreeSitter sup= port > >> > to such a bare-bones mode (but shouldn't it be really easy like m= apping > >> > syntactic symbols to faces?) > >> > > >> > No idea if this works with the CIDER or SLIME backends for clojur= e. > >> > Don't ask me to test any more cause I've just uninstalled it all > >> > but any clojurians rading can have a go. > >>=20 > >> I would guess that anyone who is seriously interested in working wi= th > >> Clojure, would install the proper major mode and the proper package= s. > >>=20 > >> > Jo=C3=A3o > >>=20 > >>=20 >=20 --caf2a3897cdf4f38be7362d36814ce7e Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
Of course, it would be even better if you and your co-maintai= ners could
be convinced to distribute clojure-mode along w= ith Emacs (again, this
doesn't mean development must be mo= ved away from GitHub), but just like
with CC-mode, Org, cp= erl, Modus-Themes, releases would just have to be
synchron= ised with the core.  But IIUC, your main issues is the copyright
assignment and the concern that it might limit who might con= tribute,
right?

= Other than the contributor agreement there's development overhead to con= sider:

- where are issues reported? I don't= want to use the Emacs issue tracker, but that'd be unavoidable for some= thing built-in, so instead of having one issue tracker you end up with t= wo (one of which I really dislike)
- some patches will be = submitted on GitHub, some on emacs-devel - I highly doubt that all the c= lojure-mode maintainers would be willing to deal with this
- discussions related to problems/ideas would be happening in different= places
- there's also so overhead of keeping the GitHub r= epo and the code in Emacs in sync

I can go = on and on about this - hybrid development models simply come with a lot = of overhead. I get that here many people think that GitHub is the root o= f all evil, but political preferences aside - it's the largest forge in = the world by a huge margin and I think it provides unique benefits to pr= ojects that can't be replicated elsewhere. At least not today.

On Sun, Sep 3, 2023, at 5:19 PM, Philip Kaludercic = wrote:
"Boz= hidar Batsov" <bozhidar@batsov= .dev> writes:

>> I would guess= that anyone who is seriously interested in working with
&= gt;> Clojure, would install the proper major mode and the proper pack= age
>
> That's one of the things that = bother me the most in the conversations
> so far - lots= of people tell us what the Clojure users need, but other
= > than me and Danny, no one here has any real interest in Clojure. :-= )
> Without an understanding of Clojure and its tooling= ecosystem (and
> it's history) it's hard to make good = suggestions about what makes
> sense and what doesn't.<= br>

This suggestion comes from a different poin= t of view, namely that if I
open a clojure file, that I ha= ve anything else but fundamental mode to
structure the fil= e.  And if it is true that LSP integration could
prov= ide xref, imenu, capf, etc. support, one would come a long way for
modest needs with very little code.  Just like with the co= mmon-lisp
mode, the support is of course better if you ins= tall SLIME or Sly, but
having some basic OOTB support is a= lready a good thing and all this
thread started out with.<= br>

Of course, it would be even better if you a= nd your co-maintainers could
be convinced to distribute cl= ojure-mode along with Emacs (again, this
doesn't mean deve= lopment must be moved away from GitHub), but just like
wit= h CC-mode, Org, cperl, Modus-Themes, releases would just have to be
<= /div>
synchronised with the core.  But IIUC, your main issues i= s the copyright
assignment and the concern that it might l= imit who might contribute,
right?

=
> I already wrote we tried the "thin layer on top of lisp-mode" = and this
> didn't worked out great in the past. Of cour= se, people are welcome to
> try and learn from experien= ce themselves if they thing they can do
> things better= /differently.
>
> On Wed, Aug 30, 2023= , at 9:17 AM, Philip Kaludercic wrote:
>> Jo=C3=A3o = T=C3=A1vora <joaotavora@gmail= .com> writes:
>> 
>>= > On Fri, Aug 25, 2023 at 8:26=E2=80=AFAM Philip Kaludercic <philipk@posteo.net> wrote:
<= /div>
>> >>
>> >> Richard Stal= lman <rms@gnu.org> writes:
<= /div>
>> >>
>> >> > [[[ To = any NSA and FBI agents reading my email: please consider  &nbs= p; ]]]
>> >> > [[[ whether defending the US= Constitution against all enemies,     ]]]
=
>> >> > [[[ foreign or domestic, requires you to fol= low Snowden's example. ]]]
>> >> >
>> >> > It appears that there is no clojure-mode co= mmand in core Emacs.
>> >> > There is a Clo= jure mode package, but it is in NonGNU ELPA.
>> >= > >
>> >> > I think that language is = important enough that, notwithstanding not
>> >&g= t; > really being similar to Lisp, we ought to have a major mode to s= upport it.
>> >> > Would someone please wor= k on that?
>> >>
>> >&g= t; I had brought this up in the recent clojure-ts-mode thread, that I
>> >> assume you are referring to.  Sadly, = I have no experience with the
>> >> language, = but one idea might be to extend lisp-data-mode by whatever the
=
>> >
>> > I don't know if this coun= ts as "work on that" but here's two interesting lines
>= > > Elisp:
>> >
>> >=    (define-derived-mode clojure-mode lisp-data-mode "Clojure"<= br>
>> > "Barebones Clojure")
>> = >   (add-to-list 'auto-mode-alist '("\\.clj" . clojure-mode= ))
>> 
>> I suggested somet= hing along these lines up the thread, but didn't try it
&g= t;> out myself.  Nice to see that the idea works.  To avoid= confusion, I
>> think it might be a good idea to no= t call this `clojure-mode' as well,
>> but something= like "clojure-proto-mode" or "primitive-clojure-mode".
&g= t;> 
>> > Since it is a lisp dialect many= things works here, like indentation,
>> > symbol= recognition, parenthesis balancing, C-M navigation, and thing-at-point.=
>> >
>> > And then there'= s LSP, right?
>> >
>> > So= I installed clojure-lsp from here:
>> >
>> > I created a hello world project with the "lei= n" tool, git init, found the
>> > src/helloworld/= core.clj inside it, pressed M-x eglot and suddenly I had
&= gt;> > at-point-documentation, diagnostics, lots of refactorings, = completion, etc.
>> >
>> >= The thing that's a bit minimal is the syntax highlighting, but it's
=
>> > not that bad either IMHO. Eglot doesn't yet sup= port LSP-mandated syntax
>> > highlighting. = I have no idea what it takes to add TreeSitter support
&g= t;> > to such a bare-bones mode (but shouldn't it be really easy l= ike mapping
>> > syntactic symbols to faces?)
=
>> >
>> > No idea if this wor= ks with the CIDER or SLIME backends for clojure.
>> = > Don't ask me to test any more cause I've just uninstalled it all
>> > but any clojurians rading can have a go.
>> 
>> I would guess that anyone= who is seriously interested in working with
>> Cloj= ure, would install the proper major mode and the proper packages.
>> 
>> > Jo=C3=A3o
>> 
>> 

<= /blockquote>

--caf2a3897cdf4f38be7362d36814ce7e--