Subject: [PATCH v1] gnu: Add emacs-boxy

From: Amy Pillow <[email-masked]>
Date: Sun, 30 Mar 2025 14:20:59 +0200

* gnu/packages/emacs-xyz.scm (emacs-boxy): New variable.
---
Hi, sorry, I changed my email address, but I do have a few questions
about this contribution:

> Hi Amy,
>
> Amy Grinn <[email-masked]> writes:
>
>> Hello,
>>
>> I would like to add my package, emacs-boxy, to Guix.
>>
>> This is my first patch to Guix so let me know if I did anything 
>> wrong!
>
> Thank you for contributing to Guix!  Please see 
> (guix)Contributing[1] for info about sending patches.  The Guix 
> tooling expects patches to be submitted with `git send-email', and 
> not mailed as an attachment.
>

I was going off of these instructions:

https://guix.gnu.org/manual/en/html_node/Sending-a-Patch-Series.html

which state that "Sending patches as email attachments may make them
difficult to review in some mail clients, and git diff does not store
commit metadata."

I'm not sure how many email clients still have trouble viewing
attachments in emails, but you seemed to have no problem, so I'm curious
if maybe the instructions should be updated to explicitly state which
patch formats are allowed and maybe give a different justification for
it.

I tried my best here to stick to the git send-email format, let me know
if this is acceptable.

> Other comments below.
>
>>>>From b3223cec32425d6b8cf2c11545ed63ad6dabae88 Mon Sep 17 
>>>00:00:00 2001
>> From: Amy Grinn <[email-masked]>
>> Date: Tue, 25 Mar 2025 18:17:25 +0100
>> Subject: [PATCH] gnu: Add emacs-boxy
>>
>> * gnu/packages/emacs-xyz.scm (emacs-boxy): New variable.
>> ---
>>  gnu/packages/emacs-xyz.scm | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/gnu/packages/emacs-xyz.scm 
>> b/gnu/packages/emacs-xyz.scm
>> index f00c5e4b29..0423858b2f 100644
>> --- a/gnu/packages/emacs-xyz.scm
>> +++ b/gnu/packages/emacs-xyz.scm
>> @@ -39025,6 +39025,21 @@ (define-public emacs-boxquote
>>  example code.")
>>      (license license:gpl3+)))
>>  
>> +(define-public emacs-boxy
>> +  (package
>> +    (name "emacs-boxy")
>> +    (version "2.0.0")
>> +    (source (origin
>> +           (method url-fetch)
>> +           (uri (string-append 
>> "https://elpa.gnu.org/packages/boxy-"
>> +                                  version ".tar"))
>
> Please prefer the upstream Git repo over M/ELPA.
>

The upstream repo is not at a stable location, I've changed it once or
twice already and I'm planning to do so again soon. Is it acceptable to
use GNU ELPA? I see that other packages in emacs-xyz.scm are doing the
same thing.

>> +           (sha256 (base64 
>> "6w1QtINpWz9voCrc/ne6q8sPj4UcA3s8E/f/Pebjz+0="))))
>> +    (build-system emacs-build-system)
>> +    (home-page "https://gitlab.com/grinn.amy/boxy")
>> +    (synopsis "A boxy layout framework")
>> +    (description "Boxy provides an interface to create a 3D 
>> representation of boxes.")
>
> "Boxy" should probably reference the package name 
> (@code{emacs-boxy}), "This package," or similar.  It would also be 
> nice to have a bit more info about what the package is used for.
>

Sure, I can do that.

> I also noticed a couple issues with the package itself which ought 
> to be corrected:
>
> - Your `defcustom' and `defface' forms don’t have `:group boxy', 
>   so won’t appear if you `M-x customize-group RET boxy RET'.

I think it's a little rude to point out a bug without actually checking
if it exists. `M-x customize-group RET boxy RET' works fine. The
`:group' option is unnecessary when you evaluate it after a `defgroup'.

> - Several macros from `cl-macs' are used, but `cl-macs' isn’t 
>   required.  ex. `cl-defstruct', `cl-flet*', possibly others. 
>   `cl-lib' might also require `cl-macs', but you should always 
>   require your direct dependencies instead of relying on 
>   transitive ones.

cl-macs is part of the cl-lib package. You can see more info about how
to use Common Lisp in Emacs here:

https://www.gnu.org/software/emacs/manual/html_mono/cl.html

> - You may want to condsider using symbols or keywords for 
>   `boxy-relationships' instead of strings.
>

Haha yes, maybe, it's far too late to change that now though. Maybe in
version 3.

> Thanks,
>
>   -- Ian
>
> [1]: 
> https://guix.gnu.org/manual/devel/en/html_node/Sending-a-Patch-Series.html#Single-Patches-1
>

I appreciate all of your thoughts, please let me know if you need
anything else!

Best,

Amy

 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 b5dc07acbb..8db221affb 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -156,6 +156,7 @@
 ;;; Copyright © 2025 Skylar Hill <[email-masked]>
 ;;; Copyright © 2025 Cayetano Santos <[email-masked]>
 ;;; Copyright © 2025 Lee Thompson <[email-masked]>
+;;; Copyright @ 2025 Amy Pillow <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39170,6 +39171,23 @@ (define-public emacs-boxquote
 example code.")
     (license license:gpl3+)))
 
+(define-public emacs-boxy
+  (package
+    (name "emacs-boxy")
+    (version "2.0.0")
+    (source (origin
+	      (method url-fetch)
+	      (uri (string-append "https://elpa.gnu.org/packages/boxy-"
+                                  version ".tar"))
+	      (sha256 (base64 "6w1QtINpWz9voCrc/ne6q8sPj4UcA3s8E/f/Pebjz+0="))))
+    (build-system emacs-build-system)
+    (home-page "https://gitlab.com/grinn.amy/boxy")
+    (synopsis "A boxy layout framework")
+    (description "@code{boxy} provides an interface to create a 3D
+representation of boxes. Other packages can use this library to create
+expandable menus for interacting with hierarchical data.")
+    (license license:gpl3+)))
+
 (define-public emacs-buffer-env
   (package
     (name "emacs-buffer-env")

base-commit: 2ed28b5c24c599b2f9bc60dfc93151cf489ca477
-- 
2.34.1