Subject: Re: [bug#74135] [PATCH 1/2] gnu: Improve emacs-popwin definition.

From: Rostislav Svoboda <[email-masked]>
Date: Fri, 1 Nov 2024 20:40:05 +0100

Hello Nicolas,

>     (arguments
>      (list
>       #:tests? #f ; requires an attached terminal
>       ))
>     (native-inputs
>      (list emacs-ert-runner))
>
> "#:tests? #f" with a reason brings some valuable information. I simply suggest
> to keep that line.

If the default for #:tests? ever flips to #t, an explicit #:tests? #f
if overlooked, would prevent tests from running, even though everyone
might assume they are.

Until such a flip occurs, this snippet simply adds to the list of
native inputs without serving any real purpose, leading to unnecessary
use of electricity and computational resources. If the original author
intended to leave a note for future readers, a comment would be a more
suitable approach.

I'm sending you *two* patches: the first removes this redundancy, and
the second updates the emacs-popwin package.

Cheers,
Bost
From b6aab8d4f274e8b3535b2af5915eadd6371cd137 Mon Sep 17 00:00:00 2001
Message-ID: <b6aab8d4f[email-masked]>
From: Rostislav Svoboda <[email-masked]>
Date: Thu, 31 Oct 2024 14:11:04 +0100
Subject: [PATCH 1/2] gnu: Strip unnecessary clutter from emacs-popwin.

* gnu/packages/emacs-xyz.scm (emacs-popwin): Remove redundant '#:tests? #f'
and unnecessary `emacs-ert-runner` from native inputs.

Change-Id: I684edc52c83221e8fe407d7c1fbc107cb4721da7
---
 gnu/packages/emacs-xyz.scm | 46 ++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 24 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 488b4cb5d7..3f72c1fd18 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -15770,32 +15770,30 @@ (define-public emacs-find-file-in-project
     (license license:gpl3+)))
 
 (define-public emacs-popwin
-  (package
-    (name "emacs-popwin")
-    (version "1.0.2")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/emacsorphanage/popwin")
-             (commit version)))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32 "1x1iimzbwb5izbia6aj6xv49jybzln2qxm5ybcrcq7xync5swiv1"))))
-    (build-system emacs-build-system)
-    (arguments
-     (list
-      #:tests? #f ; requires an attached terminal
-      ))
-    (native-inputs
-     (list emacs-ert-runner))
-    (home-page "https://github.com/emacsorphanage/popwin")
-    (synopsis "Popup window manager for Emacs")
-    (description
-     "This package provides utilities for treating certain windows as @dfn{pop
+  (let ((commit "215d6cb509b11c63394a20666565cd9e9b2c2eab")
+        (revision "1"))
+    (package
+      (name "emacs-popwin")
+      (version (git-version "1.0.2" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/emacsorphanage/popwin")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1x1iimzbwb5izbia6aj6xv49jybzln2qxm5ybcrcq7xync5swiv1"))))
+      (build-system emacs-build-system)
+      ;; Testing this package requires an attached terminal and possibly
+      ;; emacs-ert-runner among its native inputs.
+      (home-page "https://github.com/emacsorphanage/popwin")
+      (synopsis "Popup window manager for Emacs")
+      (description
+       "This package provides utilities for treating certain windows as @dfn{pop
 up windows}, which close automatically when quitting a command or selecting
 another window.")
-    (license license:gpl3+)))
+      (license license:gpl3+))))
 
 (define-public emacs-pyvenv
   (package

base-commit: cd9ac7d96b3634a7e1ec8da988dd3ac2dd186018
-- 
2.46.0

From 2c4cd774261f88f806e7b05faaf8621ca4a9afba Mon Sep 17 00:00:00 2001
Message-ID: <2c4cd7742[email-masked]>
In-Reply-To: <b6aab8d4f[email-masked]>
References: <b6aab8d4f[email-masked]>
From: Rostislav Svoboda <[email-masked]>
Date: Thu, 31 Oct 2024 14:35:39 +0100
Subject: [PATCH 2/2] gnu: Update emacs-popwin to 1.0.2.-2.58adcd0.

* gnu/packages/emacs-xyz.scm (emacs-popwin): Update to 1.0.2.-2.58adcd0.

Change-Id: Ie7ee892b737310a002a6e74bd5138b041eaf30bd
---
 gnu/packages/emacs-xyz.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3f72c1fd18..003ede63bd 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -15770,8 +15770,8 @@ (define-public emacs-find-file-in-project
     (license license:gpl3+)))
 
 (define-public emacs-popwin
-  (let ((commit "215d6cb509b11c63394a20666565cd9e9b2c2eab")
-        (revision "1"))
+  (let ((commit "58adcd0ca7c3dbd58626ec7019252d64cbc73042")
+        (revision "2"))
     (package
       (name "emacs-popwin")
       (version (git-version "1.0.2" revision commit))
@@ -15783,7 +15783,7 @@ (define-public emacs-popwin
                (commit commit)))
          (file-name (git-file-name name version))
          (sha256
-          (base32 "1x1iimzbwb5izbia6aj6xv49jybzln2qxm5ybcrcq7xync5swiv1"))))
+          (base32 "1mqwzc6fwhwq1kl8b3i1hm2ylfh8blrxrw6mzr5wyifbwpg7dq10"))))
       (build-system emacs-build-system)
       ;; Testing this package requires an attached terminal and possibly
       ;; emacs-ert-runner among its native inputs.
-- 
2.46.0