From patchwork Sat Feb 11 15:15:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 46857 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 DF85916600; Sat, 11 Feb 2023 15:17: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_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,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 B726C165FF for ; Sat, 11 Feb 2023 15:17:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pQrce-00049r-JV; Sat, 11 Feb 2023 10:17: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 1pQrcd-00049g-5N for guix-patches@gnu.org; Sat, 11 Feb 2023 10:17:03 -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 1pQrcc-0006g0-QG for guix-patches@gnu.org; Sat, 11 Feb 2023 10:17:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pQrcc-0001gi-Fs for guix-patches@gnu.org; Sat, 11 Feb 2023 10:17:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61434] [PATCH] gnu: Add emacs-pasp-mode. Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 11 Feb 2023 15:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61434 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61434@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16761286156469 (code B ref -1); Sat, 11 Feb 2023 15:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 11 Feb 2023 15:16:55 +0000 Received: from localhost ([127.0.0.1]:42938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQrcU-0001gG-NA for submit@debbugs.gnu.org; Sat, 11 Feb 2023 10:16:55 -0500 Received: from lists.gnu.org ([209.51.188.17]:36554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pQrcS-0001g4-5q for submit@debbugs.gnu.org; Sat, 11 Feb 2023 10:16:53 -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 1pQrcR-00049C-QH for guix-patches@gnu.org; Sat, 11 Feb 2023 10:16:51 -0500 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pQrcP-0006eE-VU for guix-patches@gnu.org; Sat, 11 Feb 2023 10:16:51 -0500 Received: by mail-ej1-x642.google.com with SMTP id sa10so22378799ejc.9 for ; Sat, 11 Feb 2023 07:16:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:to:subject:date:from:from:to:cc:subject :date:message-id:reply-to; bh=iFplh0cQYxNWlb3u5VYe0BCxgLdHE/OQ8gIswms0oWk=; b=igDE50syKb60S4t4Ly3C9D5ipK86IHCVoZQSLwSqKooKitWc1RtGhG2YdVMr5WHot4 NEcE2pXFje/4pnRlSEAigeAN5HvMfk1EJnefI5dfSgtIxKiffyDmad+9Y3hbTnVBRwvj WM44TGzKGMNm/1Vuu43JJirMb5PzBB/CgbweukqSNcIadV92XHE0RTXRwlcFdRcfV3gd 6kWCoN6pXF/z2sSFNVRSj5ARlJsoBSeUTyvl8bqVXcKwvr6Ot6SbMekeEdpNb0snkt+C AvEXFaKbVFMHnKdPnU2eDcKOhF3qJGym3mNI9l0VHAHHsBz6J/T/sO05WyO5lXNW7tVw YYBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:to:subject:date:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=iFplh0cQYxNWlb3u5VYe0BCxgLdHE/OQ8gIswms0oWk=; b=YbRmB0HlG/+BiNKZzdSjqo7qEIq1Kjt8nnewMS1UPZyza42MUwd9RCFZo+A3UIVOMx mhYssITczN7EgF83vkEdVjJ9YafFJUgjHuebOcjWDxU3MGTI9Da8ocxYQpdDhq1xHh+M tYLW2z3iJfUzW2oHPI0JSA3K/godYxOaXTGRhMV6WGezndsnFxbP66JnMdz5dO8rpHwT r1LGWfcedgcPtnsQ721DH+ppBiN8g6dNM3g92mqCiy/0hu2xeHujKLWOC9BJUPN7GHZN zwPU8TDKwKn76TtW5Ha5XxArIpe04wFLFzQG3S1o1TsDaX1QyKC2tIYKG+jrEov0lwoL gNTg== X-Gm-Message-State: AO0yUKVgbTC705QzXMyX3rC2w0nT4m06YKCGo0x/0ysAji8TMZ5Egc3G O0GWuPH5Ldu+T2ugYhZ2PoJM7UQBxrRnVw== X-Google-Smtp-Source: AK7set+fo6CfEPefAEzFoSD5o766AIXPKad5e+kGEFwgE/fEaSPQxHOOKOsndeLfYSYZUgN8ZFLpXQ== X-Received: by 2002:a17:906:cc0f:b0:880:a42d:dfb4 with SMTP id ml15-20020a170906cc0f00b00880a42ddfb4mr17044563ejb.16.1676128608232; Sat, 11 Feb 2023 07:16:48 -0800 (PST) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id kk21-20020a170907767500b0088ef3c38a52sm4012399ejc.19.2023.02.11.07.16.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Feb 2023 07:16:47 -0800 (PST) From: Liliana Marie Prikler Date: Sat, 11 Feb 2023 16:15:00 +0100 Message-ID: <602f2c0db9881fdd663c9919b5783db950ac900b.camel@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::642; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x642.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, MALFORMED_FREEMAIL=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: 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 * gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch: New file. * gnu/local.mk: Register it here. * gnu/packages/emacs-xyz.scm (emacs-pasp-mode): New variable. --- gnu/local.mk | 1 + gnu/packages/emacs-xyz.scm | 47 +++++++++++++++++++ .../emacs-pasp-mode-quote-file-names.patch | 20 ++++++++ 3 files changed, 68 insertions(+) create mode 100644 gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch diff --git a/gnu/local.mk b/gnu/local.mk index bf4b20577d..0548fc4e3d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1070,6 +1070,7 @@ dist_patch_DATA = \ %D%/packages/patches/emacs-highlight-stages-add-gexp.patch \ %D%/packages/patches/emacs-lispy-fix-thread-last-test.patch \ %D%/packages/patches/emacs-native-comp-driver-options.patch \ + %D%/packages/patches/emacs-emacs-pasp-mode-quote-file-names.patch \ %D%/packages/patches/emacs-polymode-fix-lexical-variable-error.patch \ %D%/packages/patches/emacs-source-date-epoch.patch \ %D%/packages/patches/emacs-telega-path-placeholder.patch \ diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index bbaafcc730..b6780ace02 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -4387,6 +4387,53 @@ (define-public emacs-pabbrev during idle time, while Emacs is doing nothing else.") (license license:gpl3+))) +(define-public emacs-pasp-mode + (let ((commit "59385eb0e8ebcfc8c11dd811fb145d4b0fa3cc92") + (revision "1")) + (package + (name "emacs-pasp-mode") + (version (git-version "0.1.0" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/santifa/pasp-mode.git") + (commit commit))) + (patches + (search-patches "emacs-pasp-mode-quote-file-names.patch")) + (sha256 + (base32 + "1ar4vws3izzmir7m870mccci620ns3c5j26dcmwaxavhgw45wcmf")))) + (build-system emacs-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'defconst-version + (lambda _ + (emacs-batch-edit-file "pasp-mode.el" + '(progn + (search-forward-regexp + "(defcustom pasp-mode-version \"[^\"]*\"[ + ]*\\(\"[^\"]*\"\\)[^()]*)") + (let ((docstring (match-string 1))) + (backward-sexp) + (kill-sexp) + (insert (format "(defconst emacs-pasp-version \"%s\" %s)" + #$version docstring)) + (basic-save-buffer)))))) + (add-after 'unpack 'hardcode-clingo + (lambda* (#:key inputs #:allow-other-keys) + (emacs-substitute-variables "pasp-mode.el" + ("pasp-clingo-path" + (search-input-file inputs "/bin/clingo")))))))) + (inputs (list clingo)) + (home-page "https://github.com/santifa/pasp-mode") + (synopsis "Major mode for editing Answer Set Programs.") + (description + "This package provides a major mode for editing answer set programs, +in particular ones that can be solved by @command{clingo}.") + (license license:gpl3+)))) + (define-public emacs-pdf-tools (package (name "emacs-pdf-tools") diff --git a/gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch b/gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch new file mode 100644 index 0000000000..39dc5d0253 --- /dev/null +++ b/gnu/packages/patches/emacs-pasp-mode-quote-file-names.patch @@ -0,0 +1,20 @@ +diff --git a/pasp-mode.el b/pasp-mode.el +index 7f83645..5daf08e 100644 +--- a/pasp-mode.el ++++ b/pasp-mode.el +@@ -199,9 +199,12 @@ + Argument ENCODING The current buffer which holds the problem encoding. + Optional argument INSTANCE The problem instance which is solved by the encoding. + If no instance it is assumed to be also in the encoding file." +- (if 'instance +- (concat pasp-clingo-path " " pasp-clingo-options " " encoding " " instance) +- (concat pasp-clingo-path " " pasp-clingo-options " " encoding))) ++ (if instance ++ (concat pasp-clingo-path " " pasp-clingo-options " " ++ (shell-quote-argument encoding) " " ++ (shell-quote-argument instance)) ++ (concat pasp-clingo-path " " pasp-clingo-options " " ++ (shell-quote-argument encoding)))) + + (defun pasp-run-clingo (encoding &optional instance) + "Run Clingo with some ASP input files.