GNU bug report logs - #77185
[PATCH] gnu: Add emacs-bqn-mode

Previous Next

Package: guix-patches;

Reported by: Lee Thompson <lee.p.thomp <at> gmail.com>

Date: Sat, 22 Mar 2025 16:27:02 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 77185 AT debbugs.gnu.org.

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#77185; Package guix-patches. (Sat, 22 Mar 2025 16:27:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lee Thompson <lee.p.thomp <at> gmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 22 Mar 2025 16:27:02 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Lee Thompson <lee.p.thomp <at> gmail.com>
Subject: [PATCH] gnu: Add emacs-bqn-mode
Date: Sat, 22 Mar 2025 16:25:38 +0000
* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): New variable

Change-Id: Ibe9a32c4f8414dbc5d3bb350aa684a8f3e15c567
---
 gnu/packages/emacs-xyz.scm | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f7459c3c32..30d439172f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -487,6 +487,46 @@ (define-public emacs-bookmark-plus
 reading the extensive documentation about BookmarkPlus on the Emacs Wiki.")
     (license license:gpl3+)))
 
+(define-public emacs-bqn-mode
+  ;; Latest tagged version
+  (let ((commit "2024-09-10")
+        (revision "0"))
+    (package
+      (name "emacs-bqn-mode")
+      (version (git-version "0.1.0" revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/museoa/bqn-mode.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0a4whlx8065c15nfyqy8176mwysnc13z4q7mmdfnf6skdnvi2pk6"))))
+      (build-system emacs-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'require-subr-x
+              (lambda _
+                (emacs-batch-edit-file "bqn-mode.el"
+                                       '(progn (goto-char (point-min))
+                                               (re-search-forward
+                                                "(require 'pulse)")
+                                               (forward-line)
+                                               (insert "(require 'subr-x)\n")
+                                               (basic-save-buffer))))))))
+      (propagated-inputs (list emacs-compat))
+      (synopsis "Emacs major mode for the BQN programming language")
+      (description
+       "This package provides a major mode for editing and executing BQN code.
+It can be used to interactively evaluate BQN code in buffer or can be used to
+launch BQN REPL sessions.  For evaluating BQN code or spawning interpreters an
+executable implementation is required such as @code{cbqn} or @code{dbqn}.")
+      (home-page "https://github.com/museoa/bqn-mode")
+      (license license:gpl3))))
+
 (define-public emacs-cfrs
   (package
     (name "emacs-cfrs")
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Sat, 22 Mar 2025 16:37:01 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: 77185 <at> debbugs.gnu.org
Subject: Copyright banner
Date: Sat, 22 Mar 2025 16:36:14 +0000
Hey all reviewing this,

I've only just realised I've forgotten to add my name to the copyright
list at the top of the file (assuming what I've read is correct I can
just bundle it with my patch to add the package right?).

I only read in the manual about adding this in after I sent my last
patch for emacs-parinfer-rust-mode, and I've been kicking myself since
for missing it.  Should I send in a revised patch or is it trivial
enough for a maintainer to take care of before merging the existing
patch in?




Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Sun, 23 Mar 2025 10:51:07 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: Lee Thompson <lee.p.thomp <at> gmail.com>
Cc: lee.p.thomp <at> gmail.com, 77185 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add emacs-bqn-mode
Date: Sun, 23 Mar 2025 11:50:10 +0100
[Message part 1 (text/plain, inline)]
Thanks for the patch ! You may send an updated version, including the
copyright.

A few comments:

- emacs-eros 0.1.0 seems necessary as propagated input (we have
  0.0.1-2.dd89102 in the repos)
- you may drop the .git in url
- why do you need to (require 'subr-x) ? this is not a decision of
  package maintainers ?
- `guix lint emacs-bqn-mode' uses release "2024-09-10" as version, not
  0.1.0, maybe it is better to use it so that `guix refresh' will warn
  about future updates
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Sun, 23 Mar 2025 13:11:04 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add emacs-bqn-mode
Date: Sun, 23 Mar 2025 13:09:58 +0000
Hi,

Thanks for the reply and feedback.  I'll get on with tidying up my
patch, but I think there may have been a misunderstanding:

> - emacs-eros 0.1.0 seems necessary as propagated input (we have
>   0.0.1-2.dd89102 in the repos)
So I decided to work at packaging the '2024-09-10' tag from the upstream
project instead of the latest commit on the trunk or develop branch.
It looks like the commit adding 'Package-Requires: ... (eros "0.1.0")'
came just after the one tagged '2024-09-10', so I didn't think it was
necessary to add it as a propagated input.

As a sidenote I did successfully package it with an updated emacs-eros
before I realised I was on 'trunk' and not a release/tag, so if you
really want I could send in a revised patch with bqn-mode on the latest
commit with an updated eros

> - why do you need to (require 'subr-x) ? this is not a decision of
>   package maintainers ?
Without explicitly requiring it I was unable to run `bqn-comint-bring'
in the mode to open an interpreter.  I eventually tracked this down to
Emacs being totally confused about the macro `thread-last' within
`bqn-comint-bring', which is defined in `subr-x.el' but isn't
autoloaded.  This does give me an idea to open a PR upstream, but that
wouldn't solve it for the 2024-09-10 tag of course.

For a comparable situation have a look at `emacs-tree-inspector', where
something similar is performed.  I thought calling Emacs batch mode to
edit was neater.  I think I should have put in a short comment
explaining, my apologies.

After some searching around it looks to be something to do with the way
Guix's build system byte-compiles the Emacs files —I'm not really sure
to be totally honest.

> - `guix lint emacs-bqn-mode' uses release "2024-09-10" as version, not
>   0.1.0, maybe it is better to use it so that `guix refresh' will warn
>   about future updates
Okay I see what you mean about this, until now I'd been running
`./pre-inst-env guix lint emacs-bqn-mode' within a Guix shell container
which of course hits some issues.  Running it in a plain shell mentions
upgrading to 2024-09-10.

I'd followed some other examples in `emacs-xyz.scm' where it looked like
the tagged name didn't match with the `Version: ' line within the main
Emacs Lisp source.  See 'emacs-everywhere' for an example.  What I
hadn't thought about was that in this case there's a tag to work with
for version.

Before I send in a revised patch, do you mean something like this would
work:
> (define-public emacs-bqn-mode
>   (let ((tag "2024-09-10"))
>     (package
>       (name "emacs-bqn-mode")
>       (version tag)
>       (source
>        (origin
>          (method git-fetch)
>          (uri (git-reference
>                (url "https://github.com/museoa/bqn-mode")
>                (commit tag)))
>          (file-name (git-file-name name version))
>          ...
?

Again appreciate the feedback and advice, looking forward to hearing
back from you soon.




Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Sun, 23 Mar 2025 16:43:01 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: Lee Thompson <lee.p.thomp <at> gmail.com>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add emacs-bqn-mode
Date: Sun, 23 Mar 2025 17:41:56 +0100
[Message part 1 (text/plain, inline)]
>dim. 23 mars 2025 at 13:09, Lee Thompson <lee.p.thomp <at> gmail.com> wrote:

>> - emacs-eros 0.1.0 seems necessary as propagated input (we have
>>   0.0.1-2.dd89102 in the repos)

> So I decided to work at packaging the '2024-09-10' tag from the upstream
> project instead of the latest commit on the trunk or develop branch.
> It looks like the commit adding 'Package-Requires: ... (eros "0.1.0")'
> came just after the one tagged '2024-09-10', so I didn't think it was
> necessary to add it as a propagated input.

You’re right, no need of eros by now.

> As a sidenote I did successfully package it with an updated emacs-eros
> before I realised I was on 'trunk' and not a release/tag, so if you
> really want I could send in a revised patch with bqn-mode on the latest
> commit with an updated eros

Better send a dedicated patch with it, now that you have it. It will be
useful for next update.

>> - why do you need to (require 'subr-x) ? this is not a decision of
>>   package maintainers ?

> Without explicitly requiring it I was unable to run `bqn-comint-bring'
> in the mode to open an interpreter.  I eventually tracked this down to
> Emacs being totally confused about the macro `thread-last' within
> `bqn-comint-bring', which is defined in `subr-x.el' but isn't
> autoloaded.  This does give me an idea to open a PR upstream, but that
> wouldn't solve it for the 2024-09-10 tag of course.

> For a comparable situation have a look at `emacs-tree-inspector', where
> something similar is performed.  I thought calling Emacs batch mode to
> edit was neater.  I think I should have put in a short comment
> explaining, my apologies.

Indeed, a little comment will help to understand future contributors,
they’ll need to remove this line once fixed upstream.

>> - `guix lint emacs-bqn-mode' uses release "2024-09-10" as version, not
>>   0.1.0, maybe it is better to use it so that `guix refresh' will warn
>>   about future updates

> Okay I see what you mean about this, until now I'd been running
> `./pre-inst-env guix lint emacs-bqn-mode' within a Guix shell container
> which of course hits some issues.  Running it in a plain shell mentions
> upgrading to 2024-09-10.

Rather use ‘guix shell -CPW’, as stated in the manual, then "./pre ..."

> I'd followed some other examples in `emacs-xyz.scm' where it looked like
> the tagged name didn't match with the `Version: ' line within the main
> Emacs Lisp source.  See 'emacs-everywhere' for an example.  What I
> hadn't thought about was that in this case there's a tag to work with
> for version.
>
> Before I send in a revised patch, do you mean something like this would
> work:
>> (define-public emacs-bqn-mode
>>   (let ((tag "2024-09-10"))
>>     (package
>>       (name "emacs-bqn-mode")
>>       (version tag)
>>       (source
>>        (origin
>>          (method git-fetch)
>>          (uri (git-reference
>>                (url "https://github.com/museoa/bqn-mode")
>>                (commit tag)))
>>          (file-name (git-file-name name version))
>>          ...

In this case, package seems to use a date tag for releases, so yes, this
is the way I’d proceed.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Sun, 23 Mar 2025 18:02:02 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: 77185 <at> debbugs.gnu.org
Cc: Lee Thompson <lee.p.thomp <at> gmail.com>
Subject: [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Sun, 23 Mar 2025 18:01:14 +0000
* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): New variable.

Change-Id: Ibe9a32c4f8414dbc5d3bb350aa684a8f3e15c567
---
 gnu/packages/emacs-xyz.scm | 47 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f7459c3c32..38c59489e1 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -155,6 +155,7 @@
 ;;; Copyright © 2025 Remco van 't Veer <remco <at> remworks.net>
 ;;; Copyright © 2025 Skylar Hill <stellarskylark <at> posteo.net>
 ;;; Copyright © 2025 Cayetano Santos <csantosb <at> inventati.org>
+;;; Copyright © 2025 Lee Thompson <lee.p.thomp <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -487,6 +488,52 @@ (define-public emacs-bookmark-plus
 reading the extensive documentation about BookmarkPlus on the Emacs Wiki.")
     (license license:gpl3+)))
 
+(define-public emacs-bqn-mode
+  ;; No releases, versions are tagged by date on GitHub
+  (let ((tag "2024-09-10")
+        (revision "0"))
+    (package
+      (name "emacs-bqn-mode")
+      (version tag)
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/museoa/bqn-mode")
+               (commit tag)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0a4whlx8065c15nfyqy8176mwysnc13z4q7mmdfnf6skdnvi2pk6"))))
+      (build-system emacs-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; `bqn-comint-bring' in `bqn-mode.el' uses the macro
+            ;; `thread-last', defined in `subr-x.el' but not autoloaded.
+            ;; `emacs-build-system' will happily byte-compile `bqn-mode.el'
+            ;; but interactively calling `bqn-comint-bring' will cause an
+            ;; error.  An explicit call to `(require 'subr-x)' remedies the
+            ;; issue until it is fixed upstream.
+            (add-after 'unpack 'require-subr-x
+              (lambda _
+                (emacs-batch-edit-file "bqn-mode.el"
+                                       '(progn (goto-char (point-min))
+                                               (re-search-forward
+                                                "(require 'pulse)")
+                                               (forward-line)
+                                               (insert "(require 'subr-x)\n")
+                                               (basic-save-buffer))))))))
+      (propagated-inputs (list emacs-compat))
+      (synopsis "Emacs major mode for the BQN programming language")
+      (description
+       "This package provides a major mode for editing and executing BQN code.
+It can be used to interactively evaluate BQN code in buffer or can be used to
+launch BQN REPL sessions.  For evaluating BQN code or spawning interpreters an
+executable implementation is required such as @code{cbqn} or @code{dbqn}.")
+      (home-page "https://github.com/museoa/bqn-mode")
+      (license license:gpl3))))
+
 (define-public emacs-cfrs
   (package
     (name "emacs-cfrs")
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Sun, 23 Mar 2025 18:05:02 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add emacs-bqn-mode
Date: Sun, 23 Mar 2025 18:04:10 +0000
I think I've adjusted according to everything you've mentioned.  A v2
patch should arrive shortly, I'll get the eros patch tidied up and sent
over also.

Thanks for all the help!




Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Mon, 24 Mar 2025 13:54:01 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: lee.p.thomp <at> gmail.com
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [bug#77185] [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Mon, 24 Mar 2025 14:53:09 +0100
[Message part 1 (text/plain, inline)]
One last thing: could you include the

    (arguments (list #:tests? #f))      ; no tests

to comply with upcoming emacs packaging standard ?

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

Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Mon, 24 Mar 2025 14:34:02 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: 77185 <at> debbugs.gnu.org
Subject: [PATCH v3] gnu: Add emacs-bqn-mode.
Date: Mon, 24 Mar 2025 14:33:28 +0000
[Message part 1 (text/plain, inline)]
* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): New variable.

Change-Id: Ibe9a32c4f8414dbc5d3bb350aa684a8f3e15c567
---
[emacs-bqn-mode.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Mon, 24 Mar 2025 14:37:01 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [bug#77185] [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Mon, 24 Mar 2025 14:35:55 +0000
Okay I've sent over a v3 patch with the `#:tests #f` change.  I'm away
from my main PC at the moment so had to edit the patch with a text
editor and send via Gmail's web interface.  Hopefully all should be
right but let me know if something's gone wrong with it.

On Mon, 24 Mar 2025 at 13:53, Cayetano Santos <csantosb <at> inventati.org> wrote:
>
>
> One last thing: could you include the
>
>     (arguments (list #:tests? #f))      ; no tests
>
> to comply with upcoming emacs packaging standard ?
>
> Thanks !




Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Mon, 24 Mar 2025 14:49:02 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: Lee Thompson <lee.p.thomp <at> gmail.com>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [bug#77185] [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Mon, 24 Mar 2025 15:47:54 +0100
[Message part 1 (text/plain, inline)]
>Mon 24 Mar 2025 at 14:35, Lee Thompson <lee.p.thomp <at> gmail.com> wrote:

> Okay I've sent over a v3 patch with the `#:tests #f` change.  I'm away
> from my main PC at the moment so had to edit the patch with a text
> editor and send via Gmail's web interface.  Hopefully all should be
> right but let me know if something's gone wrong with it.

I’m unable to apply the patch. Better take your time using git
send-email when you have time.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Mon, 24 Mar 2025 19:27:01 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: 77185 <at> debbugs.gnu.org
Cc: Lee Thompson <lee.p.thomp <at> gmail.com>
Subject: [PATCH v3] gnu: Add emacs-bqn-mode.
Date: Mon, 24 Mar 2025 19:26:21 +0000
* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): New variable.

Change-Id: Ibe9a32c4f8414dbc5d3bb350aa684a8f3e15c567
---
 gnu/packages/emacs-xyz.scm | 48 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f00c5e4b29..0a51f5e987 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -155,6 +155,7 @@
 ;;; Copyright © 2025 Remco van 't Veer <remco <at> remworks.net>
 ;;; Copyright © 2025 Skylar Hill <stellarskylark <at> posteo.net>
 ;;; Copyright © 2025 Cayetano Santos <csantosb <at> inventati.org>
+;;; Copyright © 2025 Lee Thompson <lee.p.thomp <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -487,6 +488,53 @@ (define-public emacs-bookmark-plus
 reading the extensive documentation about BookmarkPlus on the Emacs Wiki.")
     (license license:gpl3+)))
 
+(define-public emacs-bqn-mode
+  ;; No releases, versions are tagged by date on GitHub
+  (let ((tag "2024-09-10")
+        (revision "0"))
+    (package
+      (name "emacs-bqn-mode")
+      (version tag)
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/museoa/bqn-mode")
+               (commit tag)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0a4whlx8065c15nfyqy8176mwysnc13z4q7mmdfnf6skdnvi2pk6"))))
+      (build-system emacs-build-system)
+      (arguments
+       (list
+        #:tests? #f                     ; No tests found in source
+        #:phases
+        #~(modify-phases %standard-phases
+            ;; `bqn-comint-bring' in `bqn-mode.el' uses the macro
+            ;; `thread-last', defined in `subr-x.el' but not autoloaded.
+            ;; `emacs-build-system' will happily byte-compile `bqn-mode.el'
+            ;; but interactively calling `bqn-comint-bring' will cause an
+            ;; error.  An explicit call to `(require 'subr-x)' remedies the
+            ;; issue until it is fixed upstream.
+            (add-after 'unpack 'require-subr-x
+              (lambda _
+                (emacs-batch-edit-file "bqn-mode.el"
+                                       '(progn (goto-char (point-min))
+                                               (re-search-forward
+                                                "(require 'pulse)")
+                                               (forward-line)
+                                               (insert "(require 'subr-x)\n")
+                                               (basic-save-buffer))))))))
+      (propagated-inputs (list emacs-compat))
+      (synopsis "Emacs major mode for the BQN programming language")
+      (description
+       "This package provides a major mode for editing and executing BQN code.
+It can be used to interactively evaluate BQN code in buffer or can be used to
+launch BQN REPL sessions.  For evaluating BQN code or spawning interpreters an
+executable implementation is required such as @code{cbqn} or @code{dbqn}.")
+      (home-page "https://github.com/museoa/bqn-mode")
+      (license license:gpl3))))
+
 (define-public emacs-cfrs
   (package
     (name "emacs-cfrs")
-- 
2.48.1





Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Mon, 24 Mar 2025 19:29:02 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [bug#77185] [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Mon, 24 Mar 2025 19:27:56 +0000
Cayetano Santos <csantosb <at> inventati.org> writes:

> I’m unable to apply the patch. Better take your time using git
> send-email when you have time.

Okay should be all good now, #:tests added and I rebased onto the latest
master just in case.




Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Tue, 25 Mar 2025 08:12:02 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: 77185 <at> debbugs.gnu.org
Cc: Lee Thompson <lee.p.thomp <at> gmail.com>
Subject: [PATCH v4] gnu: Add emacs-bqn-mode.
Date: Tue, 25 Mar 2025 09:10:34 +0100
From: Lee Thompson <lee.p.thomp <at> gmail.com>

* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): New variable.

Change-Id: Ibe9a32c4f8414dbc5d3bb350aa684a8f3e15c567
---

Upstream project uses dates as releases, and guix privilege releases, so no need to use revisions.

 gnu/packages/emacs-xyz.scm | 96 ++++++++++++++++++++++++++++----------
 1 file changed, 71 insertions(+), 25 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f00c5e4b29..b73b6666c0 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -155,6 +155,7 @@
 ;;; Copyright © 2025 Remco van 't Veer <remco <at> remworks.net>
 ;;; Copyright © 2025 Skylar Hill <stellarskylark <at> posteo.net>
 ;;; Copyright © 2025 Cayetano Santos <csantosb <at> inventati.org>
+;;; Copyright © 2025 Lee Thompson <lee.p.thomp <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -487,6 +488,51 @@ (define-public emacs-bookmark-plus
 reading the extensive documentation about BookmarkPlus on the Emacs Wiki.")
     (license license:gpl3+)))
 
+(define-public emacs-bqn-mode
+  (package
+    (name "emacs-bqn-mode")
+    ;; upstream releases are tagged by date
+    (version "2024-09-10")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/museoa/bqn-mode/")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a4whlx8065c15nfyqy8176mwysnc13z4q7mmdfnf6skdnvi2pk6"))))
+    (build-system emacs-build-system)
+    (arguments
+     (list
+      #:tests? #f ;No tests found in source
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; `bqn-comint-bring' in `bqn-mode.el' uses the macro
+          ;; `thread-last', defined in `subr-x.el' but not autoloaded.
+          ;; `emacs-build-system' will happily byte-compile `bqn-mode.el'
+          ;; but interactively calling `bqn-comint-bring' will cause an
+          ;; error.  An explicit call to `(require 'subr-x)' remedies the
+          ;; issue until it is fixed upstream.
+          (add-after 'unpack 'require-subr-x
+            (lambda _
+              (emacs-batch-edit-file "bqn-mode.el"
+                                     '(progn (goto-char (point-min))
+                                             (re-search-forward
+                                              "(require 'pulse)")
+                                             (forward-line)
+                                             (insert "(require 'subr-x)\n")
+                                             (basic-save-buffer))))))))
+    (propagated-inputs (list emacs-compat))
+    (synopsis "Emacs major mode for the BQN programming language")
+    (description
+     "This package provides a major mode for editing and executing BQN code.
+It can be used to interactively evaluate BQN code in buffer or can be used to
+launch BQN REPL sessions.  For evaluating BQN code or spawning interpreters an
+executable implementation is required such as @code{cbqn} or @code{dbqn}.")
+    (home-page "https://github.com/museoa/bqn-mode/")
+    (license license:gpl3)))
+
 (define-public emacs-cfrs
   (package
     (name "emacs-cfrs")
@@ -3142,13 +3188,13 @@ (define-public emacs-fb2-reader
       (version "0.1.1")
       (source
        (origin
-	 (method git-fetch)
-	 (uri (git-reference
-	       (url "https://github.com/jumper047/fb2-reader")
-	       (commit commit)))
-	 (file-name (git-file-name name version))
-	 (sha256
-	  (base32 "0vx4b9wnmx1bng8wak5r7yryyvgib4m46l6b877xzkdhsjr3rbsi"))))
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/jumper047/fb2-reader")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "0vx4b9wnmx1bng8wak5r7yryyvgib4m46l6b877xzkdhsjr3rbsi"))))
       (build-system emacs-build-system)
       (arguments
        (list
@@ -26583,19 +26629,19 @@ (define-public emacs-pulseaudio-control
 
 (define-public emacs-smudge
   (let ((commit "4a9c5b34e9bc0a694d0faf8c2f83dc244b8b6a2f")
-	(revision "1"))
+        (revision "1"))
     (package
       (name "emacs-smudge")
       (version (git-version "1.0.0" revision commit))
       (source (origin
-	        (method git-fetch)
-	        (uri (git-reference
-		      (url "https://github.com/danielfm/smudge")
-		      (commit commit)))
-	        (file-name (git-file-name name version))
-	        (sha256
-	         (base32
-		  "1xiqxw87sdk9mgy7fdbmzqaf58dc1grhkigirg1bd0b2q5kbnbwx"))))
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/danielfm/smudge")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1xiqxw87sdk9mgy7fdbmzqaf58dc1grhkigirg1bd0b2q5kbnbwx"))))
       (build-system emacs-build-system)
       (propagated-inputs (list emacs-oauth2 emacs-request emacs-simple-httpd))
       (home-page "https://github.com/danielfm/smudge")
@@ -37239,7 +37285,7 @@ (define-public emacs-ssh-deploy
        (uri (string-append "https://elpa.gnu.org/packages/ssh-deploy-" version
                            ".tar"))
        (sha256
-	(base32 "0fb88l3270d7l808q8x16zcvjgsjbyhgifgv17syfsj0ja63x28p"))))
+        (base32 "0fb88l3270d7l808q8x16zcvjgsjbyhgifgv17syfsj0ja63x28p"))))
     (build-system emacs-build-system)
     (home-page "https://github.com/cjohansson/emacs-ssh-deploy")
     (synopsis "Deployment via Tramp, global or per directory")
@@ -43112,19 +43158,19 @@ (define-public emacs-window-tool-bar
 
 (define-public emacs-tintin-mode
   (let ((commit "82e71e1db92ee3d94c7d0208bafc5de337193de8")
-	(revision "1"))
+        (revision "1"))
     (package
       (name "emacs-tintin-mode")
       (version (git-version "1.0.1" revision commit))
       (source
        (origin
-	 (method git-fetch)
-	 (uri (git-reference
-	       (url "https://github.com/sunwayforever/tintin-mode")
-	       (commit commit)))
-	 (file-name (git-file-name name version))
-	 (sha256
-	  (base32 "1p6ryqb8m30cp0zyawb6bs8wy3ga7gm60lcan0xx1fy3wx8qip33"))))
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/sunwayforever/tintin-mode")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32 "1p6ryqb8m30cp0zyawb6bs8wy3ga7gm60lcan0xx1fy3wx8qip33"))))
       (build-system emacs-build-system)
       (home-page "https://github.com/sunwayforever/tintin-mode")
       (synopsis "Emacs major mode for TinTin++ scripts")

base-commit: ce086e31f0f5c78be76fd228dfd7718ff6df584e
--
2.49.0





Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Tue, 25 Mar 2025 08:14:02 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: Lee Thompson <lee.p.thomp <at> gmail.com>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [bug#77185] [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Tue, 25 Mar 2025 09:13:18 +0100
[Message part 1 (text/plain, inline)]
>Mon 24 Mar 2025 at 19:27, Lee Thompson <lee.p.thomp <at> gmail.com> wrote:

> Okay should be all good now, #:tests added and I rebased onto the latest
> master just in case.

Thanks ! I submitted a latest v4, as there is no need for revisions
here (we prefer releases, when feasible), as we assume upstream they’re
using dates for releases.  What do you think ?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Tue, 25 Mar 2025 10:03:02 GMT) Full text and rfc822 format available.

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

From: Lee Thompson <lee.p.thomp <at> gmail.com>
To: Cayetano Santos <csantosb <at> inventati.org>
Cc: 77185 <at> debbugs.gnu.org
Subject: Re: [bug#77185] [PATCH v2] gnu: Add emacs-bqn-mode.
Date: Tue, 25 Mar 2025 10:02:48 +0000
Cayetano Santos <csantosb <at> inventati.org> writes:

> Thanks ! I submitted a latest v4, as there is no need for revisions
> here (we prefer releases, when feasible), as we assume upstream they’re
> using dates for releases.  What do you think ?

I see now what you mean about revisions, all looks great to me! Thanks
for all the patience and help!




Information forwarded to guix-patches <at> gnu.org:
bug#77185; Package guix-patches. (Tue, 25 Mar 2025 10:15:02 GMT) Full text and rfc822 format available.

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

From: Cayetano Santos <csantosb <at> inventati.org>
To: 77185 <at> debbugs.gnu.org
Cc: Lee Thompson <lee.p.thomp <at> gmail.com>
Subject: [PATCH v5] gnu: Add emacs-bqn-mode.
Date: Tue, 25 Mar 2025 11:13:54 +0100
From: Lee Thompson <lee.p.thomp <at> gmail.com>

* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): New variable.

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

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index f00c5e4b29..27e29e9628 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -155,6 +155,7 @@
 ;;; Copyright © 2025 Remco van 't Veer <remco <at> remworks.net>
 ;;; Copyright © 2025 Skylar Hill <stellarskylark <at> posteo.net>
 ;;; Copyright © 2025 Cayetano Santos <csantosb <at> inventati.org>
+;;; Copyright © 2025 Lee Thompson <lee.p.thomp <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -487,6 +488,51 @@ (define-public emacs-bookmark-plus
 reading the extensive documentation about BookmarkPlus on the Emacs Wiki.")
     (license license:gpl3+)))
 
+(define-public emacs-bqn-mode
+  (package
+    (name "emacs-bqn-mode")
+    ;; upstream releases are tagged by date
+    (version "2024-09-10")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/museoa/bqn-mode/")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0a4whlx8065c15nfyqy8176mwysnc13z4q7mmdfnf6skdnvi2pk6"))))
+    (build-system emacs-build-system)
+    (arguments
+     (list
+      #:tests? #f ;No tests found in source
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; `bqn-comint-bring' in `bqn-mode.el' uses the macro
+          ;; `thread-last', defined in `subr-x.el' but not autoloaded.
+          ;; `emacs-build-system' will happily byte-compile `bqn-mode.el'
+          ;; but interactively calling `bqn-comint-bring' will cause an
+          ;; error.  An explicit call to `(require 'subr-x)' remedies the
+          ;; issue until it is fixed upstream.
+          (add-after 'unpack 'require-subr-x
+            (lambda _
+              (emacs-batch-edit-file "bqn-mode.el"
+                                     '(progn (goto-char (point-min))
+                                             (re-search-forward
+                                              "(require 'pulse)")
+                                             (forward-line)
+                                             (insert "(require 'subr-x)\n")
+                                             (basic-save-buffer))))))))
+    (propagated-inputs (list emacs-compat))
+    (synopsis "Emacs major mode for the BQN programming language")
+    (description
+     "This package provides a major mode for editing and executing BQN code.
+It can be used to interactively evaluate BQN code in buffer or can be used to
+launch BQN REPL sessions.  For evaluating BQN code or spawning interpreters an
+executable implementation is required such as @code{cbqn} or @code{dbqn}.")
+    (home-page "https://github.com/museoa/bqn-mode/")
+    (license license:gpl3)))
+
 (define-public emacs-cfrs
   (package
     (name "emacs-cfrs")

base-commit: ce086e31f0f5c78be76fd228dfd7718ff6df584e
-- 
2.49.0





This bug report was last modified 14 days ago.

Previous Next


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