guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#55420] [PATCH 0/2] Add a function to parse emacs elisp's package he


From: Fredrik Salomonsson
Subject: [bug#55420] [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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]