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 16:03:13 +0000 Message-ID: <87cyyz1by6.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> <87ledn1dyu.fsf@posteo.net> <8bf9ac13-d620-4b5c-8e03-de21c4d85506@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="24925"; 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 18:04:18 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 1qcpaD-0006Da-No for ged-emacs-devel@m.gmane-mx.org; Sun, 03 Sep 2023 18:04:17 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcpZM-0004jL-Ad; Sun, 03 Sep 2023 12:03:24 -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 1qcpZK-0004id-2M for emacs-devel@gnu.org; Sun, 03 Sep 2023 12:03:22 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qcpZF-00082Q-JG for emacs-devel@gnu.org; Sun, 03 Sep 2023 12:03:20 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8FAD8240104 for ; Sun, 3 Sep 2023 18:03:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693756995; bh=GoLAHONhh7CAEK/CyLKrKxPSvqs7aFaV9GWwo/B1p4I=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=Cfez/tqtoDz9L21+96IuYF/tDa+e7Pgwf1dizbMg6nblQ+b7Gz045J6iT0rXI8PKT fKIIDzCj6cG5FjVsfLPZcFCZdqAmfqgma+nBDn8NKaFf0YA+1tI11lNcqvi7k+Fszd PZXK4dWOciJTjlRcpGAvp/iaMy3Xm1Mh5MJdE/yZpKBCBX11tAeTvMBuVBQF+sASXF rF6pjB+uTKbHQDVBp07xEDOabMnW15IkRZDJhpa6533cUaVcZMGOqPEYiaip/LLoez hNJSRbwFxyCUdc327P3+Q+DZKajc+JfZWY4JliNPXlDqNOq+zu3WsjAyGIJrAL4I03 g8tVWCDbwjbBA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RdxPt1H5pz9rxH; Sun, 3 Sep 2023 18:03:14 +0200 (CEST) In-Reply-To: <8bf9ac13-d620-4b5c-8e03-de21c4d85506@app.fastmail.com> (Bozhidar Batsov's message of "Sun, 03 Sep 2023 17:37:07 +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.66; envelope-from=philipk@posteo.net; helo=mout02.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=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:309997 Archived-At: "Bozhidar Batsov" writes: >> 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? > > Other than the contributor agreement there's development overhead to cons= ider: > > - 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 highl= y doubt that all the clojure-mode maintainers would be willing to deal with= this > - discussions related to problems/ideas would be happening in different p= laces To my knowledge, this is not an issue with the packages I have mentioned. Of course there are exceptions, but to my knowledge basically all conversation about org-mode happens on their mailing lists, basically all conversation about the modus themes, happen on Prot's mailing list/issue trackers. > - there's also so overhead of keeping the GitHub repo and the code in Ema= cs in sync This is a minor point, IMO, and if it is relevant, it will usually be because of a downstream change that should be upstreamed anyway (e.g. someone replaced all occurrences of an inefficient construct, and happens to do so in clojure-mode as well). > I can go on and on about this - hybrid development models simply come > with a lot of overhead.=20 The mistake I want to emphasise here is that this is not a "hybrid development model". Development continues on your own terms, and just gets copied over into emacs.git on a regular basis. > I get that here many people think that GitHub > is the 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 benefits to projects that can't be replicated elsewhere. At > least not today. While I disagree, especially with GitHubs recent 2FA push, IIUC I just want to clarify that this is not what is being discussed. Other than these points, is the CA the only major issue. Or to put it differently, if you could state the conditions for clojure-mode to be distributed with Emacs, what would your conditions be? My point here is just to clarify if there is a solution to this discussion -- in which case I think it is worth continuing it -- of if you /want to not want to/ have clojure-mode added to core Emacs? > > 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 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. >>=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 copyright >> 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 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 exampl= e. ]]] >> >> >> > >> >> >> > 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 s= upport 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 whatev= er the >> >> > >> >> > I don't know if this counts as "work on that" but here's two intere= sting 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 thin= g-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, fou= nd the >> >> > src/helloworld/core.clj inside it, pressed M-x eglot and suddenly I= had >> >> > at-point-documentation, diagnostics, lots of refactorings, completi= on, 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 sy= ntax >> >> > highlighting. I have no idea what it takes to add TreeSitter suppo= rt >> >> > to such a bare-bones mode (but shouldn't it be really easy like map= ping >> >> > 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 >>=20