From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 8DAwO59wJGPCfwEAbAwnHQ (envelope-from ) for ; Fri, 16 Sep 2022 14:48:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YOg/O59wJGPE9QAA9RJhRA (envelope-from ) for ; Fri, 16 Sep 2022 14:48:31 +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 AD7FDD3C4 for ; Fri, 16 Sep 2022 14:48:31 +0200 (CEST) Received: from localhost ([::1]:57318 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oZAli-0005dx-Qq for larch@yhetil.org; Fri, 16 Sep 2022 08:48:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oZAlK-0005dG-DI for guix-patches@gnu.org; Fri, 16 Sep 2022 08:48:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43010) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oZAlG-0004JL-T7 for guix-patches@gnu.org; Fri, 16 Sep 2022 08:48:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oZAlF-0006Kw-Nl for guix-patches@gnu.org; Fri, 16 Sep 2022 08:48:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57737] [PATCH v4 4/6] gnu: Add emacs-eval-in-repl packages. References: <874jxdlrez.fsf@ngraves.fr> In-Reply-To: <874jxdlrez.fsf@ngraves.fr> Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Sep 2022 12:48:01 +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 Received: via spool by 57737-submit@debbugs.gnu.org id=B57737.166333245824247 (code B ref 57737); Fri, 16 Sep 2022 12:48:01 +0000 Received: (at 57737) by debbugs.gnu.org; 16 Sep 2022 12:47:38 +0000 Received: from localhost ([127.0.0.1]:42088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZAkr-0006Ix-V5 for submit@debbugs.gnu.org; Fri, 16 Sep 2022 08:47:38 -0400 Received: from 17.mo583.mail-out.ovh.net ([46.105.56.132]:60229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oZAkp-0006IZ-1p for 57737@debbugs.gnu.org; Fri, 16 Sep 2022 08:47:36 -0400 Received: from player750.ha.ovh.net (unknown [10.108.20.214]) by mo583.mail-out.ovh.net (Postfix) with ESMTP id C185125A36 for <57737@debbugs.gnu.org>; Fri, 16 Sep 2022 12:47:33 +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 player750.ha.ovh.net (Postfix) with ESMTPSA id 52E092E91B002 for <57737@debbugs.gnu.org>; Fri, 16 Sep 2022 12:47:33 +0000 (UTC) X-OVh-ClientIp: 213.44.161.47 Date: Fri, 16 Sep 2022 14:47:32 +0200 Message-ID: <87edwbjxjv.fsf@ngraves.fr> MIME-Version: 1.0 Content-Type: text/plain X-Ovh-Tracer-Id: 8098879507490661068 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvtddgheekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvffufffkgggtsehttdertddttddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepteefueekheeltdffvdeiueeljeekhfduuefhudekgfdtveegteegtdekheeuiedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkpheptddrtddrtddrtddpvddufedrgeegrdduiedurdegjeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghlohepphhlrgihvghrjeehtddrhhgrrdhovhhhrdhnvghtpdhinhgvtheptddrtddrtddrtddpmhgrihhlfhhrohhmpehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpnhgspghrtghpthhtohepuddprhgtphhtthhopeehjeejfeejseguvggssghughhsrdhgnhhurdhorhhgpdfovfetjfhoshhtpehmohehkeef 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=1663332511; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: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=2XxaSmyRqcNtAfoE5Gj6aWD/LC5+QzZMWN8HFhs7Vb8=; b=I7irXi/fHtBrybJRqduRvxw5gNlkNVv7gyDaewxZ8+9twzcTn7GUW0zLQxlv0hjh53jTMt 5Q+FoKxfkCICEiOT9ZGBGjmYkg08Op+6D0PBtDts6UKeTDMh8rhsOeaUGTzI35QHh9yf4R 50/RO0N96EiRL1d59yrqUPhfjJwGeyY9E3J//0VipAaSyKFUsnIFj5SvTOmzMZ9WFLlbOP 8/HqhFBbCulRPDp7EJ8K5tEwDOsOwFM9CDedCGx1k2Sz6QQgOArOBg/zGCM8xR4rveGHHC TM6+yYLYL/wfAFC3VuS2iKP09/daBNqJ0cOeg+8b0oFWFisl2YIlKyRBDh35lA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1663332511; a=rsa-sha256; cv=none; b=F4sgL0KsDIDOIXIe/T5HzJ81y6p2k+tqqbKFDTHaoVtMmuppGUtGXD4sf2iqRbD0EXFHb5 R7aF+iZUxQAQcYhCicOcCra4Q/i5/PGTxLkgz08mi6aAHZAdfWHDkDrTuA+75A3nlY7FMB oWiRAPG9+qVLH4uMwTYEiWV+h0wQlGpLeCsoVuuNF2jEgAzkz78gfRtcLSnOTTIZX/KR9b 2vP7c5ohqTuYbZF4BJyrz3Rqt3nPyS7kTai1agroXl7k75suWheJw2LYQruxyhqQVzycQu EDeQUc0gGexeoW2b5HX/R0qxAW70KGqyd0uUvmuM6jUhuR+xPP8t518AADKhQA== 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: -1.83 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: AD7FDD3C4 X-Spam-Score: -1.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: exTn93/AteqZ * 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-sly): 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. (emacs-eval-in-repl-lua): New variable. --- gnu/packages/emacs-xyz.scm | 86 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index ac35e57773..9db49cd8a7 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -140,6 +140,7 @@ (define-module (gnu packages emacs-xyz) #:use-module (guix download) #:use-module (guix bzr-download) #:use-module (guix gexp) + #:use-module (guix i18n) #:use-module (guix git-download) #:use-module (guix hg-download) #:use-module (guix build-system gnu) @@ -240,6 +241,8 @@ (define-module (gnu packages emacs-xyz) #:use-module (gnu packages photo) #:use-module (gnu packages uml) #:use-module (gnu packages finance) + #:use-module (gnu packages ocaml) + #:use-module (gnu packages erlang) #:use-module (guix utils) #:use-module (srfi srfi-1) #:use-module (ice-9 match)) @@ -27152,6 +27155,89 @@ (define-public emacs-eval-in-repl @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 "sly") "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 (repl->inputs s) + (cond + ((string= s "cider") '("emacs-cider")) + ((string= s "slime") '("emacs-slime")) + ((string= s "sly") '("emacs-sly")) + ((string= s "geiser") '("emacs-geiser")) + ((string= s "racket") '("emacs-racket-mode")) + ((string= s "hy") '("emacs-hy-mode")) + ((string= s "ruby") '("emacs-inf-ruby")) + ((string= s "sml") '("emacs-sml-mode")) + ((string= s "ocaml") '("emacs-tuareg")) + ((string= s "javascript") '("emacs-js2-mode" "emacs-js-comint")) + ((string= s "iex") '("emacs-elixir-mode" "emacs-alchemist")) + ((string= s "erlang") '("emacs-erlang")) + ((string= s "elm") '("emacs-elm-mode")) + ((string= s "lua") '("emacs-lua-mode")) + (else '()))) + +(define (make-emacs-eval-in-repl repl) + (let* ((lang (repl->lang repl)) + (inputs (repl->inputs repl))) + (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) + (map specification->package+output inputs))) + (home-page "https://github.com/kaz-yos/eval-in-repl") + (synopsis "Consistent evaluation interface for Emacs Lisp REPLs for emacs") + (description (G_ (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 (make-emacs-eval-in-repl "ielm")) +(define-public emacs-eval-in-repl-cider (make-emacs-eval-in-repl "cider")) +(define-public emacs-eval-in-repl-slime (make-emacs-eval-in-repl "slime")) +(define-public emacs-eval-in-repl-sly (make-emacs-eval-in-repl "sly")) +(define-public emacs-eval-in-repl-geiser (make-emacs-eval-in-repl "geiser")) +(define-public emacs-eval-in-repl-racket (make-emacs-eval-in-repl "racket")) +(define-public emacs-eval-in-repl-scheme (make-emacs-eval-in-repl "scheme")) +(define-public emacs-eval-in-repl-hy (make-emacs-eval-in-repl "hy")) +(define-public emacs-eval-in-repl-python (make-emacs-eval-in-repl "python")) +(define-public emacs-eval-in-repl-ruby (make-emacs-eval-in-repl "ruby")) +(define-public emacs-eval-in-repl-sml (make-emacs-eval-in-repl "sml")) +(define-public emacs-eval-in-repl-ocaml (make-emacs-eval-in-repl "ocaml")) +(define-public emacs-eval-in-repl-prolog (make-emacs-eval-in-repl "prolog")) +(define-public emacs-eval-in-repl-shell (make-emacs-eval-in-repl "shell")) +(define-public emacs-eval-in-repl-iex (make-emacs-eval-in-repl "iex")) +(define-public emacs-eval-in-repl-erlang (make-emacs-eval-in-repl "erlang")) +(define-public emacs-eval-in-repl-elm (make-emacs-eval-in-repl "elm")) +(define-public emacs-eval-in-repl-lua (make-emacs-eval-in-repl "lua")) +(define-public emacs-eval-in-repl-javascript + (make-emacs-eval-in-repl "javascript")) + + (define-public emacs-eval-sexp-fu-el (package (name "emacs-eval-sexp-fu-el") -- 2.37.3 <#secure method=pgpmime mode=sign> -- Best regards, Nicolas Graves