From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org>
To: 57737@debbugs.gnu.org
Cc: ngraves@ngraves.fr
Subject: [bug#57737] [PATCH 5/7] gnu: Add emacs-eval-in-repl packages.
Date: Tue, 13 Sep 2022 23:41:05 +0200 [thread overview]
Message-ID: <20220913214107.23146-5-ngraves@ngraves.fr> (raw)
In-Reply-To: <20220913214107.23146-1-ngraves@ngraves.fr>
* 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 | 85 ++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 59acc6a24d..ca7597dfde 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -240,6 +240,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))
@@ -27176,6 +27178,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") (list emacs-cider))
+ ((string= s "slime") (list emacs-slime))
+ ((string= s "sly") (list emacs-sly))
+ ((string= s "geiser") (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 "sml") (list emacs-sml-mode))
+ ((string= s "ocaml") (list emacs-tuareg))
+ ((string= s "javascript") (list emacs-js2-mode emacs-js-comint))
+ ((string= s "iex") (list emacs-elixir-mode emacs-alchemist))
+ ((string= s "erlang") (list emacs-erlang))
+ ((string= s "elm") (list emacs-elm-mode))
+ ((string= s "lua") (list 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) 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 (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
next prev parent reply other threads:[~2022-09-13 21:42 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-11 18:03 [bug#57737] emacs-eval-in-repl patches Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 01/22] gnu: Add emacs-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 02/22] gnu: Add emacs-eval-in-repl-ielm Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 03/22] gnu: Add emacs-eval-in-repl-cider Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 04/22] gnu: Add emacs-eval-in-repl-slime Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 05/22] gnu: Add emacs-eval-in-repl-geiser Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 06/22] gnu: Add emacs-eval-in-repl-racket Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 07/22] gnu: Add emacs-eval-in-repl-scheme Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 08/22] gnu: Add emacs-eval-in-repl-hy Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 09/22] gnu: Add emacs-eval-in-repl-python Nicolas Graves via Guix-patches via
2022-09-11 18:15 ` [bug#57737] [PATCH 10/22] gnu: Add emacs-eval-in-repl-ruby Nicolas Graves via Guix-patches via
2022-09-11 18:16 ` [bug#57737] [PATCH 11/22] gnu: Add emacs-eval-in-repl-sml Nicolas Graves via Guix-patches via
2022-09-11 18:16 ` [bug#57737] [PATCH 12/22] gnu: Add emacs-eval-in-repl-ocaml Nicolas Graves via Guix-patches via
2022-09-11 18:19 ` [bug#57737] [PATCH 01/10] gnu: Add emacs-eval-in-repl-prolog Nicolas Graves via Guix-patches via
2022-09-11 18:19 ` [bug#57737] [PATCH 02/10] gnu: Add emacs-js-comint Nicolas Graves via Guix-patches via
2022-09-11 18:19 ` [bug#57737] [PATCH 03/10] gnu: Add emacs-eval-in-repl-javascript Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 1/7] gnu: Add emacs-eval-in-repl-shell Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 2/7] gnu: Add emacs-alchemist Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 3/7] gnu: Add emacs-eval-in-repl-iex Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 4/7] gnu: Add emacs-eval-in-repl-erlang Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 5/7] gnu: Add emacs-eval-in-repl-elm Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 6/7] gnu: Add emacs-ob-elm Nicolas Graves via Guix-patches via
2022-09-11 18:21 ` [bug#57737] [PATCH 7/7] gnu: Add emacs-org-babel-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-11 20:02 ` [bug#57737] emacs-eval-in-repl patches Liliana Marie Prikler
2022-09-13 13:47 ` [bug#57737] [PATCH 1/6] gnu: Add emacs-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-13 13:47 ` [bug#57737] [PATCH 2/6] gnu: Add emacs-js-comint Nicolas Graves via Guix-patches via
2022-09-13 13:47 ` [bug#57737] [PATCH 3/6] gnu: Add emacs-alchemist Nicolas Graves via Guix-patches via
2022-09-13 13:47 ` [bug#57737] [PATCH 4/6] gnu: Add emacs-eval-in-repl packages Nicolas Graves via Guix-patches via
2022-09-13 17:20 ` Maxime Devos
2022-09-13 17:22 ` ( via Guix-patches via
2022-09-13 19:51 ` Liliana Marie Prikler
2022-09-13 13:47 ` [bug#57737] [PATCH 5/6] gnu: Add emacs-ob-elm Nicolas Graves via Guix-patches via
2022-09-13 13:47 ` [bug#57737] [PATCH 6/6] gnu: Add emacs-org-babel-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-13 21:41 ` [bug#57737] [PATCH 1/7] gnu: emacs-elixir-mode: Move package for eval-in-repl definition Nicolas Graves via Guix-patches via
2022-09-13 21:41 ` [bug#57737] [PATCH 2/7] gnu: Add emacs-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-13 21:41 ` [bug#57737] [PATCH 3/7] gnu: Add emacs-js-comint Nicolas Graves via Guix-patches via
2022-09-13 21:41 ` [bug#57737] [PATCH 4/7] gnu: Add emacs-alchemist Nicolas Graves via Guix-patches via
2022-09-13 21:41 ` Nicolas Graves via Guix-patches via [this message]
2022-09-13 21:41 ` [bug#57737] [PATCH 6/7] gnu: Add emacs-ob-elm Nicolas Graves via Guix-patches via
2022-09-13 21:41 ` [bug#57737] [PATCH 7/7] gnu: Add emacs-org-babel-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-13 21:50 ` [bug#57737] Thanks for your reviews! Nicolas Graves via Guix-patches via
2022-09-14 7:09 ` zimoun
2022-09-16 12:30 ` [bug#57737] [PATCH v4 1/6] gnu: Add emacs-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-16 12:30 ` [bug#57737] [PATCH v4 2/6] gnu: Add emacs-js-comint Nicolas Graves via Guix-patches via
2022-09-16 12:30 ` [bug#57737] [PATCH v4 3/6] gnu: Add emacs-alchemist Nicolas Graves via Guix-patches via
2022-09-16 12:31 ` [bug#57737] [PATCH v4 1/2] gnu: Add emacs-ob-elm Nicolas Graves via Guix-patches via
2022-09-16 12:31 ` [bug#57737] [PATCH v4 2/2] gnu: Add emacs-org-babel-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-16 12:44 ` [bug#57737] sorry again for the broken sent Nicolas Graves via Guix-patches via
2022-09-23 16:34 ` Liliana Marie Prikler
2022-09-23 18:29 ` Nicolas Graves via Guix-patches via
2022-09-23 23:53 ` bug#57737: " Liliana Marie Prikler
2022-09-25 14:34 ` [bug#57737] " zimoun
2022-09-16 12:47 ` [bug#57737] [PATCH v4 4/6] gnu: Add emacs-eval-in-repl packages Nicolas Graves via Guix-patches via
2022-09-23 18:34 ` [bug#57737] [PATCH v5 1/6] gnu: Add emacs-eval-in-repl Nicolas Graves via Guix-patches via
2022-09-23 18:34 ` [bug#57737] [PATCH v5 2/6] gnu: Add emacs-js-comint Nicolas Graves via Guix-patches via
2022-09-23 18:34 ` [bug#57737] [PATCH v5 3/6] gnu: Add emacs-alchemist Nicolas Graves via Guix-patches via
2022-09-23 18:34 ` [bug#57737] [PATCH v5 4/6] gnu: Add emacs-eval-in-repl packages Nicolas Graves via Guix-patches via
2022-09-23 18:34 ` [bug#57737] [PATCH v5 5/6] gnu: Add emacs-ob-elm Nicolas Graves via Guix-patches via
2022-09-23 18:34 ` [bug#57737] [PATCH v5 6/6] gnu: Add emacs-org-babel-eval-in-repl Nicolas Graves via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220913214107.23146-5-ngraves@ngraves.fr \
--to=guix-patches@gnu.org \
--cc=57737@debbugs.gnu.org \
--cc=ngraves@ngraves.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).