GNU bug report logs - #55420
[PATCH 0/2] Add a function to parse emacs elisp's package header

Previous Next

Package: guix-patches;

Reported by: Fredrik Salomonsson <plattfot <at> posteo.net>

Date: Sat, 14 May 2022 23:01:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#55420: closed ([PATCH 0/2] Add a function to parse emacs
 elisp's package header)
Date: Fri, 17 Jun 2022 20:30:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 17 Jun 2022 22:29:13 +0200
with message-id <87czf7dofa.fsf_-_ <at> gnu.org>
and subject line Re: bug#55420: [PATCH 0/2] Add a function to parse emacs elisp's package header
has caused the debbugs.gnu.org bug report #55420,
regarding [PATCH 0/2] Add a function to parse emacs elisp's package header
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
55420: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=55420
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Fredrik Salomonsson <plattfot <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Fredrik Salomonsson <plattfot <at> posteo.net>
Subject: [PATCH 0/2] Add a function to parse emacs elisp's package header
Date: Sat, 14 May 2022 23:00:17 +0000
When writing a guix.scm file for an emacs packages, I wanted a way to fetch
the version I specify in the header of the elisp file. I found that I could do
that with the lisp-mnt library in emacs. Unfortunately none of the emacs
utility functions in guix/build/emacs-utils.scm return the output of an
elisp expression.

With these two patches I aim to add that functionality.

I spilt it in two functions:

emacs-batch-script: Run an arbitrary elisp expression and return the output as
a string.

emacs-header-parse: Given a header section and a file it will return the value
of that section.

For example (emacs-header-parse "version" "path/to/an/elisp/package.el")

Reason for the spilt is that people might want to run other elisp snippets.

Fredrik Salomonsson (2):
  guix: emacs-utils: Add emacs-batch-script.
  guix: emacs-utils: Add emacs-header-parse.

 guix/build/emacs-utils.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)


base-commit: 3935451f63c078cae9a928d87c6838ec3138abc0
-- 
2.36.0



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Fredrik Salomonsson <plattfot <at> posteo.net>
Cc: 55420-done <at> debbugs.gnu.org
Subject: Re: bug#55420: [PATCH 0/2] Add a function to parse emacs elisp's
 package header
Date: Fri, 17 Jun 2022 22:29:13 +0200
Hi Fredrik,

Fredrik Salomonsson <plattfot <at> posteo.net> skribis:

> * guix/build/emacs-utils.scm (emacs-batch-script): New procedure.
>
> * tests/build-emacs-utils.scm: New file.
>
> * Makefile.am (TESTS): Add `tests/build-emacs-utils.scm'.

[...]

> * guix/build/emacs-utils.scm (emacs-header-parse): New procedure.
>
> * tests/build-emacs-utils.scm ("emacs-header-parse: fetch version",
>   "emacs-header-parse: fetch keywords", "emacs-header-parse: fetch
>   nonexistent author"): New tests.

Thanks, applied.  Apologies for the delay!

Ludo’.


This bug report was last modified 3 years and 52 days ago.

Previous Next


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