From patchwork Fri Dec 16 13:14:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joeke de Graaf X-Patchwork-Id: 8380 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8A13E27BBEB; Fri, 16 Dec 2022 13:15:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6861627BBE9 for ; Fri, 16 Dec 2022 13:15:19 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p6AYK-0003o8-Tl; Fri, 16 Dec 2022 08:15:04 -0500 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 1p6AYI-0003mv-J9 for guix-patches@gnu.org; Fri, 16 Dec 2022 08:15:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p6AYI-00037m-AN for guix-patches@gnu.org; Fri, 16 Dec 2022 08:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p6AYI-0002sk-58 for guix-patches@gnu.org; Fri, 16 Dec 2022 08:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59930] [PATCH] gnu: Add emacs-islisp-mode References: <87pmcse1fo.fsf@kleptop.mail-host-address-is-not-set> In-Reply-To: <87pmcse1fo.fsf@kleptop.mail-host-address-is-not-set> Resent-From: Joeke de Graaf Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 16 Dec 2022 13:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59930 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59930@debbugs.gnu.org Received: via spool by 59930-submit@debbugs.gnu.org id=B59930.167119650111061 (code B ref 59930); Fri, 16 Dec 2022 13:15:02 +0000 Received: (at 59930) by debbugs.gnu.org; 16 Dec 2022 13:15:01 +0000 Received: from localhost ([127.0.0.1]:49207 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6AYG-0002sL-RX for submit@debbugs.gnu.org; Fri, 16 Dec 2022 08:15:01 -0500 Received: from mout02.posteo.de ([185.67.36.66]:58961) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6AYD-0002sF-9Y for 59930@debbugs.gnu.org; Fri, 16 Dec 2022 08:14:58 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E7F19240109 for <59930@debbugs.gnu.org>; Fri, 16 Dec 2022 14:14:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671196490; bh=mJVgnAswOplqfLzN33c7eMuZkRM9aAL2JRTI+Ua1Yr0=; h=Date:From:To:Subject:From; b=lEXuDSDcTw7HWZykLwurn2ePLG1DXqRhs4xeQGq8u0ZhKd4yTW0NlbilgDmwhSi5Z dfIfEFuVTVXmfMAbKYKMx+e7I0evYPOhOdWY9qQS1ZWP4XPXXHUrRhAr/453YJYjO5 ElpJ7Eg2tLkc64HF0AxGnCG9I97Amyje2gzBwjOliROXKxBFpOWhYznkXZgGgIk9md ESZfB+DWLYJppeO7A1gu8PjTs/jVMg5PDXOGEp+aYikLkDov5iIFmS/POJDcR9ekko FpLT7Y0imv8M2Iry1ydVh/6gnieF2cAN3XhOPmGbAsSBCv+MesWvo+IOUzk/2aKqHB vmR+Ev8nz8dLA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NYV200V3Jz6tn5 for <59930@debbugs.gnu.org>; Fri, 16 Dec 2022 14:14:47 +0100 (CET) MIME-Version: 1.0 Date: Fri, 16 Dec 2022 13:14:47 +0000 From: Joeke de Graaf Message-ID: 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches > You can use (elpa-directory #$output) instead of (string-append ...) Thanks, I did not know about elpa-directory. > You can use for-each instead of map since you don't need the return > value. Moreover, `copy-recursively' is probably shorter. > > However, this will catch neither the ".el" file nor the ".lsp" file in > "implementations/easy-islisp" directory. What should we do about the > latter ? It seems Emacs has a hard time finding easy-islisp.el when using copy-recursively, since it's put inside a directory. The easy solution would be to 'expand' the regex in find-files like this: (lambda _ (let ((site-lisp-dir (elpa-directory #$output))) (for-each (lambda (dir) (copy-recursively dir elpa-directory) (with-directory-excursion dir (for-each (lambda (file) (install-file file site-lisp-dir)) (find-files "." "\\.(lsp|el)$")))) '("advance" "implementations")))) Are there any objections to doing it this way? (Other than it being a lot less pretty than a call to copy-recursively 😄) > You also need to add `eisl' as an input, > and patch "easy-islisp.el" > accordingly (see `easy-islisp-executable'). I incorporated this in the new patch. I have attached an updated version below. Thanks for reviewing! From 19437af399658570116e403ec85162369f7db6b0 Mon Sep 17 00:00:00 2001 From: Joeke Date: Fri, 16 Dec 2022 14:05:43 +0100 Subject: [PATCH] gnu: Add emacs-islisp-mode --- gnu/packages/emacs-xyz.scm | 52 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0d11c59b48..2322194d6f 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -118,6 +118,7 @@ ;;; Copyright © 2022 Hilton Chain ;;; Copyright © 2022 Nicolas Graves ;;; Copyright © 2022 Thiago Jung Bauermann +;;; Copyright © 2022 Joeke de Graaf ;;; ;;; This file is part of GNU Guix. ;;; @@ -13125,6 +13126,57 @@ (define-public emacs-helm-make target will call @code{compile} on it.") (license license:gpl3+)))) +(define-public emacs-islisp-mode + (package + (name "emacs-islisp-mode") + (version "0.3.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/sasanidas/islisp-mode") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1s6alrv1hfi1plj5lh826j0h71xvm2v092kglj3yvy34g73dgrna")))) + (build-system emacs-build-system) + (inputs (list eisl)) + (arguments + (list #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch-eisl-variables + (lambda* (#:key inputs outputs #:allow-other-keys) + (emacs-substitute-variables + "implementations/easy-islisp/easy-islisp.el" + ("easy-islisp-executable" (search-input-file + inputs "/bin/eisl")) + ("easy-islisp-library-directory" `(if (getenv + "EASY_ISLISP") + (getenv + "EASY_ISLISP") + ,(search-input-directory + inputs + "share/eisl/library")))))) + (add-after 'install 'install-additional-directories + (lambda _ + (let ((site-lisp-dir (elpa-directory #$output))) + (for-each (lambda (dir) + (with-directory-excursion dir + (for-each (lambda (file) + (install-file file + site-lisp-dir)) + (find-files "." + "\\.(lsp|el)$")))) + '("advance" "implementations")))))))) + (home-page "https://gitlab.com/sasanidas/islisp-mode") + (synopsis "ISLisp support for Emacs") + (description + "This package provides support for programming with ISLisp in +Emacs. It features a major mode with syntax highlighting, symbol autocompletion +and documentation search, among other features. It also includes an inferior +mode with REPL integration. Currently it only supports the Easy ISLisp (eisl) +implementation.") + (license license:gpl3+))) + (define-public emacs-cider (package (name "emacs-cider") -- 2.37.2