From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: Brand new clojure support in Emacs ;-) Date: Sun, 03 Sep 2023 15:19:37 +0000 Message-ID: <87ledn1dyu.fsf@posteo.net> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , "Richard Stallman" , "Danny Freeman" , "Eli Zaretskii" , "Emacs Devel" , "Manuel Uberti" To: "Bozhidar Batsov" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Sep 03 17:20:17 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 1qcotd-00033Z-9p for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Sep 2023 17:20:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcot8-0007Oo-F9; Sun, 03 Sep 2023 11:19:46 -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 1qcot6-0007Og-3u for emacs-devel@gnu.org; Sun, 03 Sep 2023 11:19:44 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcot2-0004HN-Io for emacs-devel@gnu.org; Sun, 03 Sep 2023 11:19:43 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7334D240029 for ; Sun, 3 Sep 2023 17:19:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693754378; bh=XLrgWh95sNq+LEew8eg5rkW58bvLP6ZW0dvhu39Es+Q=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=VMW7SnpGRXEedX16nsv8qXc7VrI9erPt3Nr3J0uE8ea9cibym5GLa0NIG2A4BDddh zjdWB2lyCrI9VHVWoboAOIGUmSQ5/wHMhtgDd6WayBvIQbklG9b1wv8aSVCl8lE0FT rDDYf79T0jhgWVo1+mUk7EV6NKgjpFSOtjave9dvixuOkHKLS2dc+rngdXSctH5EH2 vGyE7c3F6kFgFbMNMjB3V+joBgUqrcZGRLeGTIzm+Lbchv10s3JMbSTloaCynsLu/2 X7t44QXaOwXulgd7Y5sNZqgjDE05mWAtjjL7ckgXeqwGPqZQQjq7PqcNP/oZMCgyky w+2p94tr1tMJA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RdwRY4fRSz6txf; Sun, 3 Sep 2023 17:19:37 +0200 (CEST) In-Reply-To: <2d6a9558-4a4f-47e8-9122-62c7665e5f73@app.fastmail.com> (Bozhidar Batsov's message of "Sun, 03 Sep 2023 17:04:32 +0200") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:309985 Archived-At: "Bozhidar Batsov" writes: >> 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 > 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. 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. 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 copyright assignment and the concern that it might limit 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 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 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 not >> >> > really being similar to Lisp, we ought to have a major mode to supp= ort 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 whatever = the >> > >> > I don't know if this counts as "work on that" but here's two interesti= ng 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-a= t-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, found = the >> > src/helloworld/core.clj inside it, pressed M-x eglot and suddenly I had >> > 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 support LSP-mandated syntax >> > 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 mapping >> > 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