unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
@ 2020-11-10 15:45 Andrew Tropin
  2020-11-10 16:15 ` Andrew Tropin
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Andrew Tropin @ 2020-11-10 15:45 UTC (permalink / raw)
  To: 44555

use-package version 2.4 doesn't work with emacs-next (28), but there is no
other new tags in upstream repository. The last one is 2.4 and it was created
in Nov 2018. Other GNU/Linux distros uses more recent, but untagged
revision. This commit does the same.

Additionally, it removes diminish from propagated-inputs because this dependency
is optional. The only required dependencies are emacs and bind-key.
---
 gnu/packages/emacs-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ff546506e9..3fe14a210a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -11172,6 +11172,24 @@ configuration in your @file{.emacs} file in a
way that is both
 performance-oriented and tidy.")
     (license license:gpl2+)))

+(define-public emacs-next-use-package
+  (let ((commit "4fb1f9a68f1e7e7d614652afc017a6652fd029f1")
+ (revision "20200721"))
+    (package/inherit emacs-use-package
+      (name "emacs-next-use-package")
+      (version (git-version "2.4" revision commit))
+      (source
+       (origin
+ (method git-fetch)
+ (uri (git-reference
+        (url "https://github.com/jwiegley/use-package")
+        (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+          (base32
+           "073sm0mbxcjysap2bjzf1cl0134jy8a0xig7ywmmd0bm2y8qzfip"))))
+      (propagated-inputs '()))))
+
 (define-public emacs-leaf
   (package
     (name "emacs-leaf")
-- 
2.25.4


-- 
Best regards,
Andrew Tropin




^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 15:45 [bug#44555] [PATCH] gnu: Add emacs-next-use-package Andrew Tropin
@ 2020-11-10 16:15 ` Andrew Tropin
  2020-11-10 17:16 ` zimoun
  2020-11-10 18:00 ` Leo Prikler
  2 siblings, 0 replies; 13+ messages in thread
From: Andrew Tropin @ 2020-11-10 16:15 UTC (permalink / raw)
  To: 44555

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

The email client breaks indentation, will try to attach the patch to
this message.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: 0001-gnu-Add-emacs-next-use-package.patch --]
[-- Type: text/x-patch, Size: 1494 bytes --]

use-package version 2.4 doesn't work with emacs-next (28), but there is no
other new tags in upstream repository. The last one is 2.4 and it was created
in Nov 2018. Other GNU/Linux distros uses more recent, but untagged
revision. This commit does the same.

Additionaly it removes diminish from propagated-inputs because this dependency
is optional. The only required dependencies are emacs and bind-key.
---
 gnu/packages/emacs-xyz.scm | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index ff546506e9..3fe14a210a 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -11172,6 +11172,24 @@ configuration in your @file{.emacs} file in a way that is both
 performance-oriented and tidy.")
     (license license:gpl2+)))

+(define-public emacs-next-use-package
+  (let ((commit "4fb1f9a68f1e7e7d614652afc017a6652fd029f1")
+	(revision "20200721"))
+    (package/inherit emacs-use-package
+      (name "emacs-next-use-package")
+      (version (git-version "2.4" revision commit))
+      (source
+       (origin
+	 (method git-fetch)
+	 (uri (git-reference
+	       (url "https://github.com/jwiegley/use-package")
+	       (commit commit)))
+	 (file-name (git-file-name name version))
+	 (sha256
+          (base32
+           "073sm0mbxcjysap2bjzf1cl0134jy8a0xig7ywmmd0bm2y8qzfip"))))
+      (propagated-inputs '()))))
+
 (define-public emacs-leaf
   (package
     (name "emacs-leaf")
--
2.25.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 15:45 [bug#44555] [PATCH] gnu: Add emacs-next-use-package Andrew Tropin
  2020-11-10 16:15 ` Andrew Tropin
@ 2020-11-10 17:16 ` zimoun
  2020-11-10 17:56   ` Andrew Tropin
  2020-11-10 19:22   ` Michael Rohleder
  2020-11-10 18:00 ` Leo Prikler
  2 siblings, 2 replies; 13+ messages in thread
From: zimoun @ 2020-11-10 17:16 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 44555

Dear,

On Tue, 10 Nov 2020 at 17:13, Andrew Tropin <andrew@trop.in> wrote:

> +(define-public emacs-next-use-package
> +  (let ((commit "4fb1f9a68f1e7e7d614652afc017a6652fd029f1")
> + (revision "20200721"))
> +    (package/inherit emacs-use-package
> +      (name "emacs-next-use-package")
> +      (version (git-version "2.4" revision commit))
> +      (source
> +       (origin
> + (method git-fetch)
> + (uri (git-reference
> +        (url "https://github.com/jwiegley/use-package")
> +        (commit commit)))
> + (file-name (git-file-name name version))
> + (sha256
> +          (base32
> +           "073sm0mbxcjysap2bjzf1cl0134jy8a0xig7ywmmd0bm2y8qzfip"))))
> +      (propagated-inputs '()))))
> +

Maybe I am missing something, but it is not built using 'emacs-next'.
Why not simply update the package 'emacs-use-package' with a comment
explaining what you already explained?


All the best,
simon




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 17:16 ` zimoun
@ 2020-11-10 17:56   ` Andrew Tropin
  2020-11-10 19:22   ` Michael Rohleder
  1 sibling, 0 replies; 13+ messages in thread
From: Andrew Tropin @ 2020-11-10 17:56 UTC (permalink / raw)
  To: zimoun; +Cc: 44555

> Maybe I am missing something, but it is not built using 'emacs-next'.
> Why not simply update the package 'emacs-use-package' with a comment
> explaining what you already explained?

It's true, it's built with emacs-minimal and probably the name is
a little confusing in that sense.

The original idea was to just update current emacs-use-package,
but during discussion in #guix leoprikler mentioned that
emacs-use-package works fine for users of Emacs 27 and because
the revision I picked is not a stable tag, but just a fresh
commit of use-package and I do it to make people able to use it
from Emacs 28 it would be logical to create a separate package
and keep stable 2.4 version for other users.

Also, removing diminish from propagated inputs can break
someone's setup.

My original patch was: http://ix.io/2DDt

I think it should be safe to just update emacs-use-package to the
more recent revision. It will work for both 27 and 28 users.

Let me know what you think and what you advise to do next.

-- 
Best regards,
Andrew Tropin




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 15:45 [bug#44555] [PATCH] gnu: Add emacs-next-use-package Andrew Tropin
  2020-11-10 16:15 ` Andrew Tropin
  2020-11-10 17:16 ` zimoun
@ 2020-11-10 18:00 ` Leo Prikler
  2020-11-11 22:42   ` zimoun
  2 siblings, 1 reply; 13+ messages in thread
From: Leo Prikler @ 2020-11-10 18:00 UTC (permalink / raw)
  To: zimon.toutoune; +Cc: 44555

Hello zimoun,

it was me, who suggested (in IRC) to keep two different packages, as it
appeared to me to be a non-trivial transaction (given the changes to
propagated-inputs) with the intent to make things run on Emacs 28.  I
did try to point out, that it can/should be built with Emacs 28, but
there appears to have been some miscommunication.

Regards,
Leo





^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 17:16 ` zimoun
  2020-11-10 17:56   ` Andrew Tropin
@ 2020-11-10 19:22   ` Michael Rohleder
  2020-11-10 19:36     ` Andrew Tropin
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Rohleder @ 2020-11-10 19:22 UTC (permalink / raw)
  To: zimoun; +Cc: 44555, Andrew Tropin

[-- Attachment #1: Type: text/plain, Size: 798 bytes --]

zimoun <zimon.toutoune@gmail.com> writes:
> Maybe I am missing something, but it is not built using 'emacs-next'.
> Why not simply update the package 'emacs-use-package' with a comment
> explaining what you already explained?

If this package doesn't work with emacs28 as it is, I also think
it is good/ok to bump it to a non release commit.

But why also remove propagated-inputs (diminish)?
I use diminish with emacs28 w/o trouble.
diminish is a very small and clean package/sources (and very funny to
read, *love it*).
Maybe we need to debug this better/harder to find the (real) issue?

Andrew, do you have any error message/debug output for the combination
use-package/diminish with emacs28?


-- 
Hard work never killed anybody, but why take a chance?
		Charlie McCarthy

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 19:22   ` Michael Rohleder
@ 2020-11-10 19:36     ` Andrew Tropin
  2020-11-10 20:32       ` Michael Rohleder
  0 siblings, 1 reply; 13+ messages in thread
From: Andrew Tropin @ 2020-11-10 19:36 UTC (permalink / raw)
  To: Michael Rohleder; +Cc: 44555, zimoun

> But why also remove propagated-inputs (diminish)?
> I use diminish with emacs28 w/o trouble.
> diminish is a very small and clean package/sources (and very funny to
> read, *love it*).

There is no issue with diminish itself. I just don't know why it
is specified as propagated-input. It's an optional dependency as
well as delight, key-chord and many other use-package extensions
and it should be installed explicitly by the user, not pulled as a
dependency.

Probably I had to do it with another patch to make it clearer.


-- 
Best regards,
Andrew Tropin




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 19:36     ` Andrew Tropin
@ 2020-11-10 20:32       ` Michael Rohleder
  2020-11-11  7:53         ` Andrew Tropin
  0 siblings, 1 reply; 13+ messages in thread
From: Michael Rohleder @ 2020-11-10 20:32 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 44555

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Andrew Tropin <andrew@trop.in> writes:
> There is no issue with diminish itself. I just don't know why it
> is specified as propagated-input. It's an optional dependency as
> well as delight, key-chord and many other use-package extensions
> and it should be installed explicitly by the user, not pulled as a
> dependency.
>
> Probably I had to do it with another patch to make it clearer.

Normally, we try to install optional packages per default.
Sometimes, it's not so easy and one has to weigh up...

Maybe the use-case for use-package is so that diminish is very often
needed?  Or for too many users, it would be "useless" (or break
something), w/o it?


Imho (I don't have commit superpower), you need a reason to remove an
input (and here, this means provided/out of the box experience).  Or at
least make a comment in the source _why_ it isn't needed etc...


-- 
If you can't make it good, make it LOOK good. - Bill Gates

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 20:32       ` Michael Rohleder
@ 2020-11-11  7:53         ` Andrew Tropin
  2020-11-11  9:35           ` Nicolas Goaziou
  2020-11-11 10:02           ` bug#44555: " Nicolas Goaziou
  0 siblings, 2 replies; 13+ messages in thread
From: Andrew Tropin @ 2020-11-11  7:53 UTC (permalink / raw)
  To: Michael Rohleder; +Cc: 44555

[-- Attachment #1: Type: text/plain, Size: 1521 bytes --]

Cool news: John Wiegley made a new release a few hours ago, my patch is no
longer relevant, will make another one, which just bumps the version to
2.4.1.

> Normally, we try to install optional packages per default.
> Sometimes, it's not so easy and one has to weigh up...
>
> Maybe the use-case for use-package is so that diminish is very often
> needed?  Or for too many users, it would be "useless" (or break
> something), w/o it?
>
>
> Imho (I don't have commit superpower), you need a reason to remove an
> input (and here, this means provided/out of the box experience).  Or at
> least make a comment in the source _why_ it isn't needed etc...

I will give you a simple example: Someone uses delight (a diminish
alternative, which also support major modes) instead of diminish and
they would install emacs-use-package and emacs-delight, but he will also
get emacs-diminsh as a dependency of emacs-use-package. To remove it
they will need to inherit emacs-use-package and update
propagated-inputs.

I think installing emacs-use-package and manually adding emacs-diminish
is easier and more fair than installing emacs-use-package+emacs-delight
and removing emacs-diminish from dependencies of emacs-use-package.

I totally agree, that diminish is a great package with a great story
inside its sources, but don't think it should be installed by default
with use-package.

I'll make a separate patch for removing propagated-inputs and related
discussion.

Bump patch in the attachment.

-- 
Best regards,
Andrew Tropin

[-- Attachment #2: 0001-gnu-emacs-use-package-Update-to-2.4.1.patch --]
[-- Type: text/x-patch, Size: 1351 bytes --]

From 7f725f6c1b8a0e724002ac67c5e26a8df747ad6b Mon Sep 17 00:00:00 2001
From: Andrew Tropin <andrew@trop.in>
Date: Wed, 11 Nov 2020 10:48:30 +0300
Subject: [PATCH] gnu: emacs-use-package: Update to 2.4.1

use-package 2.4 released 2 years ago and doesn't work with GNU Emacs 28.
2.4.1 contains mostly bug fixes and works with emacs-next.
---
 gnu/packages/emacs-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index d27d397775..b8ab78edf8 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -11131,7 +11131,7 @@ abbreviation of the mode line displays (lighters) of minor modes.")
 (define-public emacs-use-package
   (package
     (name "emacs-use-package")
-    (version "2.4")
+    (version "2.4.1")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -11140,7 +11140,7 @@ abbreviation of the mode line displays (lighters) of minor modes.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1b7mjjh0d6fmkkd9vyj64vca27xqhga0nvyrrcqxpqjn62zq046y"))))
+                "088kl3bml0rs5bkfymgzr15ram9qvy66h1kaisrbkynh0yxvf8g9"))))
     (build-system emacs-build-system)
     (native-inputs
      `(("texinfo" ,texinfo)))
-- 
2.25.4


^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-11  7:53         ` Andrew Tropin
@ 2020-11-11  9:35           ` Nicolas Goaziou
  2020-11-11 10:02           ` bug#44555: " Nicolas Goaziou
  1 sibling, 0 replies; 13+ messages in thread
From: Nicolas Goaziou @ 2020-11-11  9:35 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 44555, Michael Rohleder

Hello,

Andrew Tropin <andrew@trop.in> writes:

> I will give you a simple example: Someone uses delight (a diminish
> alternative, which also support major modes) instead of diminish and
> they would install emacs-use-package and emacs-delight, but he will also
> get emacs-diminsh as a dependency of emacs-use-package. To remove it
> they will need to inherit emacs-use-package and update
> propagated-inputs.

I don't understand something here. Why would you have to remove Diminsh
in order to use Delight? Can't you have both in "site-lisp" and use
whichever you want?

Regards,

-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#44555: [PATCH] gnu: Add emacs-next-use-package
  2020-11-11  7:53         ` Andrew Tropin
  2020-11-11  9:35           ` Nicolas Goaziou
@ 2020-11-11 10:02           ` Nicolas Goaziou
  2020-11-11 14:33             ` [bug#44555] " Andrew Tropin
  1 sibling, 1 reply; 13+ messages in thread
From: Nicolas Goaziou @ 2020-11-11 10:02 UTC (permalink / raw)
  To: Andrew Tropin; +Cc: 44555-done, Michael Rohleder

Hello,

Andrew Tropin <andrew@trop.in> writes:

> Cool news: John Wiegley made a new release a few hours ago, my patch is no
> longer relevant, will make another one, which just bumps the version to
> 2.4.1.

Applied. Thank you.

Regards,
-- 
Nicolas Goaziou




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-11 10:02           ` bug#44555: " Nicolas Goaziou
@ 2020-11-11 14:33             ` Andrew Tropin
  0 siblings, 0 replies; 13+ messages in thread
From: Andrew Tropin @ 2020-11-11 14:33 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: 44555-done, Michael Rohleder

> Applied. Thank you.
Thanks a lot!

Thank you everyone for help!

--
Best regards,
Andrew Tropin




^ permalink raw reply	[flat|nested] 13+ messages in thread

* [bug#44555] [PATCH] gnu: Add emacs-next-use-package
  2020-11-10 18:00 ` Leo Prikler
@ 2020-11-11 22:42   ` zimoun
  0 siblings, 0 replies; 13+ messages in thread
From: zimoun @ 2020-11-11 22:42 UTC (permalink / raw)
  To: Leo Prikler; +Cc: 44555, Andrew Tropin

Dear,

On Tue, 10 Nov 2020 at 19:00, Leo Prikler <leo.prikler@student.tugraz.at> wrote:

> it was me, who suggested (in IRC) to keep two different packages, as it
> appeared to me to be a non-trivial transaction (given the changes to
> propagated-inputs) with the intent to make things run on Emacs 28.  I
> did try to point out, that it can/should be built with Emacs 28, but
> there appears to have been some miscommunication.

Thank you both for the explanations.  Well, the fix has finally been
from upstream, if I read correctly. :-)

However, Guix is still missing a good story to build the Emacs packages
using ’emacs-minimal’ or ’emacs-next’ or any other elisp bytecode
compiler (emacs-guile, REmacs, emacs-gccjit, etc.).


All the best,
simon




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-11-11 22:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10 15:45 [bug#44555] [PATCH] gnu: Add emacs-next-use-package Andrew Tropin
2020-11-10 16:15 ` Andrew Tropin
2020-11-10 17:16 ` zimoun
2020-11-10 17:56   ` Andrew Tropin
2020-11-10 19:22   ` Michael Rohleder
2020-11-10 19:36     ` Andrew Tropin
2020-11-10 20:32       ` Michael Rohleder
2020-11-11  7:53         ` Andrew Tropin
2020-11-11  9:35           ` Nicolas Goaziou
2020-11-11 10:02           ` bug#44555: " Nicolas Goaziou
2020-11-11 14:33             ` [bug#44555] " Andrew Tropin
2020-11-10 18:00 ` Leo Prikler
2020-11-11 22:42   ` zimoun

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).