From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: Brand new clojure support in Emacs ;-) Date: Fri, 01 Sep 2023 11:14:14 +0100 Message-ID: <87v8cu5hft.fsf@gmail.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> 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="7703"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 01 12:12:31 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 1qc18g-0001mE-Ge for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Sep 2023 12:12:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qc17s-00061U-DJ; Fri, 01 Sep 2023 06:11:40 -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 1qc17q-0005zU-7P for emacs-devel@gnu.org; Fri, 01 Sep 2023 06:11:38 -0400 Original-Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qc17n-0001Bz-Q8; Fri, 01 Sep 2023 06:11:37 -0400 Original-Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31c63cd4ec2so1519690f8f.0; Fri, 01 Sep 2023 03:11:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693563093; x=1694167893; darn=gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y0dKPipyka1GwnvPeGMGNl8j6L6dZaN0mtFJzVqFYsE=; b=c2TJUHZop9ybKrM1Fqgwp4ZUJ3VSI1fVD4GRXleZZP+7HkDdpjnN2/5KIMmEw/15Tn o+lTwMnpahRbL10Pw/6BxKoAYrbjyddoHvd96EA70SLVVXTMTHyjysO/Ljuh8PTKQ2Po sYxEry0ZajBDqAJkH175QfvBg/CFQppZW15doZhTkWX3yYr3Pq6WF+X4tHLNN3MUECbX vvSoGqfi3W6jy4vJi0aN8vTM4z8ug/STTauFm8qq5Ba4bEEPldvzlpIW/PYJEd22NWy0 JMaS2i/Vsu3RbwaBxx1Fe98LJKJTZ3RnWoCTSS5zzSf1NWtfjxrAL1SnX/SnbQj5GFB3 RYWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693563093; x=1694167893; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=y0dKPipyka1GwnvPeGMGNl8j6L6dZaN0mtFJzVqFYsE=; b=JRakGASmkfhBqXASi/XNkRjzSy20XGT7Pv0E79xGhUQ0x0du8jefHLCcY2pqi7N6xB jEMjwj8Py3KSbjkDpMS7ndFZwDneyje54K5c1OUCkPizG5ZkchY09mcazXX2ddS1Nif0 6EevzDBcIfwztsG8Ra4l8Fbta0BmXK1ogYb+6Uomtb4Bke3SRD7hN3PC1n+kUsu/Iw7n m6UpJB+98JfIJe5NXKrcZNoU4rormdzYDQJtKZN8+/gh5i3P+HCoyPUNz8oPh8uJVmBJ fR5b6KzVX3xpjFEzGgi9wl7mfo1fdrLH5Fm6OpLo997yqQoYyHBKmMI9ap8I7Q+xfDfe DpAQ== X-Gm-Message-State: AOJu0YwlxSktVyrNotZ9MTNugr/mnGqYVbO4C5osqIK4hZ1P5gOiDSVL e+PNkpSIeG8KfKNOXRC5gxfxWPz0tnVTGw== X-Google-Smtp-Source: AGHT+IFFshq5XiNVEqfc/ACzvw9VWhDmo+L2u/WcoJDcEFkYsmdlmMwkz821nFeEF5UrwgEJYdTBug== X-Received: by 2002:a5d:4b87:0:b0:31c:6591:d40d with SMTP id b7-20020a5d4b87000000b0031c6591d40dmr1584695wrt.29.1693563093146; Fri, 01 Sep 2023 03:11:33 -0700 (PDT) Original-Received: from krug (a95-92-228-31.cpe.netcabo.pt. [95.92.228.31]) by smtp.gmail.com with ESMTPSA id a16-20020adfe5d0000000b003179b3fd837sm4806456wrn.33.2023.09.01.03.11.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Sep 2023 03:11:32 -0700 (PDT) In-Reply-To: (Richard Stallman's message of "Thu, 31 Aug 2023 21:16:14 -0400") Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=joaotavora@gmail.com; helo=mail-wr1-x435.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:309749 Archived-At: Richard Stallman writes: > packages you used, so I don't know what they do. More crucially, for > most of them I can't tell whether they are part of Emacs or not. > (They might be in NonGNU ELPA, or not connected with Emacs at all.) > Could you please describe that status? OK. Here are the ingredients: 1. Emacs (you know this one) 2. lisp-data-mode (a part of core Emacs) =20=20 3. Eglot (already a part of core Emacs). Eglot is an LSP client. Read Emacs's manual on Eglot for what LSP is and what it does 4. clojure-lsp (not a part of Emacs) an MIT-licensed Language server. An external program, which most likely requires a Java runtime environment (JRE). This external program is meant to run as an inferior process to Emacs. Again, read Emacs's manual on Eglot to learn what a language server provides and how it communicates with Emacs. You've read the full code to the proposed Clojure mode already. Here it is again: (define-derived-mode clojure-mode lisp-data-mode "Clojure" "Barebones Clo= jure") (add-to-list 'auto-mode-alist '("\\.clj" . clojure-mode)) Now, if you only use ingredients 1 and 2 this brand new Clojure mode is reasonably poor in functionality, but it's still useful. Sexp-based navigation and editing works as always, as does parenthesis matching and highlighting. There is very basic syntax highlighting. Not much more, because you are looking at Clojure code as Lisp-style forms (as happens with all Lisps). When you add ingredients 3 and 4 (Eglot and the clojure-lsp server), the major mode is enhanced by them and becomes vastly more powerful. You get a. at-point documentation in the style of Eldoc b. cross-referencing capabilities (find definitions/references) in the style of 80's Lisp machines c. in-buffer annotations of syntactic errors and other problems d. context-sensitive completion e. refactoring actions f. probably a lot more stuff I don't know how this compares to the NonGNU Clojure mode because I've never really used it. That NonGNU Clojure mode can certainly also be enhanced with LSP Jo=C3=A3o