[PATCH 1/2] gnu: Add emacs-pretty-hydra.

  • Done
  • quality assurance status badge
Details
3 participants
  • LaFreniere, Joseph
  • Christopher Baines
  • Nicolas Goaziou
Owner
unassigned
Submitted by
LaFreniere, Joseph
Severity
normal
L
L
LaFreniere, Joseph wrote on 19 Mar 2020 06:41
(address . guix-patches@gnu.org)
871rpoq4tj.fsf@lafreniere.xyz
Patch file is attached.

As noted in the description, this package is not intended for use
by end-users. Is there a convention for communicating that?

--
Joseph LaFreniere
From 77d0cc7e5fbda5dc0aa36cc16f8ffac6ca8591ad Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Wed, 18 Mar 2020 20:59:49 -0500
Subject: [PATCH 1/2] gnu: Add emacs-pretty-hydra.

* gnu/packages/emacs-xyz.scm (emacs-pretty-hydra): New variable.
---
gnu/packages/emacs-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)

Toggle diff (47 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a821bc7776..54728d7165 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5576,6 +5576,40 @@ the Hydra very seamless; it's like a minor mode that disables itself
automatically.")
(license license:gpl3+)))
+(define-public emacs-pretty-hydra
+ (package
+ (name "emacs-pretty-hydra")
+ (version "0.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jerrypnz/major-mode-hydra.el.git")
+ (commit version)))
+ (sha256
+ (base32
+ "08a15knkdq35pzjq82imff016fbfdib5q4glg2xmdy2b5fnk7jqa"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-hydra" ,emacs-hydra)
+ ("emacs-s" ,emacs-s)
+ ("emacs-dash" ,emacs-dash)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'add-source-to-load-path 'remove-pretty-hydra
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; major-mode-hydra is packaged separately.
+ (delete-file "major-mode-hydra.el")
+ #t)))))
+ (home-page "https://github.com/jerrypnz/major-mode-hydra.el")
+ (synopsis "Major mode keybindings managed by Hydra")
+ (description
+ "This package offers an hydra-based method of managing major
+mode-specific key bindings. It is intended for use as a library only; see
+package @code{emacs-major-mode-hydra} for a user-friendly interface.")
+ (license license:gpl3+)))
+
(define-public emacs-ivy
(package
(name "emacs-ivy")
--
2.25.1
L
L
LaFreniere, Joseph wrote on 19 Mar 2020 06:46
[PATCH 2/2] gnu: Add emacs-major-mode-hydra.
(address . 40128@debbugs.gnu.org)
87zhccoq16.fsf@lafreniere.xyz
Patch file is attached.

--
Joseph LaFreniere
From 387c56eaf4efe773065175b5db0dda0dc24c8dba Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Wed, 18 Mar 2020 20:59:09 -0500
Subject: [PATCH 2/2] gnu: Add emacs-major-mode-hydra.

* gnu/packages/emacs-xyz.scm (emacs-major-mode-hydra): New variable.

gnu: Add emacs-major-mode-hydra.

* gnu/packages/emacs-xyz.scm (emacs-major-mode-hydra): New variable.
---
gnu/packages/emacs-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 54728d7165..74de919c80 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5610,6 +5610,26 @@ mode-specific key bindings. It is intended for use as a library only; see
package @code{emacs-major-mode-hydra} for a user-friendly interface.")
(license license:gpl3+)))
+(define-public emacs-major-mode-hydra
+ (package
+ (inherit emacs-pretty-hydra)
+ (name "emacs-major-mode-hydra")
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-pretty-hydra" ,emacs-pretty-hydra)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'add-source-to-load-path 'remove-pretty-hydra
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; pretty-hydra is provided by dependency.
+ (delete-file "pretty-hydra.el")
+ #t)))))
+ (synopsis "Create nice-looking hydras")
+ (description
+ "This package provides the macro @code{pretty-hydra-define} to define
+hydras with one column per group of heads.")))
+
(define-public emacs-ivy
(package
(name "emacs-ivy")
--
2.25.1
N
N
Nicolas Goaziou wrote on 21 Mar 2020 17:38
Re: [bug#40128] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
(name . LaFreniere, Joseph)(address . joseph@lafreniere.xyz)(address . 40128@debbugs.gnu.org)
87fte18xyz.fsf@nicolasgoaziou.fr
Hello,

"LaFreniere, Joseph" <joseph@lafreniere.xyz> writes:

Toggle quote (2 lines)
> Patch file is attached.

Thank you.

Toggle quote (3 lines)
> As noted in the description, this package is not intended for use by
> end-users. Is there a convention for communicating that?

I think specifying it in the description is the correct way.

Toggle quote (5 lines)
> + (propagated-inputs
> + `(("emacs-hydra" ,emacs-hydra)
> + ("emacs-s" ,emacs-s)
> + ("emacs-dash" ,emacs-dash)))

Could you re-order them alphabetically?

Toggle quote (9 lines)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-before 'add-source-to-load-path 'remove-pretty-hydra
> + (lambda* (#:key outputs #:allow-other-keys)
> + ;; major-mode-hydra is packaged separately.
> + (delete-file "major-mode-hydra.el")
> + #t)))))

You can use #:exclude keyword from the Emacs build system instead.

Could you send an updated patch?

Regards,

--
Nicolas Goaziou
N
N
Nicolas Goaziou wrote on 21 Mar 2020 17:41
Re: [bug#40128] [PATCH 2/2] gnu: Add emacs-major-mode-hydra.
(name . LaFreniere, Joseph)(address . joseph@lafreniere.xyz)(address . 40128@debbugs.gnu.org)
87blop8xuh.fsf@nicolasgoaziou.fr
"LaFreniere, Joseph" <joseph@lafreniere.xyz> writes:

Toggle quote (9 lines)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-before 'add-source-to-load-path 'remove-pretty-hydra
> + (lambda* (#:key outputs #:allow-other-keys)
> + ;; pretty-hydra is provided by dependency.
> + (delete-file "pretty-hydra.el")
> + #t)))))

There, too, you may use #:exclude.
L
L
LaFreniere, Joseph wrote on 22 Mar 2020 00:12
Re: [bug#40128] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 40128@debbugs.gnu.org)
87wo7dl2u5.fsf@lafreniere.xyz
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (6 lines)
>> As noted in the description, this package is not intended for
>> use by
>> end-users. Is there a convention for communicating that?
>
> I think specifying it in the description is the correct way.

Noted.

Toggle quote (7 lines)
>> + (propagated-inputs
>> + `(("emacs-hydra" ,emacs-hydra)
>> + ("emacs-s" ,emacs-s)
>> + ("emacs-dash" ,emacs-dash)))
>
> Could you re-order them alphabetically?

Done.

Toggle quote (13 lines)
>> + (arguments
>> + `(#:phases
>> + (modify-phases %standard-phases
>> + (add-before 'add-source-to-load-path
>> 'remove-pretty-hydra
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + ;; major-mode-hydra is packaged separately.
>> + (delete-file "major-mode-hydra.el")
>> + #t)))))
>
> You can use #:exclude keyword from the Emacs build system
> instead.

Thanks for the tip!

Toggle quote (2 lines)
> Could you send an updated patch?

Patch file is attached.

--
Joseph LaFreniere
From bd33f91c6d1b69d9951e9c338b36c92328eb3555 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Wed, 18 Mar 2020 20:59:49 -0500
Subject: [PATCH 1/2] gnu: Add emacs-pretty-hydra.

* gnu/packages/emacs-xyz.scm (emacs-pretty-hydra): New variable.
---
gnu/packages/emacs-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 1ea3155807..50eec6d516 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5486,6 +5486,34 @@ the Hydra very seamless; it's like a minor mode that disables itself
automatically.")
(license license:gpl3+)))
+(define-public emacs-pretty-hydra
+ (package
+ (name "emacs-pretty-hydra")
+ (version "0.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jerrypnz/major-mode-hydra.el.git")
+ (commit version)))
+ (sha256
+ (base32
+ "08a15knkdq35pzjq82imff016fbfdib5q4glg2xmdy2b5fnk7jqa"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-hydra" ,emacs-hydra)
+ ("emacs-s" ,emacs-s)))
+ (arguments
+ `(#:exclude (cons "^major-mode-hydra\\.el" %default-exclude)))
+ (home-page "https://github.com/jerrypnz/major-mode-hydra.el")
+ (synopsis "Major mode keybindings managed by Hydra")
+ (description
+ "This package offers an hydra-based method of managing major
+mode-specific key bindings. It is intended for use as a library only; see
+package @code{emacs-major-mode-hydra} for a user-friendly interface.")
+ (license license:gpl3+)))
+
(define-public emacs-ivy
(package
(name "emacs-ivy")
--
2.25.1
L
L
LaFreniere, Joseph wrote on 22 Mar 2020 00:13
Re: [bug#40128] [PATCH 2/2] gnu: Add emacs-major-mode-hydra.
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 40128@debbugs.gnu.org)
87v9mxl2s0.fsf@lafreniere.xyz
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

Toggle quote (12 lines)
>> + (arguments
>> + `(#:phases
>> + (modify-phases %standard-phases
>> + (add-before 'add-source-to-load-path
>> 'remove-pretty-hydra
>> + (lambda* (#:key outputs #:allow-other-keys)
>> + ;; pretty-hydra is provided by dependency.
>> + (delete-file "pretty-hydra.el")
>> + #t)))))
>
> There, too, you may use #:exclude.

New patch file implemented with #:exclude is attached. Thank you
very much for reviewing.

--
Joseph LaFreniere
From 5ec5117c0cda5c69d3210a93243c060ea2930c5a Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Wed, 18 Mar 2020 20:59:09 -0500
Subject: [PATCH 2/2] gnu: Add emacs-major-mode-hydra.

* gnu/packages/emacs-xyz.scm (emacs-major-mode-hydra): New variable.

gnu: Add emacs-major-mode-hydra.

* gnu/packages/emacs-xyz.scm (emacs-major-mode-hydra): New variable.
---
gnu/packages/emacs-xyz.scm | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Toggle diff (27 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 50eec6d516..7056f0227b 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5514,6 +5514,20 @@ mode-specific key bindings. It is intended for use as a library only; see
package @code{emacs-major-mode-hydra} for a user-friendly interface.")
(license license:gpl3+)))
+(define-public emacs-major-mode-hydra
+ (package
+ (inherit emacs-pretty-hydra)
+ (name "emacs-major-mode-hydra")
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-pretty-hydra" ,emacs-pretty-hydra)))
+ (arguments
+ `(#:exclude (cons "^pretty-hydra\\.el" %default-exclude)))
+ (synopsis "Create nice-looking hydras")
+ (description
+ "This package provides the macro @code{pretty-hydra-define} to define
+hydras with one column per group of heads.")))
+
(define-public emacs-ivy
(package
(name "emacs-ivy")
--
2.25.1
L
L
LaFreniere, Joseph wrote on 19 Apr 2020 19:57
Re: [bug#40128] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 40128@debbugs.gnu.org)
87k12bwe7t.fsf@odyssey.lafreniere.xyz
Any updates on this?

--
Joseph LaFreniere
N
N
Nicolas Goaziou wrote on 19 Apr 2020 20:28
(name . LaFreniere, Joseph)(address . joseph@lafreniere.xyz)(address . 40128@debbugs.gnu.org)
87sggztjml.fsf@nicolasgoaziou.fr
Hello,

"LaFreniere, Joseph" <joseph@lafreniere.xyz> writes:

Toggle quote (2 lines)
> Any updates on this?

Uh? Did I miss your updated patch?

Would you mind sending it again?

Regards,

--
Nicolas Goaziou
L
L
LaFreniere, Joseph wrote on 19 Apr 2020 21:24
(name . Nicolas Goaziou)(address . mail@nicolasgoaziou.fr)(address . 40128@debbugs.gnu.org)
87h7xfwa6z.fsf@odyssey.lafreniere.xyz
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
Toggle quote (4 lines)
> Uh? Did I miss your updated patch?
>
> Would you mind sending it again?

No problem. :)

Patch file is attached.

--
Joseph LaFreniere
From bd33f91c6d1b69d9951e9c338b36c92328eb3555 Mon Sep 17 00:00:00 2001
From: Joseph LaFreniere <joseph@lafreniere.xyz>
Date: Wed, 18 Mar 2020 20:59:49 -0500
Subject: [PATCH 1/2] gnu: Add emacs-pretty-hydra.

* gnu/packages/emacs-xyz.scm (emacs-pretty-hydra): New variable.
---
gnu/packages/emacs-xyz.scm | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

Toggle diff (41 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 1ea3155807..50eec6d516 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5486,6 +5486,34 @@ the Hydra very seamless; it's like a minor mode that disables itself
automatically.")
(license license:gpl3+)))
+(define-public emacs-pretty-hydra
+ (package
+ (name "emacs-pretty-hydra")
+ (version "0.2.2")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/jerrypnz/major-mode-hydra.el.git")
+ (commit version)))
+ (sha256
+ (base32
+ "08a15knkdq35pzjq82imff016fbfdib5q4glg2xmdy2b5fnk7jqa"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-dash" ,emacs-dash)
+ ("emacs-hydra" ,emacs-hydra)
+ ("emacs-s" ,emacs-s)))
+ (arguments
+ `(#:exclude (cons "^major-mode-hydra\\.el" %default-exclude)))
+ (home-page "https://github.com/jerrypnz/major-mode-hydra.el")
+ (synopsis "Major mode keybindings managed by Hydra")
+ (description
+ "This package offers an hydra-based method of managing major
+mode-specific key bindings. It is intended for use as a library only; see
+package @code{emacs-major-mode-hydra} for a user-friendly interface.")
+ (license license:gpl3+)))
+
(define-public emacs-ivy
(package
(name "emacs-ivy")
--
2.25.1
C
C
Christopher Baines wrote on 21 Nov 2020 10:12
(name . LaFreniere, Joseph)(address . joseph@lafreniere.xyz)(address . 40128-done@debbugs.gnu.org)
87wnyfhy3x.fsf@cbaines.net
LaFreniere, Joseph <joseph@lafreniere.xyz> writes:

Toggle quote (9 lines)
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> Uh? Did I miss your updated patch?
>>
>> Would you mind sending it again?
>
> No problem. :)
>
> Patch file is attached.

It's been a few months, so I've reviewed and pushed what I think were
the most up to date patches. They're on master as of
90eb5dd6b5989eeb5350c785036c53469496e394.

Thanks,

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl+42hJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XdwJhAAkJgEDD74bzrAEVJZs3+yv9lDJmPiA38P
87k/nvGClGwTHwlqr4sDaFx2RuxhCZrB/zoHN1GWGcNnE2IpNTRL0Bg5FBeesLcm
lvnyysJ2Mh5nxXm5h1cf8z2c+/dDEtCuscd58JWHIPCFF+FJnU1Jo8qMXhGxOtv8
x3BkgNRyxDVhqGcUJmfQgfwV8LCD78/JiTZEZdA54m8bh5EW+L5bsf8Ezaz2M1L7
ZlwvBeR2YcEk71eyN31C03Vp5sLdlSUikziLxK2rcXo6p0TOw2smH93Q/htLpvuf
i5uUqxU/vF4j3MCVuL0tLCEmAYeDZpECHHYpUMMDD3huNq49q5Ypy0/ONaJgF0qL
SoZlbbB0/kl7vcTroZxdYcCjIAR4eeyyAid5xGJb3Y9hQrqC2uo73tcF9pvEA54F
B2WCIt3IzLN9wsdLgprcMwrCGS5o8dUHddZD1elMtS9RCKUaBrgPk31i0wxnrvuv
+ypzxxVhInsl+bVK2y6wvTd6GHIjUWFZfqD8EpTOVqD+TBujkulFMK7n1yePURjU
q27Ke7qy+7jMEtn34t76NvLUQrRlaywwplgb8rnwPkx/PyeYeNnluR2AHXbLkV4m
BZR8EMmlZczHLwfviS9nhyrqRtKwMabxB6ZfsLFMsHGEYiLXtcYZ5RN6kD99iDIT
cVcGAUMaFYo=
=ZFEm
-----END PGP SIGNATURE-----

Closed
?