From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0EjICjOi6GPmHQAAbAwnHQ (envelope-from ) for ; Sun, 12 Feb 2023 09:24:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OAHlCTOi6GNNPwEAG6o9tA (envelope-from ) for ; Sun, 12 Feb 2023 09:24:19 +0100 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 E173F3FA95 for ; Sun, 12 Feb 2023 09:24:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pR7ef-0005QP-62; Sun, 12 Feb 2023 03:24:13 -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 1pR7eb-0005Q1-Ie for guix-patches@gnu.org; Sun, 12 Feb 2023 03:24:09 -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 1pR7eU-0001Nt-Ja for guix-patches@gnu.org; Sun, 12 Feb 2023 03:24:09 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pR7eU-0007X7-G4 for guix-patches@gnu.org; Sun, 12 Feb 2023 03:24:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#61434] [PATCH] gnu: Add emacs-pasp-mode. References: <602f2c0db9881fdd663c9919b5783db950ac900b.camel@gmail.com> In-Reply-To: <602f2c0db9881fdd663c9919b5783db950ac900b.camel@gmail.com> Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 12 Feb 2023 08:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61434 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 61434@debbugs.gnu.org Cc: Nicolas Goaziou Received: via spool by 61434-submit@debbugs.gnu.org id=B61434.167619023428923 (code B ref 61434); Sun, 12 Feb 2023 08:24:02 +0000 Received: (at 61434) by debbugs.gnu.org; 12 Feb 2023 08:23:54 +0000 Received: from localhost ([127.0.0.1]:43971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pR7eL-0007WL-Ma for submit@debbugs.gnu.org; Sun, 12 Feb 2023 03:23:54 -0500 Received: from mail-ej1-f68.google.com ([209.85.218.68]:35832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pR7eJ-0007Vz-Nz for 61434@debbugs.gnu.org; Sun, 12 Feb 2023 03:23:52 -0500 Received: by mail-ej1-f68.google.com with SMTP id qw12so25234243ejc.2 for <61434@debbugs.gnu.org>; Sun, 12 Feb 2023 00:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:cc:to:subject:date:from:from:to:cc:subject :date:message-id:reply-to; bh=ChsvYC0mrD4SgHhvcbBE4AMw/fmrMCpVOn0h26oAZ9s=; b=Kn3LAT1u/D5749L6wqpqoFEq9TEdkJm8JBMY06D0tddISMd/LZZaXkkMoBH61+bIkB FF/8JfPYwJl9e4hYeiseYTafVaGQosB1GbtIRRAon8w0aAetJCUbNA18htjJ65xnY/I6 BZG0ZYr+amRyLbvQMsK8EDasZwL+yH6nTNx9e5jIwE4GNxmbIcIQa7SgdutluMIam9aK Hq6uA7OXy1fCTHTp5nuFA+hVXineMnZu8eQCA/+UhfHRlwgjaObztCherY6lCWCS0B0K OkMZXTcyqjqXNvqljuaXiY8YIFyaoRjCF/gnWnaaKpk/5K2/jWUW4owP38SVEahlTzf+ Ey6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:cc:to:subject:date:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ChsvYC0mrD4SgHhvcbBE4AMw/fmrMCpVOn0h26oAZ9s=; b=RacOac9bZd9YlUSEB6zc1PozSkKtwzeIk0/a3m5jytJPm1LYY1Q9P2bsHHqJRG9joY JrgPuIVZP7aw+PMbCCLDgyHu0SfUsDzY9D6EWxE41j5BmjUO8+YjBD6oLR7mbVcAjcTp loWbcuI+Ksl3WgEoumvZhDBDpfowcrK891P5apgUO0p0HrFgoIRcX+vAeSvDG6bptcqk QdBfJAlN0e00YRWLTVwdEwGLgqoEOCkWPtOG0ZsU16ETEwfy41lwv6xfpmHLvoRpLXCL MfZr0pdSacCHAwqXLdwR3FWZqtn2opkK92QTrnQD5R4o22jRcErs9Yb3nAoSpDkxh4nO YFog== X-Gm-Message-State: AO0yUKVBhoFv+jUfRY3l+Z/kCmiLBdIkoh063DuIe16wpgfmndDe59VC CBg+DTa86jQI7YobhnYVhBnDkxVChPvugw== X-Google-Smtp-Source: AK7set+/SxJEHwPf+xEpg/7eyzaqmJawnZcNfOV/UVn5s8Uj0Ld8FSLxjErTPl3X8NJpqduMDGMitw== X-Received: by 2002:a17:907:3fa9:b0:878:5da4:77a6 with SMTP id hr41-20020a1709073fa900b008785da477a6mr29256659ejc.51.1676190225837; Sun, 12 Feb 2023 00:23:45 -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 g25-20020a170906349900b0088519b92074sm4997840ejb.128.2023.02.12.00.23.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Feb 2023 00:23:45 -0800 (PST) From: Liliana Marie Prikler Date: Sat, 11 Feb 2023 16:15:00 +0100 Message-ID: MIME-Version: 1.0 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-bounces+larch=yhetil.org@gnu.org X-TUID: F1kZp5dLFh8V * 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 | 48 +++++++++++++++++++ .../emacs-pasp-mode-quote-file-names.patch | 20 ++++++++ 3 files changed, 69 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 dc230d30d9..efbee0238b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1071,6 +1071,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-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 729c190969..49fa5df7e1 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -203,6 +203,7 @@ (define-module (gnu packages emacs-xyz) #:use-module (gnu packages lisp-xyz) #:use-module (gnu packages lsof) #:use-module (gnu packages lua) + #:use-module (gnu packages maths) #:use-module (gnu packages music) #:use-module (gnu packages version-control) #:use-module (gnu packages imagemagick) @@ -4387,6 +4388,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") + (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") + (forward-sexp) + (kill-sexp) + (backward-sexp) + (beginning-of-line) + (kill-sexp) + (insert (format "(defconst emacs-pasp-version \"%s\" %s)" + #$version (cadr kill-ring))) + (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. -- 2.39.1