From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id YJsVFyuKIGMtMwAAbAwnHQ (envelope-from ) for ; Tue, 13 Sep 2022 15:48:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id OKgNFyuKIGOzbwEA9RJhRA (envelope-from ) for ; Tue, 13 Sep 2022 15:48:27 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 081A91A949 for ; Tue, 13 Sep 2022 15:48:26 +0200 (CEST) Received: from localhost ([::1]:43304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oY6H3-0004pv-KH for larch@yhetil.org; Tue, 13 Sep 2022 09:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oY6Gj-0004nk-KE for guix-patches@gnu.org; Tue, 13 Sep 2022 09:48:13 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60711) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oY6Gh-0008EV-SY for guix-patches@gnu.org; Tue, 13 Sep 2022 09:48:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oY6Gh-0000OS-Or for guix-patches@gnu.org; Tue, 13 Sep 2022 09:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57737] [PATCH 4/6] gnu: Add emacs-eval-in-repl packages. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Sep 2022 13:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57737 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 57737@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 57737-submit@debbugs.gnu.org id=B57737.16630768531338 (code B ref 57737); Tue, 13 Sep 2022 13:48:03 +0000 Received: (at 57737) by debbugs.gnu.org; 13 Sep 2022 13:47:33 +0000 Received: from localhost ([127.0.0.1]:49403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY6GC-0000LP-N4 for submit@debbugs.gnu.org; Tue, 13 Sep 2022 09:47:33 -0400 Received: from 6.mo550.mail-out.ovh.net ([46.105.43.205]:59807) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oY6G7-0000Kj-08 for 57737@debbugs.gnu.org; Tue, 13 Sep 2022 09:47:28 -0400 Received: from player693.ha.ovh.net (unknown [10.110.103.202]) by mo550.mail-out.ovh.net (Postfix) with ESMTP id 37C6B24564 for <57737@debbugs.gnu.org>; Tue, 13 Sep 2022 13:47:25 +0000 (UTC) Received: from ngraves.fr (met42-h01-213-44-161-47.dsl.sta.abo.bbox.fr [213.44.161.47]) (Authenticated sender: ngraves@ngraves.fr) by player693.ha.ovh.net (Postfix) with ESMTPSA id 7C6502E7B062F; Tue, 13 Sep 2022 13:47:23 +0000 (UTC) X-OVh-ClientIp: 213.44.161.47 Date: Tue, 13 Sep 2022 15:47:06 +0200 Message-Id: <20220913134708.18554-4-ngraves@ngraves.fr> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913134708.18554-1-ngraves@ngraves.fr> References: <20220913134708.18554-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 9938318479310119650 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfedugedgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrieelfedrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehjeejfeejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehhedt X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1663076907; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=sqMjIQoCD28TUExwQ0eCeyDorzqHMwXK5rvoYC3zJPM=; b=A53X627/oyxqbeM97s9lkwpnDjj9SX2cEC7p3LmvEuvvPs2fPASmCRAH1gC0+pV06n4qDs tLiFV/e7I6KjeoqReG/q+ESHeYvZgOiPk46T6iqAGkJf9djh7FT+bsoaS0wgG7Ud8lNRMz 1PVuypwF7Fqpg7+muKV4VkEZjW5l2PRHEuD4XRMKnpoOC0PIq1NrMfH3xDHh+87IGH17gC L5x3EFaS4xSfSkx0/2Ma/5sw1QoO/yrbuGrMDfuUEHEIMByLbvzTK6exE42rW8xhfux6tC go7tl7ukZh4IN+6K92XBNPk4TM5NDyBgJ4eNZcJm+AxMgo92QWwyHoUDhsjZ5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663076907; a=rsa-sha256; cv=none; b=cra4XHpgxHBV5gYjBzlpP/PCcc/lVjUBGYlKSUoMaqvNibThs2vFobmK2bVw4Yq9x/MDue VT87bmYDf4WkASrMW6CvMVDw5uWRyzYsEg21+6CjC0jQM9LvvknxKgD5ZlRA25bkSsIHKD ecLEBzbqoEJLdsEPgYJgX0ytXD9wFGDxnFbBGZ2ONzCVKRUgLNshWUb202IVfFfA7NJY89 65ysG9qktcJAfRQpgXR6GGui1F3xNIaA7VfBpZ7nowBTuS2jYFcMmB0vWzHOqn6vd+6jvE GGxwHoTgP/GN8254AEDNTwv3l0YlMohueb7u5MiC8VUsTJJoClsqTWETIO1gSw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.81 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 081A91A949 X-Spam-Score: -2.81 X-Migadu-Scanner: scn1.migadu.com X-TUID: z9IDEV2j4Hhx * gnu/packages/emacs-xyz.scm (emacs-eval-in-repl): New variable. (emacs-eval-in-repl-ielm): New variable. (emacs-eval-in-repl-cider): New variable. (emacs-eval-in-repl-slime): New variable. (emacs-eval-in-repl-geiser): New variable. (emacs-eval-in-repl-racket): New variable. (emacs-eval-in-repl-scheme): New variable. (emacs-eval-in-repl-hy): New variable. (emacs-eval-in-repl-python): New variable. (emacs-eval-in-repl-ruby): New variable. (emacs-eval-in-repl-sml): New variable. (emacs-eval-in-repl-ocaml): New variable. (emacs-eval-in-repl-prolog): New variable. (emacs-eval-in-repl-javascript): New variable. (emacs-eval-in-repl-shell): New variable. (emacs-eval-in-repl-iex): New variable. (emacs-eval-in-repl-erlang): New variable. (emacs-eval-in-repl-elm): New variable. --- gnu/packages/emacs-xyz.scm | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 9dfb2cfdb7..d7b79d30b8 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -27110,6 +27110,83 @@ (define-public emacs-eval-in-repl @item eval-in-repl-elm for Elm @end itemize") (license license:expat))) + +(define (repl->lang s) + (cond + ((string= s "ielm") "Emacs Lisp") + ((string= s "cider") "Clojure") + ((string= s "slime") "Common Lisp") + ((string= s "geiser") "Racket/Scheme") + ((string= s "sml") "Standard ML") + ((string= s "iex") "Elixir") + ((string= s "ocaml") "OCaml") + (else (string-capitalize s)))) + +(define (lang->inputs s) + (cond + ((string= s "Clojure") (list emacs-cider)) + ((string= s "Common Lisp") (list emacs-slime)) + ((string= s "Racket/Scheme") (list emacs-geiser)) + ((string= s "Racket") (list emacs-racket-mode)) + ((string= s "Hy") (list emacs-hy-mode)) + ((string= s "Ruby") (list emacs-inf-ruby)) + ((string= s "Standard ML") (list emacs-sml-mode)) + ((string= s "OCaml") (list emacs-tuareg)) + ((string= s "Javascript") (list emacs-js2-mode emacs-js-comint)) + ((string= s "Elixir") (list emacs-elixir-mode emacs-alchemist)) + ((string= s "Erlang") (list emacs-erlang)) + ((string= s "Elm") (list emacs-elm-mode)) + (else '()))) + +(define (pack-eval-in-repl repl) + (let* ((lang (repl->lang repl)) + (inputs (lang->inputs lang))) + (package + (name (string-append "emacs-eval-in-repl-" repl)) + (version "0.9.7") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/kaz-yos/eval-in-repl") + (commit (string-append "v" version)))) + + (file-name (git-file-name name version)) + (sha256 + (base32 "1mrssbl0wyc6iij8zk1y3h9bd3rv53nnrxsij7fn67l1m4z0clyn")))) + (build-system emacs-build-system) + (arguments + `(#:include (list (string-append "eval-in-repl-" ,repl "\\.el")))) + (propagated-inputs (append (list emacs-eval-in-repl) inputs)) + (home-page "https://github.com/kaz-yos/eval-in-repl") + (synopsis "Consistent evaluation interface for Emacs Lisp REPLs for emacs") + (description (string-append "\ +This package provides a consistent ESS-like evaluation interface for +" lang " REPLs. Emacs Speaks Statistics (ESS) package has a nice function +called @code{ess-eval-region-or-line-and-step}, which is assigned to +C-RET. This function sends a line or a selected region to the corresponding +shell (R, Julia, Stata, etc) visibly. It also start up a shell if there is +none.")) + (license license:expat)))) + +(define-public emacs-eval-in-repl-ielm (pack-eval-in-repl "ielm")) +(define-public emacs-eval-in-repl-cider (pack-eval-in-repl "cider")) +(define-public emacs-eval-in-repl-slime (pack-eval-in-repl "slime")) +(define-public emacs-eval-in-repl-geiser (pack-eval-in-repl "geiser")) +(define-public emacs-eval-in-repl-racket (pack-eval-in-repl "racket")) +(define-public emacs-eval-in-repl-scheme (pack-eval-in-repl "scheme")) +(define-public emacs-eval-in-repl-hy (pack-eval-in-repl "hy")) +(define-public emacs-eval-in-repl-python (pack-eval-in-repl "python")) +(define-public emacs-eval-in-repl-ruby (pack-eval-in-repl "ruby")) +(define-public emacs-eval-in-repl-sml (pack-eval-in-repl "sml")) +(define-public emacs-eval-in-repl-ocaml (pack-eval-in-repl "ocaml")) +(define-public emacs-eval-in-repl-prolog (pack-eval-in-repl "prolog")) +(define-public emacs-eval-in-repl-javascript (pack-eval-in-repl "javascript")) +(define-public emacs-eval-in-repl-shell (pack-eval-in-repl "shell")) +(define-public emacs-eval-in-repl-iex (pack-eval-in-repl "iex")) +(define-public emacs-eval-in-repl-erlang (pack-eval-in-repl "erlang")) +(define-public emacs-eval-in-repl-elm (pack-eval-in-repl "elm")) + (define-public emacs-eval-sexp-fu-el (package (name "emacs-eval-sexp-fu-el") -- 2.37.3