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:04:32 +0200 Message-ID: <2d6a9558-4a4f-47e8-9122-62c7665e5f73@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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=ec8a60ed331541a7a63183a080a15f1c Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24270"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-701-g9b2f44d3ee-fm-20230823.001-g9b2f44d3 Cc: "Richard Stallman" , "Danny Freeman" , "Eli Zaretskii" , "Emacs Devel" , "Manuel Uberti" To: "Philip Kaludercic" , =?UTF-8?Q?Jo=C3=A3o_T=C3=A1vora?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 03 17:05:33 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 1qcofL-000637-KA for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Sep 2023 17:05:32 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcoep-0003YW-OX; Sun, 03 Sep 2023 11:04:59 -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 1qcoeo-0003Y6-GW for emacs-devel@gnu.org; Sun, 03 Sep 2023 11:04:58 -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 1qcoel-0001Io-OY; Sun, 03 Sep 2023 11:04:58 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B31D25C00A7; Sun, 3 Sep 2023 11:04:54 -0400 (EDT) Original-Received: from imap43 ([10.202.2.93]) by compute1.internal (MEProxy); Sun, 03 Sep 2023 11:04:54 -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=1693753494; x=1693839894; bh=mZ sAegIcmiKU0sXG0TMX+IJTWRrfjs21oXlGc69tO/Q=; b=bwl/24W9vOiXUgJxHS Qngpu3KjGs7s3AU5xpJ57TQUb8kTS5tcnZa0IXguh1QRpGlGMTCIiIm1mjxOXD6u qxhrVRsIuaKFQxCd7FAGWzmFDuGlbP1dSP11gRmQb/lPFsvKXzaL96rqofeIWztw TEoKKgsVRY7U7ljL8z0mXebksGS9dwcigljgXoLD1WDGkndLfSeNVUndqiuXbTs7 OK1QfytLC/wiWTzPI7vn+uPcB/vVkyUClZ1FivjiwG92T70sGCo2JXxAEuNzShaB MxfK76TtOQUbjjLc9o5UJATB6DnrVVWsa4tsJyowdz/BA/tNHTxrCkwar0ObgVQu DAfQ== 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=1693753494; x=1693839894; bh=mZsAegIcmiKU0 sXG0TMX+IJTWRrfjs21oXlGc69tO/Q=; b=sbTKXw4bsuibRV1xiFpkKajLWJ8J2 9dB1Za1K9WNjzpGPSv/a6yJ/FjbavSuXtbi8442ZZXiAlCnCf3CXokOXFqalVqxS ZUeBhkLvpK3s7/2qd07CGYpML+nv/eCRkVu1gKKiP/u/Qqy3lFTqHPETXQLIxdMV QdtRNZiS+iTwIzTCWYxE/TofSGlYz5ihcjxAzHIFU9/4l0d+r8a5CBS37Bddkwg+ 92nTZGUWnJTLwvbR2jSeTbpuFYDHUtQgm1dq5Y+EXSmQ8KIsgRGexXHAw756jbk9 6qvZ+/GGBTLk+IqGTYYt0Xkvq5exJ1X4K9bAlyMYFd42LEGINXuK0ovrQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudegiedgkeehucetufdoteggodetrfdotf 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 75D592D4008F; Sun, 3 Sep 2023 11:04:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <87r0nlngmo.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:309981 Archived-At: --ec8a60ed331541a7a63183a080a15f1c Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable > I would guess that anyone who is seriously interested in working with > 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 other tha= n me and Danny, no one here has any real interest in Clojure. :-) Withou= t an understanding of Clojure and its tooling ecosystem (and it's histor= y) it's hard to make good suggestions about what makes sense and what do= esn't.=20 I already wrote we tried the "thin layer on top of lisp-mode" and this d= idn'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 b= etter/differently.=20 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 consider = ]]] > >> > [[[ whether defending the US Constitution against all enemies, = ]]] > >> > [[[ foreign or domestic, requires you to follow Snowden's example= . ]]] > >> > > >> > 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, notwithstanding n= ot > >> > really being similar to Lisp, we ought to have a major mode to su= pport 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 the > >> language, but one idea might be to extend lisp-data-mode by whateve= r the > > > > I don't know if this counts as "work on that" but here's two interes= ting 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 try = 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 well, > but something like "clojure-proto-mode" or "primitive-clojure-mode". >=20 > > 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: > > https://aur.archlinux.org/packages/clojure-lsp-bin > > > > I created a hello world project with the "lein" tool, git init, foun= d the > > src/helloworld/core.clj inside it, pressed M-x eglot and suddenly I = had > > at-point-documentation, diagnostics, lots of refactorings, completio= n, 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 syn= tax > > highlighting. I have no idea what it takes to add TreeSitter support > > to such a bare-bones mode (but shouldn't it be really easy like mapp= ing > > syntactic symbols to faces?) > > > > No idea if this works 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. >=20 > I would guess that anyone who is seriously interested in working with > Clojure, would install the proper major mode and the proper packages. >=20 > > Jo=C3=A3o >=20 >=20 --ec8a60ed331541a7a63183a080a15f1c Content-Type: text/html;charset=utf-8 Content-Transfer-Encoding: quoted-printable
I would guess that anyone who is serious= ly interested in working with
Clojure, would install the p= roper major mode and the proper package

<= /div>
That's one of the things that bother me the most in the conver= sations 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 i= t's history) it's hard to make good suggestions about what makes sense a= nd what doesn't.

I already wrote we tried = the "thin layer on top of lisp-mode" and this didn't worked out great in= the past. Of course, people are welcome to try and learn from experienc= e themselves if they thing they can do things better/differently.

On Wed, Aug 30, 2023, at 9:17 AM, Philip Kaluder= cic wrote:
= Jo=C3=A3o T=C3=A1vora <joaota= vora@gmail.com> writes:

> On Fri,= Aug 25, 2023 at 8:26=E2=80=AFAM Philip Kaludercic <philipk@posteo.net> wrote:
>= ;>
>> Richard Stallman <rms@gnu.org> writes:
>>
>> > [[[ To any NSA and FBI agents reading my email: please c= onsider    ]]]
>> > [[[ whether de= fending the US Constitution against all enemies,    = ]]]
>> > [[[ foreign or domestic, requires you t= o follow Snowden's example. ]]]
>> >
>> > 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, notwithstanding n= ot
>> > really being similar to Lisp, we ought to= have a major mode to support it.
>> > Would some= one 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 exp= erience with the
>> language, but one idea might be = to extend lisp-data-mode by whatever 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 "Cloj= ure"
> "Barebones Clojure")
> &nb= sp; (add-to-list 'auto-mode-alist '("\\.clj" . clojure-mode))
<= div>
I suggested something along these lines up the thread= , but didn't try 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 well,
but = something like "clojure-proto-mode" or "primitive-clojure-mode".

> Since it is a lisp dialect many things works = here, like indentation,
> symbol recognition, parenthes= is 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 "lein" tool, git i= nit, found the
> src/helloworld/core.clj inside it, pre= ssed M-x eglot and suddenly I had
> at-point-documentat= ion, diagnostics, lots of refactorings, completion, etc.
&= gt;
> The thing that's a bit minimal is the syntax high= lighting, but it's
> not that bad either IMHO. Eglot do= esn't yet support LSP-mandated syntax
> highlighting.&n= bsp; I have no idea what it takes to add TreeSitter support
> 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 backe= nds for clojure.
> Don't ask me to test any more cause = I've just uninstalled it all
> but any clojurians radin= g can have a go.

I would guess that anyone = who is seriously interested in working with
Clojure, would= install the proper major mode and the proper packages.
> Jo=C3=A3o



--ec8a60ed331541a7a63183a080a15f1c--