GNU bug report logs - #42525
[PATCH 1/2] gnu: Add emacs-pretty-hydra.

Previous Next

Package: guix-patches;

Reported by: Joseph LaFreniere <joseph <at> lafreniere.xyz>

Date: Sat, 25 Jul 2020 02:05:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 42525 in the body.
You can then email your comments to 42525 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 02:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Joseph LaFreniere <joseph <at> lafreniere.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 25 Jul 2020 02:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joseph LaFreniere <joseph <at> lafreniere.xyz>
To: guix-patches <at> gnu.org
Subject: [PATCH 1/2] gnu: Add emacs-pretty-hydra.
Date: Fri, 24 Jul 2020 21:04:06 -0500
[Message part 1 (text/plain, inline)]
Patch file is attached.  Note that `guix lint` reports "the source 
file name should contain the package name";  I'm not sure how to 
resolve that.

--
Joseph LaFreniere
[0001-gnu-Add-emacs-pretty-hydra.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 02:11:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Joseph LaFreniere <joseph <at> lafreniere.xyz>
To: guix-patches <at> gnu.org
Subject: [PATCH 2/2] gnu: Add emacs-major-mode-hydra.
Date: Fri, 24 Jul 2020 21:10:25 -0500
[Message part 1 (text/plain, inline)]
Patch file is attached.  Similar to the first patch in this 
series, `guix lint` reports "the source file name should contain 
the package name".

--
Joseph LaFreniere
[0002-gnu-Add-emacs-major-mode-hydra.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 13:29:02 GMT) Full text and rfc822 format available.

Message #11 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Joseph LaFreniere <joseph <at> lafreniere.xyz>
Cc: 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 2/2] gnu: Add emacs-major-mode-hydra.
Date: Sat, 25 Jul 2020 16:28:08 +0300
[Message part 1 (text/plain, inline)]
Joseph LaFreniere <joseph <at> lafreniere.xyz> writes:

> Patch file is attached.  Similar to the first patch in this series, `guix
> lint` reports "the source file name should contain the package name".

Yes, because emacs-major-mode-hydra inherits emacs-pretty-hydra.


Does emacs-major-mode-hydra is useful without emacs-pretty-hydra and
vice versa?

I guess not, in that case we could just have emacs-pretty-hydra
containing '*.el' for both.

[…]

> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 147c6b476b..649f856a83 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -677,6 +677,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
> +    ...
> +    (arguments
> +     `(#:include '("^major-mode-hydra\\.el$")))
> +    (synopsis "Create nice-looking hydras")

Could you extend the synopsis little bit? ;-)

Thanks,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 13:29:02 GMT) Full text and rfc822 format available.

Message #14 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Joseph LaFreniere <joseph <at> lafreniere.xyz>
Cc: 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
Date: Sat, 25 Jul 2020 16:20:57 +0300
[Message part 1 (text/plain, inline)]
Hi Joseph,

Joseph LaFreniere <joseph <at> lafreniere.xyz> writes:

> Patch file is attached.  Note that `guix lint` reports "the source file name
> should contain the package name";  I'm not sure how to resolve that.

You could fix this by providing a ‘(file-name (git-file-name name
version))’ as in other Emacs packages.

[…]

> * gnu/packages/emacs-xyz.scm (emacs-pretty-hydra): New variable.
> ---
>  gnu/packages/emacs-xyz.scm | 56 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 56 insertions(+)
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index 55afda50df..147c6b476b 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -649,6 +649,34 @@ process, passing on the arguments as command line arguments.")
>         "Magit-annex adds a few git-annex operations to the Magit interface.")
>        (license license:gpl3+))))
>  
> +(define-public emacs-pretty-hydra
> +  (package
> +    ...
> +    (arguments
> +     `(#:install '("^pretty-hydra\\.el$")))

'emacs-build-system' handles '*.el' files, unless you exclude them with
the recipe bellow.  :-)

[…]


The following duplicates emacs-pretty-hydra above.

> +(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)))

As I see there is no reason to exclude or include '*.el'.


Also could you take a look on running a test suite?

Thanks,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 14:59:02 GMT) Full text and rfc822 format available.

Message #17 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: "LaFreniere, Joseph" <joseph <at> lafreniere.xyz>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: Joseph LaFreniere <joseph <at> lafreniere.xyz>, 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
Date: Sat, 25 Jul 2020 09:57:45 -0500
[Message part 1 (text/plain, inline)]
Oleg Pykhalov <go.wigust <at> gmail.com> writes:
> Joseph LaFreniere <joseph <at> lafreniere.xyz> writes:
>
>> Patch file is attached.  Note that `guix lint` reports "the 
>> source file name
>> should contain the package name";  I'm not sure how to resolve 
>> that.
>
> You could fix this by providing a ‘(file-name (git-file-name 
> name
> version))’ as in other Emacs packages.

Thanks.  Not sure how I missed that.

> 'emacs-build-system' handles '*.el' files, unless you exclude 
> them with
> the recipe bellow.  :-)

Thank you for the tip.  I have changed the include to an exclude.

> Also could you take a look on running a test suite?

The repo's test suite tests both pretty-hydra and 
major-mode-hydra.  Since major-mode-hydra is inheriting from and 
depends on this recipe, I'm assuming it would be rebuilt any time 
the pretty-hydra recipe changes.  Just to minimize the amount of 
work prying apart the repository I have left all of the tests to 
be run in the recipe for major-mode-hydra.  The updated patch for 
that will be following shortly.

--
Joseph LaFreniere
[0001-gnu-Add-emacs-pretty-hydra.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 15:03:02 GMT) Full text and rfc822 format available.

Message #20 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: "LaFreniere, Joseph" <joseph <at> lafreniere.xyz>
To: Oleg Pykhalov <go.wigust <at> gmail.com>
Cc: 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 2/2] gnu: Add emacs-major-mode-hydra.
Date: Sat, 25 Jul 2020 10:02:00 -0500
[Message part 1 (text/plain, inline)]
Thank you for the reviews, Oleg.  :)

Oleg Pykhalov <go.wigust <at> gmail.com> writes:
> Joseph LaFreniere <joseph <at> lafreniere.xyz> writes:
>
>> Patch file is attached.  Similar to the first patch in this 
>> series, `guix
>> lint` reports "the source file name should contain the package 
>> name".
>
> Yes, because emacs-major-mode-hydra inherits emacs-pretty-hydra.

Fixed in the updated patch for emacs-pretty-hydra.

> Does emacs-major-mode-hydra is useful without emacs-pretty-hydra 
> and
> vice versa?
>
> I guess not, in that case we could just have emacs-pretty-hydra
> containing '*.el' for both.

Yes, emacs-pretty-hydra is useful independently of 
emacs-major-mode-hydra.  The descriptions in the initial patches 
were written a long time ago and were misleading.  I apologize for 
the confusion.

> Could you extend the synopsis little bit? ;-)

Missed this comment in the updated patch for emacs-pretty-hydra 
that I just sent.  I will revisit it following this mail.  Is the 
synopsis for this recipe (emacs-major-mode-hyra) suitable?

--
Joseph LaFreniere
[0002-gnu-Add-emacs-major-mode-hydra.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 15:06:01 GMT) Full text and rfc822 format available.

Message #23 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: "LaFreniere, Joseph" <joseph <at> lafreniere.xyz>
To: Oleg Pykhalov <go.wigust <at> gmail.com>, 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
Date: Sat, 25 Jul 2020 10:05:06 -0500
[Message part 1 (text/plain, inline)]
LaFreniere, Joseph <joseph <at> lafreniere.xyz> writes:
> Oleg Pykhalov <go.wigust <at> gmail.com> writes:
>> Joseph LaFreniere <joseph <at> lafreniere.xyz> writes:
>>
>>> Patch file is attached.  Note that `guix lint` reports "the
>>> source file name
>>> should contain the package name";  I'm not sure how to resolve
>>> that.
>>
>> You could fix this by providing a ‘(file-name (git-file-name
>> name
>> version))’ as in other Emacs packages.
>
> Thanks.  Not sure how I missed that.
>
>> 'emacs-build-system' handles '*.el' files, unless you exclude
>> them with
>> the recipe bellow.  :-)
>
> Thank you for the tip.  I have changed the include to an 
> exclude.
>
>> Also could you take a look on running a test suite?
>
> The repo's test suite tests both pretty-hydra and
> major-mode-hydra.  Since major-mode-hydra is inheriting from and
> depends on this recipe, I'm assuming it would be rebuilt any 
> time
> the pretty-hydra recipe changes.  Just to minimize the amount of
> work prying apart the repository I have left all of the tests to
> be run in the recipe for major-mode-hydra.  The updated patch 
> for
> that will be following shortly.

An updated patch for emacs-pretty-hydra is attached with an 
expanded synopsis.

--
Joseph LaFreniere
[0001-gnu-Add-emacs-pretty-hydra.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sat, 25 Jul 2020 18:36:02 GMT) Full text and rfc822 format available.

Message #26 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: "LaFreniere\, Joseph" <joseph <at> lafreniere.xyz>
Cc: 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
Date: Sat, 25 Jul 2020 21:34:52 +0300
[Message part 1 (text/plain, inline)]
"LaFreniere, Joseph" <joseph <at> lafreniere.xyz> writes:

[…]

>> Also could you take a look on running a test suite?
>
> The repo's test suite tests both pretty-hydra and major-mode-hydra.  Since
> major-mode-hydra is inheriting from and depends on this recipe, I'm assuming
> it would be rebuilt any time the pretty-hydra recipe changes.  Just to
> minimize the amount of work prying apart the repository I have left all of the
> tests to be run in the recipe for major-mode-hydra.  

Yes, it will, that's a feature of Guix.  ;-)

The ‘test’ directory contains ‘major-mode-hydra-test.el’ and
‘pretty-hydra-test.el’ which could be runned by themself AFAICC.  In
that case, if somebody will need to change ‘pretty-hydra’ recipe, he
will run the test and be sure the package functions as intended.  Would
you like take a look on this, please?

> The updated patch for that will be following shortly.

We don't hurry. ;-) Also, you don't need to attach a patch if you are
working on a thing and will send another one in a day.

Regards,
Oleg.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#42525; Package guix-patches. (Sun, 26 Jul 2020 14:06:01 GMT) Full text and rfc822 format available.

Message #29 received at 42525 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Joseph LaFreniere <joseph <at> lafreniere.xyz>
Cc: 42525 <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 1/2] gnu: Add emacs-pretty-hydra.
Date: Sun, 26 Jul 2020 16:04:51 +0200
Hello,

Joseph LaFreniere <joseph <at> lafreniere.xyz> writes:

> Patch file is attached.

Thank you.

> Note that `guix lint` reports "the source file name should contain the
> package name"; I'm not sure how to resolve that.

You are missing a

  (file-name (git-file-name name version))

expression in `origin'.

> +(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")
> +             (commit version)))
> +       (sha256
> +        (base32
> +         "08a15knkdq35pzjq82imff016fbfdib5q4glg2xmdy2b5fnk7jqa"))))

Nitpick: please move the string on the same line as `base32'.

> +    (build-system emacs-build-system)

There are some tests using ert-runner. Could you try to enable them?

> +    (propagated-inputs
> +     `(("emacs-dash" ,emacs-dash)
> +       ("emacs-hydra" ,emacs-hydra)
> +       ("emacs-s" ,emacs-s)))
> +    (arguments
> +     `(#:install '("^pretty-hydra\\.el$")))
> +    (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-minions
>    (package
>      (name "emacs-minions")
> @@ -6148,6 +6176,34 @@ them easier to distinguish from other, less important buffers.")
>  for Ivy and Company that make use of the library.")
>      (license license:expat)))
>  
> +(define-public emacs-pretty-hydra

You added the package twice.

Could you send an updated patch?

Regards,
-- 
Nicolas Goaziou




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 18 Dec 2020 13:25:02 GMT) Full text and rfc822 format available.

Notification sent to Joseph LaFreniere <joseph <at> lafreniere.xyz>:
bug acknowledged by developer. (Fri, 18 Dec 2020 13:25:02 GMT) Full text and rfc822 format available.

Message #34 received at 42525-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: "LaFreniere, Joseph" <joseph <at> lafreniere.xyz>
Cc: 42525-done <at> debbugs.gnu.org
Subject: Re: [bug#42525] [PATCH 2/2] gnu: Add emacs-major-mode-hydra.
Date: Fri, 18 Dec 2020 14:24:22 +0100
Both patches were applied some time ago in
90eb5dd6b5989eeb5350c785036c53469496e394.

Closing!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Jan 2021 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 100 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.