From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8FGtBidK7l+wBQAA0tVLHw (envelope-from ) for ; Thu, 31 Dec 2020 22:01:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mGN/AidK7l83cgAA1q6Kng (envelope-from ) for ; Thu, 31 Dec 2020 22:01:11 +0000 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 8F93E9404C9 for ; Thu, 31 Dec 2020 22:01:10 +0000 (UTC) Received: from localhost ([::1]:36210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kv60L-0003AK-Gl for larch@yhetil.org; Thu, 31 Dec 2020 17:01:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kv60E-00039y-7k for guix-patches@gnu.org; Thu, 31 Dec 2020 17:01:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:58462) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kv60D-0006SR-Tl for guix-patches@gnu.org; Thu, 31 Dec 2020 17:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kv60D-0001NP-Ql for guix-patches@gnu.org; Thu, 31 Dec 2020 17:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45575] Add emacs-merlin References: <87eej54upy.fsf@asu.edu> In-Reply-To: <87eej54upy.fsf@asu.edu> Resent-From: John Soo Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 31 Dec 2020 22:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45575 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 45575@debbugs.gnu.org Received: via spool by 45575-submit@debbugs.gnu.org id=B45575.16094520605277 (code B ref 45575); Thu, 31 Dec 2020 22:01:01 +0000 Received: (at 45575) by debbugs.gnu.org; 31 Dec 2020 22:01:00 +0000 Received: from localhost ([127.0.0.1]:41775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kv60B-0001N2-Mv for submit@debbugs.gnu.org; Thu, 31 Dec 2020 17:01:00 -0500 Received: from mail-pf1-f178.google.com ([209.85.210.178]:41785) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kv608-0001Mn-Na for 45575@debbugs.gnu.org; Thu, 31 Dec 2020 17:00:57 -0500 Received: by mail-pf1-f178.google.com with SMTP id t8so11771245pfg.8 for <45575@debbugs.gnu.org>; Thu, 31 Dec 2020 14:00:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asu-edu.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version; bh=amiUHbExw46gaxozv/kEDkZJuDb3CFREZQprEbfmh4s=; b=L/1snKNL09cW9b4RPkhOc3QHpdMRlH9NutQVy0y89pnGoabyleRiYcFx6B2IPRbEBB /0WWrcnjs0ysVK92YxUYNDinncUYMHWR0sPp0aqFmjeI2LaqHUDGa0XV9rQI0gGxgKGq leElW475N87Ot046LVILP85IfD9YnclZPGgxLQfqG6bChdLi4jp9b7V2rvXQR0qO9+ZS oRO2lSW6pGnw/f/Heto9iregxsuUwL3z7xAbKYCtPOXa7ek5GbD/QsvaLXBzIVnJYvat qmnrFK/1EEAAn958bp/Kwb9zGhUDRFhWfgYDBiJ1VeojMsMrnRs45ACkpaq3f91t2OzS p2ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=amiUHbExw46gaxozv/kEDkZJuDb3CFREZQprEbfmh4s=; b=nqrkcq1JT7XnBOf0KQVfkhByXaiNp+FiHATGHyrp9aPPlODuu8l4ymFgPq8GsCblME YT96RhnSoT0F+ReUGH+79hQo+c7s1qTnZkeTVVxAtr2bALZACPmbrf5u2a7tWFAV8uTB wKJXXEHAmAoqsA1Bb55/d+Edz6/H1B8RMWqsiulF+iNlSGFtR5ZnAnLrXz0POAuvnRfC WATg5hjlQfzJx/3SKQ7RLE5vvavDe8gTIqIYdiYH0Etvyh+2Br3dNiT/Fypm/TsmFoXh KVe6u8NWgD1kDnmxZKh16SwxzFF6v0gco5Be6jjsHpcReU+1ZOshpI7QvMqnEgEiCVq6 6j5g== X-Gm-Message-State: AOAM530TzrZRxWleqyl2T2V3bLaQFaMpu0yuwdOJNUXLLp8g7+GfB6Gw mc5lsr5JguOMR2D+nMatPMv3LKKEsBigzA== X-Google-Smtp-Source: ABdhPJyguCDYATWWBu/sRbsssEsLvVZ+UrF+HuK3jXOPnbHV9JsZdJpraxTaiPUE1uQnmH7nM5jojg== X-Received: by 2002:a63:ac19:: with SMTP id v25mr16319490pge.258.1609452050417; Thu, 31 Dec 2020 14:00:50 -0800 (PST) Received: from ecenter ([2600:1700:83b0:8bd0::7a8]) by smtp.gmail.com with ESMTPSA id z125sm44714000pfz.121.2020.12.31.14.00.48 for <45575@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 31 Dec 2020 14:00:49 -0800 (PST) From: John Soo Date: Thu, 31 Dec 2020 14:00:48 -0800 Message-ID: <87ble94ovj.fsf@asu.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.23 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=asu-edu.20150623.gappssmtp.com header.s=20150623 header.b=L/1snKNL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=asu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 8F93E9404C9 X-Spam-Score: -1.23 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2qEywo8PIDVq --=-=-= Content-Type: text/plain I wanted to make autoloads and byte-compile the elisp provided by merlin. After fiddling with the emacs output of ocaml-merlin, I found it much easier to just make an emacs package for merlin. There is further work to do to make a vim merlin package but I am not familiar enough with vim to continue. - John --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-emacs-merlin.patch >From 902849f8b8f586347dfd7810c46acc754a323592 Mon Sep 17 00:00:00 2001 From: John Soo Date: Thu, 31 Dec 2020 13:34:57 -0800 Subject: [PATCH] gnu: Add emacs-merlin. * gnu/packages/emacs-xyz.scm (emacs-merlin): New variable. * gnu/packages/ocaml.scm (ocaml-merlin): [arguments] Remove elisp from output, [description] Note location of emacs package. --- gnu/packages/emacs-xyz.scm | 39 ++++++++++++++++++++++++++++++++++++++ gnu/packages/ocaml.scm | 11 +++++++++-- 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0d8d6837e1..a97bd5ce1e 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -135,6 +135,7 @@ #:use-module (gnu packages haskell-apps) #:use-module (gnu packages ibus) #:use-module (gnu packages ncurses) + #:use-module (gnu packages ocaml) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) #:use-module (gnu packages telephony) @@ -646,6 +647,44 @@ process, passing on the arguments as command line arguments.") "Magit-annex adds a few git-annex operations to the Magit interface.") (license license:gpl3+)))) +(define-public emacs-merlin + (package + (name "emacs-merlin") + (version "3.4.2") + (home-page "https://ocaml.github.io/merlin/") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocaml/merlin") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0i2nwkdh6cfzmnsdsr8aw86vs8j1k5jkjzrs61b9384wnffdbbmj")))) + (build-system emacs-build-system) + (propagated-inputs + `(("emacs-auto-complete" ,emacs-auto-complete) + ("emacs-company" ,emacs-company) + ("emacs-iedit" ,emacs-iedit) + ("ocaml-merlin" ,ocaml-merlin))) + (arguments + `(#:tests? #f ; No tests + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'setup-emacs-build + (lambda* (#:key inputs #:allow-other-keys) + (let ((merlin (assoc-ref inputs "ocaml-merlin"))) + (chdir "emacs") + (for-each make-file-writable (find-files "." "\\.el$")) + (emacs-substitute-variables "merlin.el" + ("merlin-command" + (string-append merlin "/bin/ocamlmerlin"))))))))) + (synopsis "Context sensitive completion for OCaml in Emacs") + (description "Merlin is an editor service that provides modern IDE +features for OCaml. This package provides the Emacs support for Merlin.") + (license license:expat))) + (define-public emacs-minions (package (name "emacs-minions") diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index bb5d6c4e92..5f8cf4613d 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -4070,12 +4070,19 @@ documentation always stays up-to-date.") `(("ocaml-dot-merlin-reader" ,ocaml-dot-merlin-reader))) (arguments `(#:package "merlin" - #:test-target "tests")) + #:test-target "tests" + #:phases + ;; FIXME: Make merlin.vim into a separate package. + (modify-phases %standard-phases + (add-after 'install 'remove-emacs + (lambda* (#:key outputs #:allow-other-keys) + (delete-file-recursively + (string-append (assoc-ref outputs "out") "/share/emacs"))))))) (synopsis "Context sensitive completion for OCaml in Vim and Emacs") (description "Merlin is an editor service that provides modern IDE features for OCaml. Emacs and Vim support is provided out-of-the-box. External contributors added support for Visual Studio Code, Sublime Text and -Atom.") +Atom. To install the emacs specific package, use @code{emacs-ocaml-merlin}.") (license license:expat))) (define-public ocaml4.07-merlin -- 2.29.2 --=-=-=--