* [bug#74158] [PATCH 0/4] Add emacs-parinfer-rust-mode @ 2024-11-01 11:13 Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-01 11:13 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable. 2024-11-01 11:13 [bug#74158] [PATCH 0/4] Add emacs-parinfer-rust-mode Lee Thompson @ 2024-11-01 13:28 ` Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 2/4] * gnu/packages/crates-io.scm (rust-emacs-0.19): " Lee Thompson ` (2 more replies) 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson 2024-11-11 13:53 ` [bug#74158] Upstream version bump (v3 4/4) Lee Thompson 2 siblings, 3 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-01 13:28 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson Change-Id: Ie516bba11248d6ac47db854ac138b705dfee1b8e --- gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH 2/4] * gnu/packages/crates-io.scm (rust-emacs-0.19): New variable. 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson @ 2024-11-01 13:28 ` Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): " Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): " Lee Thompson 2 siblings, 0 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-01 13:28 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson Change-Id: I7791c869e8fdde96734499722d35f8f6aa2445fa --- gnu/packages/crates-io.scm | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable. 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 2/4] * gnu/packages/crates-io.scm (rust-emacs-0.19): " Lee Thompson @ 2024-11-01 13:28 ` Lee Thompson 2024-11-03 20:30 ` Nicolas Graves via Guix-patches via 2024-11-01 13:28 ` [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): " Lee Thompson 2 siblings, 1 reply; 15+ messages in thread From: Lee Thompson @ 2024-11-01 13:28 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson 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)) + #: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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable. 2024-11-01 13:28 ` [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): " Lee Thompson @ 2024-11-03 20:30 ` Nicolas Graves via Guix-patches via 0 siblings, 0 replies; 15+ messages in thread From: Nicolas Graves via Guix-patches via @ 2024-11-03 20:30 UTC (permalink / raw) To: Lee Thompson, 74158; +Cc: Lee Thompson On 2024-11-01 13:28, Lee Thompson wrote: > 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. > + #: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. > + (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. > + (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... > +@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). > +can load dynamic libraries.") > + (license license:isc))) > + > (define-public joe > (package > (name "joe") -- Best regards, Nicolas Graves ^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable. 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 2/4] * gnu/packages/crates-io.scm (rust-emacs-0.19): " Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): " Lee Thompson @ 2024-11-01 13:28 ` Lee Thompson 2024-11-03 20:34 ` Nicolas Graves via Guix-patches via 2 siblings, 1 reply; 15+ messages in thread From: Lee Thompson @ 2024-11-01 13:28 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson 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) + (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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): New variable. 2024-11-01 13:28 ` [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): " Lee Thompson @ 2024-11-03 20:34 ` Nicolas Graves via Guix-patches via 0 siblings, 0 replies; 15+ messages in thread From: Nicolas Graves via Guix-patches via @ 2024-11-03 20:34 UTC (permalink / raw) To: Lee Thompson, 74158; +Cc: Lee Thompson On 2024-11-01 13:28, Lee Thompson wrote: > 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. > + (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")))) > + ;; 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. > +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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode 2024-11-01 11:13 [bug#74158] [PATCH 0/4] Add emacs-parinfer-rust-mode Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson @ 2024-11-04 16:59 ` Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 1/4] gnu: Add emacs-track-changes Lee Thompson ` (3 more replies) 2024-11-11 13:53 ` [bug#74158] Upstream version bump (v3 4/4) Lee Thompson 2 siblings, 4 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-04 16:59 UTC (permalink / raw) To: 74158 Cc: Lee Thompson, Andrew Tropin, Katherine Cox-Buday, Liliana Marie Prikler 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 1/4] gnu: Add emacs-track-changes. 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson @ 2024-11-04 16:59 ` Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19 Lee Thompson ` (2 subsequent siblings) 3 siblings, 0 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-04 16:59 UTC (permalink / raw) To: 74158 Cc: Lee Thompson, Andrew Tropin, Katherine Cox-Buday, Liliana Marie Prikler * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable. Change-Id: Ie516bba11248d6ac47db854ac138b705dfee1b8e --- gnu/packages/emacs-xyz.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19. 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 1/4] gnu: Add emacs-track-changes Lee Thompson @ 2024-11-04 16:59 ` Lee Thompson 2024-11-17 8:51 ` Efraim Flashner 2024-11-04 16:59 ` [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 4/4] gnu: Add emacs-parinfer-rust-mode Lee Thompson 3 siblings, 1 reply; 15+ messages in thread From: Lee Thompson @ 2024-11-04 16:59 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson, Efraim Flashner * 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(+) 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19. 2024-11-04 16:59 ` [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19 Lee Thompson @ 2024-11-17 8:51 ` Efraim Flashner 0 siblings, 0 replies; 15+ messages in thread From: Efraim Flashner @ 2024-11-17 8:51 UTC (permalink / raw) To: Lee Thompson; +Cc: 74158 [-- Attachment #1: Type: text/plain, Size: 298 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs. 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 1/4] gnu: Add emacs-track-changes Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19 Lee Thompson @ 2024-11-04 16:59 ` Lee Thompson 2024-11-17 8:51 ` Efraim Flashner 2024-11-04 16:59 ` [bug#74158] [PATCH v2 4/4] gnu: Add emacs-parinfer-rust-mode Lee Thompson 3 siblings, 1 reply; 15+ messages in thread From: Lee Thompson @ 2024-11-04 16:59 UTC (permalink / raw) To: 74158; +Cc: Lee Thompson * gnu/packages/text-editors.scm (parinfer-rust-emacs): New variable. Change-Id: I6c6fb384edb03b55bae63137576c364cf11e42a5 --- gnu/packages/text-editors.scm | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs. 2024-11-04 16:59 ` [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs Lee Thompson @ 2024-11-17 8:51 ` Efraim Flashner 0 siblings, 0 replies; 15+ messages in thread From: Efraim Flashner @ 2024-11-17 8:51 UTC (permalink / raw) To: Lee Thompson; +Cc: 74158 [-- Attachment #1: Type: text/plain, Size: 328 bytes --] 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 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#74158] [PATCH v2 4/4] gnu: Add emacs-parinfer-rust-mode. 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson ` (2 preceding siblings ...) 2024-11-04 16:59 ` [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs Lee Thompson @ 2024-11-04 16:59 ` Lee Thompson 3 siblings, 0 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-04 16:59 UTC (permalink / raw) To: 74158 Cc: Lee Thompson, Andrew Tropin, Katherine Cox-Buday, Liliana Marie Prikler * 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(+) 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#74158] Upstream version bump (v3 4/4) 2024-11-01 11:13 [bug#74158] [PATCH 0/4] Add emacs-parinfer-rust-mode Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson @ 2024-11-11 13:53 ` Lee Thompson 2 siblings, 0 replies; 15+ messages in thread From: Lee Thompson @ 2024-11-11 13:53 UTC (permalink / raw) To: 74158; +Cc: ngraves 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. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2024-11-17 8:53 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2024-11-01 11:13 [bug#74158] [PATCH 0/4] Add emacs-parinfer-rust-mode Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 1/4] * gnu/packages/emacs-xyz.scm (emacs-track-changes): New variable Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 2/4] * gnu/packages/crates-io.scm (rust-emacs-0.19): " Lee Thompson 2024-11-01 13:28 ` [bug#74158] [PATCH 3/4] * gnu/packages/text-editors.scm (parinfer-rust-emacs): " Lee Thompson 2024-11-03 20:30 ` Nicolas Graves via Guix-patches via 2024-11-01 13:28 ` [bug#74158] [PATCH 4/4] * gnu/packages/emacs-xyz.scm (emacs-parinfer-rust-mode): " Lee Thompson 2024-11-03 20:34 ` Nicolas Graves via Guix-patches via 2024-11-04 16:59 ` [bug#74158] [PATCH v2 0/4] Emacs parinfer-rust-mode Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 1/4] gnu: Add emacs-track-changes Lee Thompson 2024-11-04 16:59 ` [bug#74158] [PATCH v2 2/4] gnu: Add rust-emacs-0.19 Lee Thompson 2024-11-17 8:51 ` Efraim Flashner 2024-11-04 16:59 ` [bug#74158] [PATCH v2 3/4] gnu: Add parinfer-rust-emacs Lee Thompson 2024-11-17 8:51 ` Efraim Flashner 2024-11-04 16:59 ` [bug#74158] [PATCH v2 4/4] gnu: Add emacs-parinfer-rust-mode Lee Thompson 2024-11-11 13:53 ` [bug#74158] Upstream version bump (v3 4/4) Lee Thompson
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/guix.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.