From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: Brand new clojure support in Emacs ;-) Date: Fri, 1 Sep 2023 10:10:27 -0700 Message-ID: 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> <835y4ucrz3.fsf@gnu.org> <831qficgin.fsf@gnu.org> <87ttsehwab.fsf@dfreeman.email> <87fs3x6ge7.fsf@gmail.com> <87v8cthmzl.fsf@dfreeman.email> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) 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="13176"; mail-complaints-to="usenet@ciao.gmane.io" Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Eli Zaretskii , Dmitry Gutov , Richard Stallman , emacs-devel@gnu.org To: Danny Freeman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 01 19:11: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 1qc7gM-0003Ee-C2 for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Sep 2023 19:11:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qc7fR-0007Zp-NX; Fri, 01 Sep 2023 13:10:45 -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 1qc7fQ-0007Zg-Eo for emacs-devel@gnu.org; Fri, 01 Sep 2023 13:10:44 -0400 Original-Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qc7fN-0004Xs-Sa; Fri, 01 Sep 2023 13:10:44 -0400 Original-Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-68a529e1974so1747778b3a.3; Fri, 01 Sep 2023 10:10:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693588240; x=1694193040; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XPIoGHAoHqMM18C64rUaxMLE72quDNrM5o98C2uQSz4=; b=Uj43QtE18pB/YtK3cqFOwCNpbkMDUMyb0Qr6sRSunoaz4WkaUygTReVj3TALfCKQg6 V9nT3Yb687SXycYaq5TIjT3bd0tuTYX0/i8L2xqvvqWCZQR3yWzmJYMe6/TCF7EydTQV NDHFTiAPFg1yAdbW2srJkzlWES9gF2McND/aNXnn/15Vtv5P4oNPOL2wkNPZIgxWp8qz ngDm+5LM67satJ4l8tWK5sgrptk0jSw13NKzBvvgHSBb8Vj9Tcf18ZDEAtrC+Db0V09B xac4MABOL0q8o4ISAyyBPHeFCD1HuOafi4ODl6t+8/FyPR8hp2vwyWQwWgP3/AqbRcJU lXxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693588240; x=1694193040; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XPIoGHAoHqMM18C64rUaxMLE72quDNrM5o98C2uQSz4=; b=A8wCvmPNUY1BT41Wk/IaILh4F5vzxtsLbJYZxEVs622bOgvO0u1BbdkiQJqdymi+pD QAhj7rk0+dDpncL4XU9RUyUiYaE04/EncwRHSHChKhOmgjan0b8dfXNI4B+5qowulpFD ElfJa924N5wHtm2tdAZTY+RX92gbDL6OEKcOnkxbOWlfiqpE+epJMpICtkvmmOYorjNw QvVnprgHSBNhnePe70ZtLHjYIVbefUeB/QajMS+NKt2kvJMqyPeLy13g5Hdz62y3F9RL Q3o6miZzZMISgaObwZhT8DkpeUbFQ+cpGfdZQKLewTT9EgfReVWphIxiIRc5m/Gl4frV 5U+A== X-Gm-Message-State: AOJu0YxlUgFynyeqc3BQObosBJeCuCtKP0M/Axw6fP8M7gBw5q4EdiYx FrXoUjSv+IF3NBR/9Xry1tc= X-Google-Smtp-Source: AGHT+IHy8XwqNQh8F3bSbg6UFuTARvfnJJowHr1FevqjkmLapYr5lPZk70ZNGKurf0w/9dGnP0XFAA== X-Received: by 2002:a05:6a00:2303:b0:68a:4dfa:ea63 with SMTP id h3-20020a056a00230300b0068a4dfaea63mr3627951pfh.19.1693588239569; Fri, 01 Sep 2023 10:10:39 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id b15-20020a63714f000000b0056c24c2e23dsm3032940pgn.25.2023.09.01.10.10.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2023 10:10:39 -0700 (PDT) In-Reply-To: <87v8cthmzl.fsf@dfreeman.email> X-Mailer: Apple Mail (2.3731.700.6) Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=casouri@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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:309821 Archived-At: > On Sep 1, 2023, at 8:53 AM, Danny Freeman = wrote: >=20 >=20 > Jo=C3=A3o T=C3=A1vora writes: >=20 >> I think there is still a fair amount of exaggerated alarm over the >> simple issue of Emacs providing a major mode for Clojure in some = future >> version. Emacs traditionally provides major modes for every major >> programming language. There is no shred of evidence of any = inclination >> of the Emacs project to sow chaos in the workflows of Clojure >> programmers just for the heck of it. >>=20 >> Of course the naming issue is real, >=20 > Yes, I'm glad to see you acknowledge this as an issue. The naming = issue > is all I'm trying to speak to right now. =46rom a nontechnical side, taking over a package name that has been = around for 15 years, is very popular, is depended by thousands of Emacs = users, would leave a bad taste is the mouth for clojure-mode developers = and users. And it certainly wouldn=E2=80=99t help with the reputation of = Emacs developers being hard to approach. I don=E2=80=99t get the technical advantage of taking over the name = either. For a basic better-than-nothing default mode, the user probably = won=E2=80=99t even notice its name=E2=80=94the major mode just starts = when one opens a Clojure file. And serious Clojure developers will just = install Clojure-mode and CIDER instead. >=20 >> but deciding on it is one of the >> very last things to address on and it depends on what the new mode = would >> be able to do. So don't put the bulls in front of the carriage. Not = to >> mention there is lots of prior-art for technical means to manage >> clashing names. Not only in Emacs, but most everywhere. For = example: >> if I ask my system package manager to install "java" I get a number = of >> possibilities. None of these options is more "java" than the other. = I >> get to choose which one is fits my needs better. Symlinks to >> executables and libraries get setup appropriately, etc. >=20 > Avoiding name collisions is a great and simple way to deal with this. >=20 >> So, there is no "hijacking" at stake because there isn't (or at least >> there shouldn't be) the concept of property or ownership of a name, >> especially something as generic as "Clojure mode". Plus, what = matters >> to Clojure programmers generally isn't the really the NonGNU = provenance >> of their daily working tools. If anything, I've seen evidence of the >> contrary, witnessing some users switch to Emacs's core facilities = even >> if they are _less_ featureful than third-party alternatives, = _precisely_ >> because they trust the Emacs project's stability and longevity. I've >> seen this with Flymake and most recently with Eglot. >=20 > I too have witnessed this recently with Eglot, but only with respect = to > switching from lsp-mode, not using Eglot and flymake as a substitute = for > CIDER, of which there is some overlap in functionality, but both have > features the other does not offer. CIDER is still the killer feature > that draws clojure programmers to Emacs. >=20 >> What _really_ matters to users is what they can do with their Clojure >> tools. >>=20 >> With that in mind, and since you sincerely state you want to move = this >> discussion in a productive direction, what are -- in your opinion -- = the >> 5 most important features supported by the the NonGNU Clojure mode = and >> the brand new NonGNU Clojure TreeSitter mode? >=20 > In no particular order: > - Clojure-mode has built in refactoring tools, not all of which exist = in > clojure-lsp (to the best of my knowledge). > - Clojure-mode provides an API for tools like CIDER and inf-clojure to > interact with clojure buffers. > - Clojure-mode integrates with CIDER to allow clojure macros and > functions to define indentation rules as part of their metadata. I'm > not sure if it will even be possible for clojure-ts-mode to do this. >=20 > The rest would be run-of-the-mill major mode stuff. The real value of > clojure-mode lies in it's integration with CIDER and to a lesser = extent > inf-clojure. >=20 > There is nothing very special about clojure-ts-mode that I develop = right > now. It is a work in progress and far from finished. It's not even = quite > to the point where I can dogfood it at work yet. A long term goal is = to > provide everything clojure-mode provides for CIDER with = clojure-ts-mode. >=20 >> As a Clojure programmer, >> do you personally use LSP? What are the LSP and nonLSP commands you >> find yourself invoking most often. >=20 > Yes, I am a happy user of Eglot and clojure-lsp, a refugee from > lsp-mode that you spoke of above. I mainly use it for > - xref navigation > - eldoc integration > - flymake error reporting > - renaming symbols >=20 > It's a very nice experience and pairs well with CIDER, especially when = I > don't feel like starting up a repl. As you may remember, I also wrote > the jarchive package to integrate with Eglot for navigating to sources > outside of an existing clojure project. I use jarchive every day. >=20 > Non LSP commands I find myself invoking a lot are >=20 > - A large array of CIDER repl evaluation commands. > - CIDER documentation commands, which have different contents than = those > provided by clojure-lsp. They are both useful in their own ways. > - The CIDER inspector, almost an application in and of itself which is > used for examining clojure data. > - The CIDER debugger. It is hands down one of the best debuggers I = have > used. Better than the other de-factor clojure development experience > offered by the proprietary intellij IDE. > - CIDER test commands (i.e. run tests that exercise the current = function > at point, or current namespace, or last failed test) > - Clojure error examination - clojure is notorious for it's hard to > understand error messages, cider or clojure mode, not sure which, > provides a mode for interacting with errors that makes them easier to > reason about. >=20 >> Can you say if CIDER is prepared to >> work with major modes other than the NonGNU Clojure mode? >=20 > No I cannot, as I am not a CIDER developer. There is a large overlap > between clojure-mode and CIDER developers though. I can guess that = using > the name "clojure-mode" for whatever you land on here will make them > less open to working with a built in mode. Again, I don't speak for > them, but I think this is a good guess. >=20 > -- =20 > Danny Freeman >=20