guix-patches
[Top][All Lists]
Advanced

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

[bug#60753] [PATCH] gnu: home: Add home-emacs-service-type.


From: Ludovic Courtès
Subject: [bug#60753] [PATCH] gnu: home: Add home-emacs-service-type.
Date: Tue, 31 Jan 2023 17:26:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Hi Andrew,

Andrew Tropin <andrew@trop.in> skribis:

>>> I think it will be cool to hook up a custom reader, ideally comment
>>> preserving, for emacs lisp inside scheme files.
>>
>> (guix read-print) is what you want.  :-)
>>
>
> Can you give a hint on how to use it for preserving comments, please?

It can be used like this:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> ,use(guix read-print)
scheme@(guile-user)> (pretty-print-with-comments (current-output-port) `(list 
foo ,(comment ";ooh!\n" #t) bar))
(list foo ;ooh!
      bar)$5 = 10
scheme@(guile-user)> (call-with-input-string "(list foo ;oh!\nbar)" 
read-with-comments)
$6 = (list foo #<<comment> str: ";oh!\n" margin?: #t> bar)
--8<---------------cut here---------------end--------------->8---

There’s a <comment> record type.

Now let’s see perhaps what we need to get ‘home-emacs-service-type’
merged, and what we can keep as future work.  Thoughts?

Ludo’.





reply via email to

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