Add emacs-magit-annex

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Lemmer Webber
  • Kyle Meyer
Owner
unassigned
Submitted by
Christopher Lemmer Webber
Severity
normal

Debbugs page

Christopher Lemmer Webber wrote 5 years ago
(address . guix-patches@gnu.org)
875zegcq6w.fsf@dustycloud.org
From 5d6e5c4bd7809756cba5c9f317b7814052d940ae Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Thu, 2 Apr 2020 15:03:27 -0400
Subject: [PATCH] gnu: Add emacs-magit-annex.

* gnu/packages/emacs-xyz.scm (emacs-magit-annex): New variable.
---
gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)

Toggle diff (37 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 8fcc686613..5800b32084 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -448,6 +448,30 @@ these arguments. The prototypical use is for the command to call an external
process, passing on the arguments as command line arguments.")
(license license:gpl3+)))
+(define-public emacs-magit-annex
+ (package
+ (name "emacs-magit-annex")
+ (version "1.7.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/magit/magit-annex.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "07r0d2i1hws63wfv1jys63r3lmrl4ywwi76gi7srwhzhqdr1af0n"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("emacs-magit" ,emacs-magit)
+ ("emacs-magit-popup" ,emacs-magit-popup)
+ ("transient" ,emacs-transient)))
+ (home-page "https://github.com/magit/magit-annex/")
+ (synopsis "Git-annex support for Magit")
+ (description
+ "Magit-annex adds a few git-annex operations to the Magit interface.")
+ (license license:gpl3+)))
+
(define-public emacs-minions
(package
(name "emacs-minions")
--
2.26.0
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEUQqGKOKndniPjHCcS8Alkl/49NMFAl6HkWcACgkQS8Alkl/4
9NO2GBAA5MJjQr7dGrfl99PU+7kPHn4ROtKNR1lnNC9szJw1RejAsxFCUK2ZQHpm
SeWEz1LSM0HlreC+cJw++ISzsVL6hf2DXG/JiNUeqVKTI4JPjdR7FAY2UUjZNaS5
pE4Ahak1rLHKOI8vVEW7q6sdrlulVRVbQiemKz8t9u6z76NacSwrjuUCzoFV6+Y5
ZsAKkwSJjwsbbdlADNHsxahYYrtcyicskYoocSJj3lkaQnNfmPZxEcofX4c2q58m
Pa624qplXDmx9yLWE4FqtFHYySpU4PzDjm4bLePWqTzu6DPiiRd6D97768/q/qo8
O+oqchAt2AvRUptmMIciRfzJpPQBP9w6BhO+ixE/i71IBJItbsqV/DQ84xKuryKA
Yg8nQ1zLtnq0GXtpjcWcA27p8ZqdFv689G5XoMaVNh3fB7OT4gX5nsXX5FmZqSB/
/D3GMij4TrKxwxtls4bTH2t3UWtzVgm9ue8VwTSFcYDXool4mW99NwEJ70y3ALs8
Hxxw5jsH/bmcaRTlHxfnDzFjQybvzxK64lC/2Iq4UyJM0xhl512G01vO4Wedfr6p
ZKkrBKBZfZNL+1Hq+/ouMLGM/knh4q7ajO0eUv3xy5l3pUvzElAZAqryBnm4xnAV
NZTfQ67KcLxICclb6STFE5BMyjhBsG6hJLhaLDnbjtpiJIaAYxY=
=e4Mi
-----END PGP SIGNATURE-----

Kyle Meyer wrote 5 years ago
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 40417@debbugs.gnu.org)
87k12w6v2p.fsf@kyleam.com
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

Toggle quote (19 lines)
> +(define-public emacs-magit-annex
> + (package
> + (name "emacs-magit-annex")
> + (version "1.7.1")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/magit/magit-annex.git")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "07r0d2i1hws63wfv1jys63r3lmrl4ywwi76gi7srwhzhqdr1af0n"))))
> + (build-system emacs-build-system)
> + (propagated-inputs
> + `(("emacs-magit" ,emacs-magit)
> + ("emacs-magit-popup" ,emacs-magit-popup)
> + ("transient" ,emacs-transient)))

It looks like emacs-magit uses a revision that follows the popup to
transient switch that happened after the 2.90.1 release. Magit-annex's
master branch has been updated to work with transient and will be
released along with the next release of Magit.

So, perhaps it'd make sense to drop the emacs-magit-popup input and use
an unreleased revision here until the next release of Magit and
Magit-annex.

Thanks for packaging Magit-annex!
Christopher Lemmer Webber wrote 5 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 40417@debbugs.gnu.org)
874ktyc4ma.fsf@dustycloud.org
Kyle Meyer writes:

Toggle quote (26 lines)
> Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
>
>> +(define-public emacs-magit-annex
>> + (package
>> + (name "emacs-magit-annex")
>> + (version "1.7.1")
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/magit/magit-annex.git")
>> + (commit (string-append "v" version))))
>> + (file-name (git-file-name name version))
>> + (sha256
>> + (base32
>> + "07r0d2i1hws63wfv1jys63r3lmrl4ywwi76gi7srwhzhqdr1af0n"))))
>> + (build-system emacs-build-system)
>> + (propagated-inputs
>> + `(("emacs-magit" ,emacs-magit)
>> + ("emacs-magit-popup" ,emacs-magit-popup)
>> + ("transient" ,emacs-transient)))
>
> It looks like emacs-magit uses a revision that follows the popup to
> transient switch that happened after the 2.90.1 release. Magit-annex's
> master branch has been updated to work with transient and will be
> released along with the next release of Magit.

That may explain why I had to manually insert the @ keybinding it
supposedly should have done automatically.

I'm a little confused since I haven't been following magit though.
"popup to transient switch"?

Toggle quote (4 lines)
> So, perhaps it'd make sense to drop the emacs-magit-popup input and use
> an unreleased revision here until the next release of Magit and
> Magit-annex.

I think once I am unconfused I can probably do this. :)

Toggle quote (1 lines)
> Thanks for packaging Magit-annex!
Kyle Meyer wrote 5 years ago
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 40417@debbugs.gnu.org)
87369h3o7f.fsf@kyleam.com
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

Toggle quote (10 lines)
> Kyle Meyer writes:

>> It looks like emacs-magit uses a revision that follows the popup to
>> transient switch that happened after the 2.90.1 release. Magit-annex's
>> master branch has been updated to work with transient and will be
>> released along with the next release of Magit.
>
> That may explain why I had to manually insert the @ keybinding it
> supposedly should have done automatically.

Correct.

Toggle quote (3 lines)
> I'm a little confused since I haven't been following magit though.
> "popup to transient switch"?

Sorry, here's more context: Magit's popup interface used to be defined
with Magit-Popup. Jonas Bernoulli wrote Transient to replace
Magit-Popup [^1]. As of 1ed3febf (Merge branch 'transient' [#3728],
2019-02-14), all of Magit's popups have been rewritten with Transient.
That change hasn't made it into a release yet, but it happened before
the revision that emacs-magit is built from.

Christopher Lemmer Webber wrote 5 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 40417@debbugs.gnu.org)
87mu6wbv6w.fsf@dustycloud.org
Kyle Meyer writes:

Toggle quote (26 lines)
> Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
>
>> Kyle Meyer writes:
>
>>> It looks like emacs-magit uses a revision that follows the popup to
>>> transient switch that happened after the 2.90.1 release. Magit-annex's
>>> master branch has been updated to work with transient and will be
>>> released along with the next release of Magit.
>>
>> That may explain why I had to manually insert the @ keybinding it
>> supposedly should have done automatically.
>
> Correct.
>
>> I'm a little confused since I haven't been following magit though.
>> "popup to transient switch"?
>
> Sorry, here's more context: Magit's popup interface used to be defined
> with Magit-Popup. Jonas Bernoulli wrote Transient to replace
> Magit-Popup [^1]. As of 1ed3febf (Merge branch 'transient' [#3728],
> 2019-02-14), all of Magit's popups have been rewritten with Transient.
> That change hasn't made it into a release yet, but it happened before
> the revision that emacs-magit is built from.
>
> [^1]: https://emacsair.me/2019/02/14/transient-0.1/

Ok, revised patch. It works fine, though I am getting these errors:

Compiling /gnu/store/3lc8vna2n2nhcdkfiqldg426ngjmzjnm-emacs-magit-annex-1.7.1-1.0bc9673/share/emacs/site-lisp/magit-annex-autoloads.el...

In toplevel form:
magit-annex-autoloads.el:10:45:Warning: reference to free variable
‘magit-mode-map’
In end of data:
magit-annex-autoloads.el:60:1:Warning: the function ‘transient-append-suffix’
is not known to be defined.
Compiling /gnu/store/3lc8vna2n2nhcdkfiqldg426ngjmzjnm-emacs-magit-annex-1.7.1-1.0bc9673/share/emacs/site-lisp/magit-annex.el...
Loading /gnu/store/h9ihmqaf15vw70p6hxfqb4s48wwl5cn1-emacs-magit-2.90.1-3.c761d28/share/emacs/site-lisp/magit-version.el (source)...
In end of data:
magit-annex.el:834:1:Warning: the function ‘magit-log-setup-buffer’ is not
known to be defined.
Done (Total of 2 files compiled)

That seems strange/alarming.

Nonetheless, it seems to work fine... so not sure why we're getting that
error then.

One more question... emacs-xyz.scm seems inconsistent. We have both of
these input styles:

(propagated-inputs
`(("magit" ,emacs-magit)
("transient" ,emacs-transient)))

(propagated-inputs
`(("emacs-magit" ,emacs-magit)
("emacs-transient" ,emacs-transient)))

The latter is more common amongst the rest of Guix... anyone have a
guess as to why we've got this variant of package input styles across
Guix's Emacs packages tho?
From 82f83b5ca6d955130f6e4a3324d54229d225556b Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Thu, 2 Apr 2020 15:03:27 -0400
Subject: [PATCH] gnu: Add emacs-magit-annex.

* gnu/packages/emacs-xyz.scm (emacs-magit-annex): New variable.
---
gnu/packages/emacs-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a0275cbe18..c56766047d 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -475,6 +475,31 @@ these arguments. The prototypical use is for the command to call an external
process, passing on the arguments as command line arguments.")
(license license:gpl3+)))
+(define-public emacs-magit-annex
+ (let ((commit "0bc96737634e78ac7c7f8a3f73190531c0890914")
+ (revision "1"))
+ (package
+ (name "emacs-magit-annex")
+ (version (git-version "1.7.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/magit/magit-annex.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1lm8412n2046fz8n7rfbadyww2074lsxq0w4gm1x1alraz5im5h4"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("magit" ,emacs-magit)
+ ("transient" ,emacs-transient)))
+ (home-page "https://github.com/magit/magit-annex/")
+ (synopsis "Git-annex support for Magit")
+ (description
+ "Magit-annex adds a few git-annex operations to the Magit interface.")
+ (license license:gpl3+))))
+
(define-public emacs-minions
(package
(name "emacs-minions")
--
2.26.0
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEUQqGKOKndniPjHCcS8Alkl/49NMFAl6nLlcACgkQS8Alkl/4
9NNFTA//Q9Hwa684lKxyFishf9UmB5APhTMstkzBaZe9xWt6Yr2WP6+MVfMOI2xW
+YbtAibTRJv9Ag8hk8FPNRKqvfbnKQiiNrXC/5/1RumJyrbLjwAXLEtMxWwL68PY
45RLFz1T7lpsEOOWb/Yfers/2gQuSJjiopw7t+nkvgK9RgsO4tlQ0Jxo93sZFynG
1b56IGTG+abcvicwaPLXYpaCX5tbiVRyY8VbbTVVtyYD2XLKI42nEk0wYR7qejyn
Xj+4Bk2V6ImF1c3GlljDdefUze7czltf8HYKxCaFtcBKzmGEiNSwPGnC+dpkpJ+B
DifDlnqx8eNCyFbE9jyi5tlUnONsZWF7jewV0b27zzF48SXc4Ns4tHG5pgVdFk9v
Npwdo0tuMONWa6zGaAOdnT0nRLcfOWNc8iVNfDppMPoXLp7og8c9x1FfzpQbTpKJ
9hOyLx8q5U2UkpV7hXW2LYGqSezk2UHAlYZtauH16hukBt7uHmeInFoRcQUWmx3X
PRquyyV574VP+QGITHXWOmvlmq70SLnk2ZH6i0wx7Au0fln9fHxNm1Kb6a8veurP
VgYxOykdS3NB9OdaVJ6vGlwfxbjH9qMt8svM9MdC5JcpF3bSeAfp77ddnIEZ73KV
V1fqr/OGTIR2/C1QqXrjDqCiYwbdzo/L1RlP1N156Swke+nnX5c=
=RSOj
-----END PGP SIGNATURE-----

Kyle Meyer wrote 5 years ago
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 40417@debbugs.gnu.org)
87wo60v425.fsf@kyleam.com
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

Toggle quote (12 lines)
> Ok, revised patch. It works fine, though I am getting these errors:
>
> Compiling /gnu/store/3lc8vna2n2nhcdkfiqldg426ngjmzjnm-emacs-magit-annex-1.7.1-1.0bc9673/share/emacs/site-lisp/magit-annex-autoloads.el...
>
> In toplevel form:
> magit-annex-autoloads.el:10:45:Warning: reference to free variable
> ‘magit-mode-map’
>
> In end of data:
> magit-annex-autoloads.el:60:1:Warning: the function ‘transient-append-suffix’
> is not known to be defined.

Hmm, I'm not sure about these. I thought generated -autoloads.el files
typically have a "no-byte-compile: t" in their ";; Local Variables: "
trailer. Anyway, despite being unsightly, functionally these are fine;
those expressions are within an (eval-after-load 'magit ...), and the
referenced items will be loaded with magit.el.

Toggle quote (7 lines)
> In end of data:
> magit-annex.el:834:1:Warning: the function ‘magit-log-setup-buffer’ is not
> known to be defined.
> Done (Total of 2 files compiled)
>
> That seems strange/alarming.

This one points to a real problem, though you'd only see it when calling
the command magit-annex-unused-log. Magit renamed magit-git-log to
magit-log-setup-buffer. Magit-annex's master tracks Magit's, so it uses
the new name, but the former is what is in the commit that Guix's Magit
is built from. I've pushed a compatibility kludge to Magit-annex so
that it will fall back to the old name.

Could you squash this commit into your commit?

Toggle diff (22 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index c56766047d..b4c12f57ea 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -476,7 +476,7 @@ (define-public emacs-magit-popup
(license license:gpl3+)))
(define-public emacs-magit-annex
- (let ((commit "0bc96737634e78ac7c7f8a3f73190531c0890914")
+ (let ((commit "ef5dce6267e9118a5eca82a22bcad0b67826c23a")
(revision "1"))
(package
(name "emacs-magit-annex")
@@ -489,7 +489,7 @@ (define-public emacs-magit-annex
(file-name (git-file-name name version))
(sha256
(base32
- "1lm8412n2046fz8n7rfbadyww2074lsxq0w4gm1x1alraz5im5h4"))))
+ "0vzkydgl889cq173zjl89g2vrddb9abc4a8gljiz3b4a7n5b1nrd"))))
(build-system emacs-build-system)
(propagated-inputs
`(("magit" ,emacs-magit)
Christopher Lemmer Webber wrote 5 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 40417@debbugs.gnu.org)
87mu6vu1bn.fsf@dustycloud.org
Kyle Meyer writes:

Toggle quote (32 lines)
> This one points to a real problem, though you'd only see it when calling
> the command magit-annex-unused-log. Magit renamed magit-git-log to
> magit-log-setup-buffer. Magit-annex's master tracks Magit's, so it uses
> the new name, but the former is what is in the commit that Guix's Magit
> is built from. I've pushed a compatibility kludge to Magit-annex so
> that it will fall back to the old name.
>
> Could you squash this commit into your commit?
>
> diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
> index c56766047d..b4c12f57ea 100644
> --- a/gnu/packages/emacs-xyz.scm
> +++ b/gnu/packages/emacs-xyz.scm
> @@ -476,7 +476,7 @@ (define-public emacs-magit-popup
> (license license:gpl3+)))
>
> (define-public emacs-magit-annex
> - (let ((commit "0bc96737634e78ac7c7f8a3f73190531c0890914")
> + (let ((commit "ef5dce6267e9118a5eca82a22bcad0b67826c23a")
> (revision "1"))
> (package
> (name "emacs-magit-annex")
> @@ -489,7 +489,7 @@ (define-public emacs-magit-annex
> (file-name (git-file-name name version))
> (sha256
> (base32
> - "1lm8412n2046fz8n7rfbadyww2074lsxq0w4gm1x1alraz5im5h4"))))
> + "0vzkydgl889cq173zjl89g2vrddb9abc4a8gljiz3b4a7n5b1nrd"))))
> (build-system emacs-build-system)
> (propagated-inputs
> `(("magit" ,emacs-magit)

Done. The messages are gone, yay!

Is it good to push now then, I'd assume?

- Chris

PS: I didn't realize you were a (the?) developer of the package I'm
submitting to Guix, and doing the review! That's wonderful!
From 0e7c9c1236a60dbe96c7a9bc19c9e1cf2ba342e7 Mon Sep 17 00:00:00 2001
From: Christopher Lemmer Webber <cwebber@dustycloud.org>
Date: Thu, 2 Apr 2020 15:03:27 -0400
Subject: [PATCH] gnu: Add emacs-magit-annex.

* gnu/packages/emacs-xyz.scm (emacs-magit-annex): New variable.
---
gnu/packages/emacs-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a0275cbe18..b4c12f57ea 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -475,6 +475,31 @@ these arguments. The prototypical use is for the command to call an external
process, passing on the arguments as command line arguments.")
(license license:gpl3+)))
+(define-public emacs-magit-annex
+ (let ((commit "ef5dce6267e9118a5eca82a22bcad0b67826c23a")
+ (revision "1"))
+ (package
+ (name "emacs-magit-annex")
+ (version (git-version "1.7.1" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/magit/magit-annex.git")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vzkydgl889cq173zjl89g2vrddb9abc4a8gljiz3b4a7n5b1nrd"))))
+ (build-system emacs-build-system)
+ (propagated-inputs
+ `(("magit" ,emacs-magit)
+ ("transient" ,emacs-transient)))
+ (home-page "https://github.com/magit/magit-annex/")
+ (synopsis "Git-annex support for Magit")
+ (description
+ "Magit-annex adds a few git-annex operations to the Magit interface.")
+ (license license:gpl3+))))
+
(define-public emacs-minions
(package
(name "emacs-minions")
--
2.26.0
Kyle Meyer wrote 5 years ago
(name . Christopher Lemmer Webber)(address . cwebber@dustycloud.org)(address . 40417@debbugs.gnu.org)
87pnbrvf9j.fsf@kyleam.com
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

Toggle quote (2 lines)
> Is it good to push now then, I'd assume?

Thanks for the update. All good from my point of view.

Toggle quote (3 lines)
> PS: I didn't realize you were a (the?) developer of the package I'm
> submitting to Guix, and doing the review! That's wonderful!

:>
Christopher Lemmer Webber wrote 5 years ago
(name . Kyle Meyer)(address . kyle@kyleam.com)(address . 40417-done@debbugs.gnu.org)
87lfmftvvo.fsf@dustycloud.org
Kyle Meyer writes:

Toggle quote (6 lines)
> Christopher Lemmer Webber <cwebber@dustycloud.org> writes:
>
>> Is it good to push now then, I'd assume?
>
> Thanks for the update. All good from my point of view.

Yay, it's in!

Toggle quote (5 lines)
>> PS: I didn't realize you were a (the?) developer of the package I'm
>> submitting to Guix, and doing the review! That's wonderful!
>
> :>

:> :D
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 40417
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
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help