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 ms9.migadu.com with LMTPS id mGa2GG+7g2S9YQAASxT56A (envelope-from ) for ; Sat, 10 Jun 2023 01:53:19 +0200 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 wKtjF2+7g2QHugAAG6o9tA (envelope-from ) for ; Sat, 10 Jun 2023 01:53:19 +0200 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 C380917521 for ; Sat, 10 Jun 2023 01:53:18 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7lui-0008EE-Pb; Fri, 09 Jun 2023 19:53:04 -0400 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 1q7luh-0008E3-0j for guix-patches@gnu.org; Fri, 09 Jun 2023 19:53:03 -0400 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 1q7lug-0000YP-NO for guix-patches@gnu.org; Fri, 09 Jun 2023 19:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7lug-0004HY-7N for guix-patches@gnu.org; Fri, 09 Jun 2023 19:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63987] [PATCH] gnu: Add emacs-jinx. Resent-From: mekeor@posteo.de Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jun 2023 23:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63987 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63987@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168635475716427 (code B ref -1); Fri, 09 Jun 2023 23:53:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jun 2023 23:52:37 +0000 Received: from localhost ([127.0.0.1]:32935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7luG-0004Gq-N7 for submit@debbugs.gnu.org; Fri, 09 Jun 2023 19:52:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:36100) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7luD-0004Gi-VN for submit@debbugs.gnu.org; Fri, 09 Jun 2023 19:52:34 -0400 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 1q7luD-0008BR-Fb for guix-patches@gnu.org; Fri, 09 Jun 2023 19:52:33 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q7luA-0000O0-Qe for guix-patches@gnu.org; Fri, 09 Jun 2023 19:52:33 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9CC0E240027 for ; Sat, 10 Jun 2023 01:52:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1686354746; bh=BCRTIWLgBG+O+GZg8Lp9Fl3GPd2gTxcc65tVPql0RqY=; h=From:To:Subject:Date:Message-Id:MIME-Version:From; b=o2lXj2+5Dm3Ohqz11mmhLFT9UNN4aK55yEfLljgd/l0FbWKQavJX6C+f9LCJ4RIm+ scwWKaaHWhXSyB1TdjK0Yc4u4z6CvcFr7I4TL3suXWH3oTXlwo6DXJdHB/3sKXicFt cRKlozal1ldzxUbXHu8t27TvXNW+ZzVW7pCr7XFr1niXVAIxa3WBaYu8enSp4Sb0iH JXCmvWskbtm+pXz5fXxm5BGM2J02a/G2QHdFqbtukQ5U+jmMYy0Yp+IujiBO9m5ZZj k3zLOCU0LQdqG8KrS9LpCLwKpZDAsIDUQzNh3kZryaEblJO45EZokvwDWEoz/TyIAF lxKx+vfj4Zzdw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QdHty2KQCz6tvc for ; Sat, 10 Jun 2023 01:52:26 +0200 (CEST) From: mekeor@posteo.de Date: Fri, 09 Jun 2023 23:00:37 +0000 Message-Id: <88d5ddf1b26b5f4c23601780aa29158e46a6cbfe.1686354110.git.mekeor@posteo.de> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=mekeor@posteo.de; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686354799; a=rsa-sha256; cv=none; b=XKh2atNq3B+iSZwV5N6idJ+Tbng4+0Vb2eAuuxRPtt046MsDztPRevjpFwslCxa/78zLVd peCLW+pufgvy9rco/cHa2YevVilt54lazZd1O5s3EJT9xZC1tFFHwX7rrxW4Xw69dNZAiP fjLvpwmKkrBLkvdOQ8RJ6LOKjhDByt3Uqi1rCEzSEtqnmAEHZOHZaMk7gwJWO56LNqlv67 L/MlYDKN9E/3xUD5Umvj/mcHknASKKc+7WsfFpDm6Rtl9rePTuuVCoII3X7uDNbUiDrQ2F JKZT2xu1cKI3RhFTxpUdvEFT7C80pfmk4C0aTqRrG9Ddk2WL5rDFq8IvH9mf5A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b=o2lXj2+5; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686354799; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=FjtkvA/OfYibdGN2Zi10JWkuj0RDK29sCbcsHe/aR8U=; b=ZEuC747QgjWJXFCOuXRd8D0MOFcmZqtmW3yBeciDrn4E6Rz6gT9FfyLpGOw9S8rLdxt8cu 5RTGO6ftpJOLIfgSOcs/C0RgKVP29JTAQoCoxcFJJt2s66B+nYoS7N1y6VuCWO8KAhte9k ALL57nNG5i/8wmFLil5Vjw32PTPPvwjfcbNhur9leRTLCukCO7IeqjsPC+GrXoDRHm6Ict Hz2rSoGKzwiJgWttijVNVyxruR2GzQkVIJTK3oWyC2xcGUHM0DCi6pr8fleDBySyclTudg qkmnbbCyx2DtWjuhoLJMwA145q1Lgy4s2Gh9Zaozf058c2KRoa3MJnrG+Mxdiw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b=o2lXj2+5; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -2.61 X-Spam-Score: -2.61 X-Migadu-Queue-Id: C380917521 X-TUID: FxGIcfnMbjwB * gnu/packages/emacs-xyz.scm (emacs-jinx): New variable. --- Hello Guix! I have some questions about this patch that I'm submitting: - emacs-jinx needs gcc at build time. Should I use gcc-toolchain (or rather the internal gcc) package? - When using the module (gnu packages commencement), I first got the following warning. That's why I decided to use it with a prefix instead. What do you think about that? WARNING: (gnu packages emacs-xyz): `canonical-package' imported from both (gnu packages base) and (gnu packages commencement) - I did not introduce any (revision "0") variable or so. I hope that's okay. I'm not sure when to use it. - I placed the package declaration right after other spelling related Emacs packages. Unfortunately, the declaration of emacs-jit-spell is not close. I could send another additional patch that moves all spelling-related Emacs packages into an own section, if you'd like. Like this: ;;; ;;; Spelling ;;; Anyways. Cheers! gnu/packages/emacs-xyz.scm | 73 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0ea9732bfa..7e4f1a1fea 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -148,6 +148,7 @@ (define-module (gnu packages emacs-xyz) #:use-module ((guix licenses) #:prefix license:) + #:use-module ((gnu packages commencement) #:prefix commencement:) #:use-module (guix packages) #:use-module (guix cvs-download) #:use-module (guix download) @@ -265,6 +266,7 @@ (define-module (gnu packages emacs-xyz) #:use-module (gnu packages virtualization) #:use-module (gnu packages web-browsers) #:use-module (gnu packages wget) + #:use-module (gnu packages enchant) #:use-module (guix utils) #:use-module (srfi srfi-1) #:use-module (ice-9 match)) @@ -31922,6 +31924,77 @@ (define-public emacs-spell-fu that runs from the syntax highlighter without starting external processes.") (license license:gpl3+)))) +(define-public emacs-jinx + (package + (name "emacs-jinx") + (version "0.8") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/minad/jinx") + (commit "7fced90fdaca5a482cd08b80967e0eac5ee8d885"))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1y097rnf9zg26jf4vh74a0laddfp4x6pp1fjqs3xqgwc0cmdq59w")))) + (build-system emacs-build-system) + (propagated-inputs (list emacs-compat)) + (native-inputs + (list + emacs-compat + enchant + commencement:gcc-toolchain + pkg-config + texinfo)) + (inputs (list enchant)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + ;; Compile the accompanying jinx-mod.c file with Emacs and + ;; jinx.el. This needs to happen after expand-load-path phase so + ;; that jinx.el is able to load emacs-compat. + (add-after 'expand-load-path 'compile-jinx-mod-c + (lambda _ + (invoke + "emacs" "--batch" "-L" "." + "-l" "jinx.el" + "-f" "jinx--load-module") + (install-file "jinx-mod.so" + (string-append #$output "/lib")))) + ;; Patch Jinx.el to load the previously compiled jinx-mod.so from + ;; correct output path instead of attempting to compile it. + (add-after 'compile-jinx-mod-c 'use-compiled-jinx-mod-so + (lambda _ + (let ((file "jinx.el")) + (make-file-writable file) + (emacs-substitute-sexps file + ("\"Compile and load dynamic module.\"" + `(module-load + ,(string-append #$output "/lib/jinx-mod.so"))))))) + (add-after 'install 'makeinfo + (lambda _ + (invoke "emacs" "--batch" + "--eval=(require 'ox-texinfo)" + "--eval=(find-file \"README.org\")" + "--eval=(org-texinfo-export-to-info)") + (install-file "jinx.info" + (string-append #$output "/share/info"))))))) + (home-page "https://github.com/minad/jinx") + (synopsis "Emacs Enchanted Spell Checker") + (description + "Jinx is a fast just-in-time spell-checker for Emacs. Jinx highlights +misspelled words in the text of the visible portion of the buffer. For +efficiency, Jinx highlights misspellings lazily, recognizes window boundaries +and text folding, if any. For example, when unfolding or scrolling, only the +newly visible part of the text is checked if it has not been checked before. +Each misspelling can be corrected from a list of dictionary words presented as +a completion menu. Jinx's high performance and low resource usage comes from +directly calling the widely-used API of the Enchant library.") + (license license:gpl3+))) + (define-public emacs-org-emms (let ((commit "07a8917f3d628c32e5de1dbd118ac08203772533") (revision "1")) base-commit: 297ba5c15a32845ab8514aeb6f405ebd4290142d -- 2.39.2