[PATCH 0/4] Add emacs-parinfer-rust-mode

  • Open
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Lee Thompson
  • Nicolas Graves
Owner
unassigned
Submitted by
Lee Thompson
Severity
normal
L
L
Lee Thompson wrote on 1 Nov 12:13 +0100
(address . guix-patches@gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
20241101111330.640592-1-lee.p.thomp@gmail.com
Hello Guix,

This patch series adds justinbarclay's parinfer-rust-mode package for Emacs.
This package loads a shared Rust library to do all the parinfer heavy-lifting.

I ported the most recent version of parinfer-rust-mode and the Rust library
parinfer-rust-emacs and left the older emacs-parinfer-mode and parinfer-rust
untouched because I didn't know if it was within the scope of this work to get
rid of them.

Note also for parinfer-rust-emacs I copied all the `modify-phases' stuff from
parinfer-rust above, I can't imagine someone needs all the non-Emacs files
installing but who knows.

Could I please get some feedback or review on these patches? This is my first
time sending patches into Guix so apologies if I've made any obvious mistakes.
I wasn't sure also if it was appropriate to add my name to the tops of files
etc.

Apologies also if I've made a mess sending this a few times, I think my email
client and get send-email have been acting up.

Lee Thompson (4):
* gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable.
* gnu/packages/crates-io.scm (rust-emacs-0.19): New variable.
* gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable.
* gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable.

gnu/packages/crates-io.scm | 24 +++++++++++++
gnu/packages/emacs-xyz.scm | 66 +++++++++++++++++++++++++++++++++++
gnu/packages/text-editors.scm | 53 ++++++++++++++++++++++++++++
3 files changed, 143 insertions(+)


base-commit: 6e50b0c56a8cc767bd3acb26638f78c450bde718
--
2.43.0
L
L
Lee Thompson wrote on 1 Nov 14:28 +0100
[PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
20241101132853.723629-3-lee.p.thomp@gmail.com
Change-Id: I6c6fb384edb03b55bae63137576c364cf11e42a5
---
gnu/packages/text-editors.scm | 53 +++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)

Toggle diff (66 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index fae021f012..027f8adb6c 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -467,6 +467,59 @@ (define-public parinfer-rust
can load dynamic libraries.")
(license license:expat)))
+(define-public parinfer-rust-emacs
+ (package
+ (name "parinfer-rust-emacs")
+ (version "0.4.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/justinbarclay/parinfer-rust-emacs")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1v5lcbs1x4f3b428sj9rkjbmfpzyxzny7i0pgdpnr8nyjvpkzns8"))
+ (file-name (git-file-name name version))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:install-source? #f
+ #:cargo-inputs (("rust-getopts" ,rust-getopts-0.2)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-emacs" ,rust-emacs-0.19)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+ ("rust-unicode-width" ,rust-unicode-width-0.1))
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'install-plugins-and-libs
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (vimfiles (string-append out
+ "/share/vim/vimfiles/"
+ "pack/guix/start/parinfer")))
+ (with-directory-excursion "target/release"
+ (install-file "libparinfer_rust.so" lib))
+ (substitute* "plugin/parinfer.vim"
+ (("(let s:libdir = ).*" all libdir)
+ (format #f "~a'~a'\n" libdir lib)))
+ (install-file "doc/parinfer.txt"
+ (string-append vimfiles "/doc"))
+ (install-file "plugin/parinfer.vim"
+ (string-append vimfiles "/plugin"))
+ (install-file "rc/parinfer.kak"
+ (string-append out "/share/kak/autoload"))))))))
+ (inputs (list clang))
+ (home-page "https://github.com/justinbarclay/parinfer-rust-emacs")
+ (synopsis "Emacs-centric fork of parinfer-rust")
+ (description
+ "A full-featured, super fast implementation of Shaun Lebron’s
+@code{parinfer}. This repo has Vim, Neovim, and Kakoune plugins, and an Emacs
+plugin is available. The Rust library can be called from other editors that
+can load dynamic libraries.")
+ (license license:isc)))
+
(define-public joe
(package
(name "joe")
--
2.43.0
L
L
Lee Thompson wrote on 1 Nov 14:28 +0100
[PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
20241101132853.723629-1-lee.p.thomp@gmail.com
Change-Id: Ie516bba11248d6ac47db854ac138b705dfee1b8e
---
gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 488b4cb5d7..e7a75d51a3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27436,6 +27436,27 @@ (define-public emacs-parinfer-mode
keep Parens and Indentation inline with one another.")
(license license:gpl3+)))
+(define-public emacs-track-changes
+ (package
+ (name "emacs-track-changes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://elpa.gnu.org/packages/track-changes-"
+ version ".tar"))
+ (sha256
+ (base32 "0al6a1xjs6p2pn6z976pnmfqz2x5xcz99b5gkdzz90ywbn7018m4"))))
+ (build-system emacs-build-system)
+ (home-page "https://elpa.gnu.org/packages/track-changes.html")
+ (synopsis "An abstraction library which handles accumulating file changes")
+ (description
+ "This library is a layer of abstraction above
+@code{before-change-functions} and @code{after-change-functions} which takes
+care of accumulating changes until a time when its client finds it convenient
+to react to them.")
+ (license license:gpl3+)))
+
(define-public emacs-helm-eww
(package
(name "emacs-helm-eww")
--
2.43.0
L
L
Lee Thompson wrote on 1 Nov 14:28 +0100
[PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
20241101132853.723629-4-lee.p.thomp@gmail.com
Change-Id: I3508c5fd2d6c787ff9ef737e3f6a207d9b852ada
---
gnu/packages/emacs-xyz.scm | 45 ++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (65 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e7a75d51a3..2527a568b2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -290,6 +290,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 text-editors)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -27457,6 +27458,50 @@ (define-public emacs-track-changes
to react to them.")
(license license:gpl3+)))
+(define-public emacs-parinfer-rust-mode
+ (package
+ (name "emacs-parinfer-rust-mode")
+ (version "0.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/justinbarclay/parinfer-rust-mode")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kbn54v100rh6pxl3lc66pspd3nfy7pkv8iyqkg09xqcwyblbf86"))))
+ (propagated-inputs (list emacs-track-changes))
+ (inputs (list parinfer-rust-emacs))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((parinfer (assoc-ref inputs "parinfer-rust-emacs")))
+ ;; Specify the absolute file names of the parinfer shared
+ ;; library.
+ (make-file-writable "parinfer-rust-mode.el")
+ (emacs-substitute-variables "parinfer-rust-mode.el"
+ ("parinfer-rust--lib-name"
+ "libparinfer_rust.so")
+ ("parinfer-rust-library-dir"
+ (string-append parinfer
+ "/lib/")))
+ (emacs-substitute-sexps "parinfer-rust-mode.el"
+ ("defcustom parinfer-rust-library-directory"
+ (string-append parinfer
+ "/lib/"))
+ ("defconst parinfer-rust--lib-name"
+ "libparinfer_rust.so"))))))))
+ (home-page "https://github.com/justinbarclay/parinfer-rust-mode")
+ (synopsis "Lisp structure editing mode leveraging parinfer-rust")
+ (description
+ "@code{parinfer-rust-mode} aims to be a simple implementation
+of Parinfer that leverages the parinfer-rust plugin to do most of the heavy
+lifting.")
+ (license license:gpl3+)))
+
(define-public emacs-helm-eww
(package
(name "emacs-helm-eww")
--
2.43.0
L
L
Lee Thompson wrote on 1 Nov 14:28 +0100
[PATCH 2/4] * gnu/packages/crates-io.scm (rust-emacs-0.19): New variable.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
20241101132853.723629-2-lee.p.thomp@gmail.com
Change-Id: I7791c869e8fdde96734499722d35f8f6aa2445fa
---
gnu/packages/crates-io.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c08ccd29fd..07185752c5 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -23138,6 +23138,30 @@ (define-public rust-emacs-0.18
Emacs' support for dynamic modules.")
(license license:bsd-3)))
+(define-public rust-emacs-0.19
+ (package (inherit rust-emacs-0.18)
+ (name "rust-emacs")
+ (version "0.19.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "emacs" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "133ip19m1nq8krf04klh1jpm833wpw6kdy2jksgylbw4xcp3yxws"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-anyhow" ,rust-anyhow-1)
+ ("rust-ctor" ,rust-ctor-0.1)
+ ("rust-emacs-macros" ,rust-emacs-macros-0.17)
+ ("rust-emacs-module" ,rust-emacs-module-0.18)
+ ("rust-failure-derive" ,rust-failure-derive-0.1)
+ ("rust-once-cell" ,rust-once-cell-1)
+ ("rust-thiserror" ,rust-thiserror-1))))))
+
(define-public rust-emacs-0.11
(package (inherit rust-emacs-0.18)
(name "rust-emacs")
--
2.43.0
N
N
Nicolas Graves wrote on 3 Nov 21:30 +0100
Re: [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable.
(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
87cyjcnjq5.fsf@ngraves.fr
On 2024-11-01 13:28, Lee Thompson wrote:

Toggle quote (38 lines)
> Change-Id: I6c6fb384edb03b55bae63137576c364cf11e42a5
> ---
> gnu/packages/text-editors.scm | 53 +++++++++++++++++++++++++++++++++++
> 1 file changed, 53 insertions(+)
>
> diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
> index fae021f012..027f8adb6c 100644
> --- a/gnu/packages/text-editors.scm
> +++ b/gnu/packages/text-editors.scm
> @@ -467,6 +467,59 @@ (define-public parinfer-rust
> can load dynamic libraries.")
> (license license:expat)))
>
> +(define-public parinfer-rust-emacs
> + (package
> + (name "parinfer-rust-emacs")
> + (version "0.4.6")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/justinbarclay/parinfer-rust-emacs")
> + (commit (string-append "v" version))))
> + (sha256
> + (base32 "1v5lcbs1x4f3b428sj9rkjbmfpzyxzny7i0pgdpnr8nyjvpkzns8"))
> + (file-name (git-file-name name version))))
> + (build-system cargo-build-system)
> + (arguments
> + `(#:install-source? #f
> + #:cargo-inputs (("rust-getopts" ,rust-getopts-0.2)
> + ("rust-libc" ,rust-libc-0.2)
> + ("rust-emacs" ,rust-emacs-0.19)
> + ("rust-serde" ,rust-serde-1)
> + ("rust-serde-json" ,rust-serde-json-1)
> + ("rust-serde-derive" ,rust-serde-derive-1)
> + ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
> + ("rust-unicode-width" ,rust-unicode-width-0.1))

From here the code is probably correct but a bit old style.
I suggest some replacements below.

Toggle quote (6 lines)
> + #:phases (modify-phases %standard-phases
> + (add-after 'install 'install-plugins-and-libs
> + (lambda* (#:key outputs #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (lib (string-append out "/lib"))

When you use gexpressions, you don't have to refer to out and can use
#$output instead, which make this unecessary.
To use gexpressions, drop the first ` , add a list before
#:install-source, add a ` for cargo inputs, and a #~ before
(modify-phases. Then you can replace out by #$output.

Toggle quote (9 lines)
> + (vimfiles (string-append out
> + "/share/vim/vimfiles/"
> + "pack/guix/start/parinfer")))
> + (with-directory-excursion "target/release"
> + (install-file "libparinfer_rust.so" lib))
> + (substitute* "plugin/parinfer.vim"
> + (("(let s:libdir = ).*" all libdir)
> + (format #f "~a'~a'\n" libdir lib)))

This is correct but I would suggest either using string-append instead
of format, or using ~s instead of '~a' if quotes are the same to vim (I
don't know if that's the case). Note that you can also use ~% instead
of \n.

Toggle quote (12 lines)
> + (install-file "doc/parinfer.txt"
> + (string-append vimfiles "/doc"))
> + (install-file "plugin/parinfer.vim"
> + (string-append vimfiles "/plugin"))
> + (install-file "rc/parinfer.kak"
> + (string-append out "/share/kak/autoload"))))))))
> + (inputs (list clang))
> + (home-page "https://github.com/justinbarclay/parinfer-rust-emacs")
> + (synopsis "Emacs-centric fork of parinfer-rust")
> + (description
> + "A full-featured, super fast implementation of Shaun Lebron’s

You can probably start wiht "This package" or "@command{parinfer-rust}"
provides...

Toggle quote (3 lines)
> +@code{parinfer}. This repo has Vim, Neovim, and Kakoune plugins, and an Emacs
> +plugin is available. The Rust library can be called from other editors that

If you only install for vim, don't indicate Emacs (unclear).

Toggle quote (7 lines)
> +can load dynamic libraries.")
> + (license license:isc)))
> +
> (define-public joe
> (package
> (name "joe")

--
Best regards,
Nicolas Graves
N
N
Nicolas Graves wrote on 3 Nov 21:34 +0100
Re: [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable.
(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
877c9knjjd.fsf@ngraves.fr
On 2024-11-01 13:28, Lee Thompson wrote:

Toggle quote (42 lines)
> Change-Id: I3508c5fd2d6c787ff9ef737e3f6a207d9b852ada
> ---
> gnu/packages/emacs-xyz.scm | 45 ++++++++++++++++++++++++++++++++++++++
> 1 file changed, 45 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index e7a75d51a3..2527a568b2 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -290,6 +290,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 text-editors)
> #:use-module (guix utils)
> #:use-module (srfi srfi-1)
> #:use-module (ice-9 match))
> @@ -27457,6 +27458,50 @@ (define-public emacs-track-changes
> to react to them.")
> (license license:gpl3+)))
>
> +(define-public emacs-parinfer-rust-mode
> + (package
> + (name "emacs-parinfer-rust-mode")
> + (version "0.9.1")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/justinbarclay/parinfer-rust-mode")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32 "1kbn54v100rh6pxl3lc66pspd3nfy7pkv8iyqkg09xqcwyblbf86"))))
> + (propagated-inputs (list emacs-track-changes))
> + (inputs (list parinfer-rust-emacs))
> + (build-system emacs-build-system)
> + (arguments
> + `(#:phases (modify-phases %standard-phases
> + (add-after 'unpack 'configure
> + (lambda* (#:key inputs outputs #:allow-other-keys)

You don't seem to use outputs so you can drop it there.

Toggle quote (2 lines)
> + (let ((parinfer (assoc-ref inputs "parinfer-rust-emacs")))

Now we would rather use something like
(let ((parinfer-lib (dirname
(search-input-file inputs "/lib/libparinfer_rust.so"))))
Toggle quote (20 lines)
> + ;; Specify the absolute file names of the parinfer shared
> + ;; library.
> + (make-file-writable "parinfer-rust-mode.el")
> + (emacs-substitute-variables "parinfer-rust-mode.el"
> + ("parinfer-rust--lib-name"
> + "libparinfer_rust.so")
> + ("parinfer-rust-library-dir"
> + (string-append parinfer
> + "/lib/")))
> + (emacs-substitute-sexps "parinfer-rust-mode.el"
> + ("defcustom parinfer-rust-library-directory"
> + (string-append parinfer
> + "/lib/"))
> + ("defconst parinfer-rust--lib-name"
> + "libparinfer_rust.so"))))))))
> + (home-page "https://github.com/justinbarclay/parinfer-rust-mode")
> + (synopsis "Lisp structure editing mode leveraging parinfer-rust")
> + (description
> + "@code{parinfer-rust-mode} aims to be a simple implementation

To confirm with recent commits, but I think we tend to use @command
instead of @code recently.

Toggle quote (8 lines)
> +of Parinfer that leverages the parinfer-rust plugin to do most of the heavy
> +lifting.")
> + (license license:gpl3+)))
> +
> (define-public emacs-helm-eww
> (package
> (name "emacs-helm-eww")

--
Best regards,
Nicolas Graves
L
L
Lee Thompson wrote on 4 Nov 17:59 +0100
[PATCH v2 0/4] Emacs parinfer-rust-mode
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
cover.1730739208.git.lee.p.thomp@gmail.com
Greetings all,

I've tried my best to respond to feedback from my last patch series. For
parinfer-rust-emacs in text-editors.scm I decided to remove anything not
relevant to Emacs and swapped the code to use a G-Expression. Changes also
have been made for emacs-parinfer-rust-mode in emacs-xyz.scm.

Again apologies for any obvious mistakes, thanks!

Lee Thompson (4):
gnu: Add emacs-track-changes.
gnu: Add rust-emacs-0.19.
gnu: Add parinfer-rust-emacs.
gnu: Add emacs-parinfer-rust-mode.

gnu/packages/crates-io.scm | 24 +++++++++++++
gnu/packages/emacs-xyz.scm | 65 +++++++++++++++++++++++++++++++++++
gnu/packages/text-editors.scm | 41 ++++++++++++++++++++++
3 files changed, 130 insertions(+)


base-commit: 6e50b0c56a8cc767bd3acb26638f78c450bde718
--
2.46.0
L
L
Lee Thompson wrote on 4 Nov 17:59 +0100
[PATCH v2 1/4] gnu: Add emacs-track-changes.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
167eeffc87478d1ab022c0c707ec5cf897a5f355.1730739208.git.lee.p.thomp@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable.

Change-Id: Ie516bba11248d6ac47db854ac138b705dfee1b8e
---
gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 488b4cb5d7..e7a75d51a3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -27436,6 +27436,27 @@ (define-public emacs-parinfer-mode
keep Parens and Indentation inline with one another.")
(license license:gpl3+)))
+(define-public emacs-track-changes
+ (package
+ (name "emacs-track-changes")
+ (version "1.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://elpa.gnu.org/packages/track-changes-"
+ version ".tar"))
+ (sha256
+ (base32 "0al6a1xjs6p2pn6z976pnmfqz2x5xcz99b5gkdzz90ywbn7018m4"))))
+ (build-system emacs-build-system)
+ (home-page "https://elpa.gnu.org/packages/track-changes.html")
+ (synopsis "An abstraction library which handles accumulating file changes")
+ (description
+ "This library is a layer of abstraction above
+@code{before-change-functions} and @code{after-change-functions} which takes
+care of accumulating changes until a time when its client finds it convenient
+to react to them.")
+ (license license:gpl3+)))
+
(define-public emacs-helm-eww
(package
(name "emacs-helm-eww")
--
2.46.0
L
L
Lee Thompson wrote on 4 Nov 17:59 +0100
[PATCH v2 2/4] gnu: Add rust-emacs-0.19.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
89bbaf24e8ec290b65b9ffc2176ddbc3050e5af4.1730739208.git.lee.p.thomp@gmail.com
* gnu/packages/crates-io.scm (rust-emacs-0.19): New variable.

Change-Id: I7791c869e8fdde96734499722d35f8f6aa2445fa
---
gnu/packages/crates-io.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index c08ccd29fd..07185752c5 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -23138,6 +23138,30 @@ (define-public rust-emacs-0.18
Emacs' support for dynamic modules.")
(license license:bsd-3)))
+(define-public rust-emacs-0.19
+ (package (inherit rust-emacs-0.18)
+ (name "rust-emacs")
+ (version "0.19.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (crate-uri "emacs" version))
+ (file-name
+ (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "133ip19m1nq8krf04klh1jpm833wpw6kdy2jksgylbw4xcp3yxws"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-anyhow" ,rust-anyhow-1)
+ ("rust-ctor" ,rust-ctor-0.1)
+ ("rust-emacs-macros" ,rust-emacs-macros-0.17)
+ ("rust-emacs-module" ,rust-emacs-module-0.18)
+ ("rust-failure-derive" ,rust-failure-derive-0.1)
+ ("rust-once-cell" ,rust-once-cell-1)
+ ("rust-thiserror" ,rust-thiserror-1))))))
+
(define-public rust-emacs-0.11
(package (inherit rust-emacs-0.18)
(name "rust-emacs")
--
2.46.0
L
L
Lee Thompson wrote on 4 Nov 17:59 +0100
[PATCH v2 3/4] gnu: Add parinfer-rust-emacs.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
ac57e29650deba71d11afedba7f01782aff6951f.1730739208.git.lee.p.thomp@gmail.com
* gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable.

Change-Id: I6c6fb384edb03b55bae63137576c364cf11e42a5
---
gnu/packages/text-editors.scm | 41 +++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm
index fae021f012..94bb878355 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -467,6 +467,47 @@ (define-public parinfer-rust
can load dynamic libraries.")
(license license:expat)))
+(define-public parinfer-rust-emacs
+ (package
+ (name "parinfer-rust-emacs")
+ (version "0.4.6")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/justinbarclay/parinfer-rust-emacs")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1v5lcbs1x4f3b428sj9rkjbmfpzyxzny7i0pgdpnr8nyjvpkzns8"))
+ (file-name (git-file-name name version))))
+ (build-system cargo-build-system)
+ (arguments
+ (list
+ #:install-source? #f
+ #:cargo-inputs `(("rust-getopts" ,rust-getopts-0.2)
+ ("rust-libc" ,rust-libc-0.2)
+ ("rust-emacs" ,rust-emacs-0.19)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-serde-derive" ,rust-serde-derive-1)
+ ("rust-unicode-segmentation" ,rust-unicode-segmentation-1)
+ ("rust-unicode-width" ,rust-unicode-width-0.1))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'install-library
+ (lambda* _
+ (let* ((lib (string-append #$output "/lib")))
+ (with-directory-excursion "target/release"
+ (install-file "libparinfer_rust.so" lib))))))))
+ (inputs (list clang))
+ (home-page "https://github.com/justinbarclay/parinfer-rust-emacs")
+ (synopsis "Emacs-centric fork of parinfer-rust")
+ (description
+ "@command{parinfer-rust-emacs} is an Emacs-centric fork of parinfer-rust,
+itself an implementation of Shaun Lebron’s Parinfer. This builds a shared
+library intended to be loaded by the @command{emacs-parinfer-rust-mode} Emacs
+plugin, though a standalone binary is built also.")
+ (license license:isc)))
+
(define-public joe
(package
(name "joe")
--
2.46.0
L
L
Lee Thompson wrote on 4 Nov 17:59 +0100
[PATCH v2 4/4] gnu: Add emacs-parinfer-rust-mode.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
75510cac8a443d3e2b93012eeb29daa149c90e17.1730739208.git.lee.p.thomp@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable.

Change-Id: I3508c5fd2d6c787ff9ef737e3f6a207d9b852ada
---
gnu/packages/emacs-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e7a75d51a3..1ce6921dbf 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -290,6 +290,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 text-editors)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -27457,6 +27458,49 @@ (define-public emacs-track-changes
to react to them.")
(license license:gpl3+)))
+(define-public emacs-parinfer-rust-mode
+ (package
+ (name "emacs-parinfer-rust-mode")
+ (version "0.9.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/justinbarclay/parinfer-rust-mode")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1kbn54v100rh6pxl3lc66pspd3nfy7pkv8iyqkg09xqcwyblbf86"))))
+ (propagated-inputs (list emacs-track-changes))
+ (inputs (list parinfer-rust-emacs))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((parinfer-lib (dirname (search-input-file inputs
+ "lib/libparinfer_rust.so"))))
+ ;; Specify the absolute file names of the parinfer shared
+ ;; library.
+ (make-file-writable "parinfer-rust-mode.el")
+ (emacs-substitute-variables "parinfer-rust-mode.el"
+ ("parinfer-rust--lib-name"
+ "libparinfer_rust.so")
+ ("parinfer-rust-library-dir"
+ parinfer-lib))
+ (emacs-substitute-sexps "parinfer-rust-mode.el"
+ ("defcustom parinfer-rust-library-directory"
+ parinfer-lib)
+ ("defconst parinfer-rust--lib-name"
+ "libparinfer_rust.so"))))))))
+ (home-page "https://github.com/justinbarclay/parinfer-rust-mode")
+ (synopsis "Lisp structure editing mode leveraging parinfer-rust")
+ (description
+ "@command{parinfer-rust-mode} aims to be a simple implementation of
+Parinfer that leverages the parinfer-rust-emacs library to do most of the
+heavy lifting.")
+ (license license:gpl3+)))
+
(define-public emacs-helm-eww
(package
(name "emacs-helm-eww")
--
2.46.0
L
L
Lee Thompson wrote on 11 Nov 14:49 +0100
[PATCH v3 4/4] gnu: Add emacs-parinfer-rust-mode.
(address . 74158@debbugs.gnu.org)(name . Lee Thompson)(address . lee.p.thomp@gmail.com)
7bb45a68f4af369885da12b7a03d2d331dce02db.1731332805.git.lee.p.thomp@gmail.com
* gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable.

Change-Id: I3508c5fd2d6c787ff9ef737e3f6a207d9b852ada
---
gnu/packages/emacs-xyz.scm | 44 ++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index e7a75d51a3..ef8bd5a8b8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -290,6 +290,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 text-editors)
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match))
@@ -27457,6 +27458,49 @@ (define-public emacs-track-changes
to react to them.")
(license license:gpl3+)))
+(define-public emacs-parinfer-rust-mode
+ (package
+ (name "emacs-parinfer-rust-mode")
+ (version "0.9.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/justinbarclay/parinfer-rust-mode")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1p00m757maw6dxig0x45gry1l7vm9dm6wg1anfm2rwl6hw1f5q25"))))
+ (propagated-inputs (list emacs-track-changes))
+ (inputs (list parinfer-rust-emacs))
+ (build-system emacs-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((parinfer-lib (dirname (search-input-file inputs
+ "lib/libparinfer_rust.so"))))
+ ;; Specify the absolute file names of the parinfer shared
+ ;; library.
+ (make-file-writable "parinfer-rust-mode.el")
+ (emacs-substitute-variables "parinfer-rust-mode.el"
+ ("parinfer-rust--lib-name"
+ "libparinfer_rust.so")
+ ("parinfer-rust-library-dir"
+ parinfer-lib))
+ (emacs-substitute-sexps "parinfer-rust-mode.el"
+ ("defcustom parinfer-rust-library-directory"
+ parinfer-lib)
+ ("defconst parinfer-rust--lib-name"
+ "libparinfer_rust.so"))))))))
+ (home-page "https://github.com/justinbarclay/parinfer-rust-mode")
+ (synopsis "Lisp structure editing mode leveraging parinfer-rust")
+ (description
+ "@command{parinfer-rust-mode} aims to be a simple implementation of
+Parinfer that leverages the parinfer-rust-emacs library to do most of the
+heavy lifting.")
+ (license license:gpl3+)))
+
(define-public emacs-helm-eww
(package
(name "emacs-helm-eww")
--
2.46.0
L
L
Lee Thompson wrote on 11 Nov 14:53 +0100
Upstream version bump (v3 4/4)
(address . 74158@debbugs.gnu.org)(address . ngraves@ngraves.fr)
67320c73.170a0220.173000.3ffe@mx.google.com
I've sent over an updated v3 version of patch 4/4 in this series, the
author of the upstream package released a new version just a couple of
days ago and I thought I'd probably make sure my stuff was as up-to-date
as posible before being fully reviewed. As far as I can see it's just
fixes to the code itself, no dependencies have changed etc.

Thanks all, apologies if this has complicated things.
E
E
Efraim Flashner wrote on 17 Nov 09:51 +0100
Re: [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19.
(name . Lee Thompson)(address . lee.p.thomp@gmail.com)(address . 74158@debbugs.gnu.org)
ZzmudhVCSE9FA9Us@3900XT
Thanks for the patch. I changed the order of inheritance between the two
packages.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmc5rnYACgkQQarn3Mo9
g1G1nhAArkYx8bUYQ2OrT8MUXDNdLcADFZLtKM5SMl6ZteqoHPcVGxNC+j2/1sgH
esI7NnPvlzMICiLYqWQNFFi9eVSsYIib+GrK7MHDARlWoZ27s4+F0So5BqRC2wDP
Vw8YVIAambQAz3XZ/aNVWAQUQG6ftLMRG5hLwbyY9gmBxTlHTg+CNJ77ZbG5ZOh9
3A1V2L48pFB3MuW5rMv8+/8VCuGV59ecPh6T0FW8kegM1f9dWBJ2m7rlaeARUJMr
SLiFZp1YD3TMHk6WFUqWX6JEAtmDKzRjQVpXujwfviguvVMIlisb51IkFjSYMTvL
Q/aM0izlWil5HeUZia0HISKHsQeDCmESh2rD6J7RtJZNbuffR1XkjUxGUoqZ1zga
x/vhC5/1lyZmrwYMm6xVL0iP31snDGVeBRPyTTWkXI+uc61FvB+it8lrsdHkBrhP
OKnMlYU0nJVqxkLG+Erseai7BH39i7PLHOLLaVKusOzr0olViRKSxBuivsOvi0r0
v0sfZPzsWcQ6MQIvFVGK0J8m3UFFCY8sufYa/4/6x3JvWIvodJW6ALXPcn0SHMZ2
yFxXhT0k1+9eYNPDfAzb5b3TT58Xw5min+5+aG7076hujgz3kkLXIhusd8IkNtMd
16jyhi/CvWq98a+E6A4wOn6T1Y5c3zXrcipGrum5RfW/D2qgKh8=
=vvrk
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 17 Nov 09:51 +0100
Re: [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs.
(name . Lee Thompson)(address . lee.p.thomp@gmail.com)(address . 74158@debbugs.gnu.org)
ZzmuhhI1wjvvQFG4@3900XT
I made a couple of minor changes to the patch and pushed it. I'll let
others take care of the other two patches.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmc5roYACgkQQarn3Mo9
g1HG7A/7Bt8GqTt2XZ3fLJRyWeL1soDSfF6iUHNTvPvepaFrkgp9ZqzcAy2KtOS1
ZQdZypAxK3iPf8UNlNPnr4JhvB8jUYCUgth4icihJBKeqf55kcX8nFdNswrFwo6I
zhf6cTT2buvT/TCSksfHlUJy5FEbtcs7q4XCd+DaRjNlBv5eRzHfk8+qdG9yMkfJ
Iwu9sBSshCy94wJ45/ef0nz/QbooyQ0NJU3d4Ph+VwikdcSON9WdqPww/fsI3/0q
HzkWTcgIokZkZmHDv0qk219i+Xy23c5ulkpBU0N9mZArZlBL2bXlqT1s6QtOu+TK
cqDi5W+7Nts0FF5aqCsWq/cRmkRFW07DmvD1KCFoki3gzoGSNUjg2iluPdU3Ua9G
ZLdUDjaAs7GzazCJLa2hTrAqUSwbnBOnTuaOvi9x5CwOd7NkAcmxEN0kpBnyMy3I
gYJrRII4YOJJ7FPxW4OZEz9TtlcTBzoDxPkD7fhJUqUXaMSegS5GAdB0g1f3OEzQ
x5/amroBz29BKfe7tmyJ7jw/Gvf4FA72J7Fejq3mUB7tr+bzkmMQ0KyaFnW6WrM1
4HrnojnXJ1F42OcPwsVYcO3YZtOMiAcSeJ76Hen3xf0fBSf98/OaqIB+o5ffGX/N
ageHz052WogMXF4ePsdTf4hIjJBHclhbBi4BVYXU/FNZ1r7E6+8=
=rcPC
-----END PGP SIGNATURE-----


?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74158@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74158
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch