<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/read-print.scm, branch kernel-updates</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>read-print: Adjust test for keyword alignment.</title>
<updated>2025-02-24T22:33:51+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2025-02-24T16:04:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=536909ea67cd3cfe506326c6411a5c549bb88055'/>
<id>536909ea67cd3cfe506326c6411a5c549bb88055</id>
<content type='text'>
This is a followup to f7744227699d27045e87be9eac3464c2f62ff7e3, which
changed the rule without updating the test.

* tests/read-print.scm ("keyword-value-same-line"): Adjust.

Change-Id: Ie802ef3d2e577cb0647158baed0606c958394c06
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to f7744227699d27045e87be9eac3464c2f62ff7e3, which
changed the rule without updating the test.

* tests/read-print.scm ("keyword-value-same-line"): Adjust.

Change-Id: Ie802ef3d2e577cb0647158baed0606c958394c06
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: Properly indent ‘parameterize’.</title>
<updated>2023-11-22T15:51:46+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-11-22T15:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=2c5fb13a0504df593b64c416d952df90fb4a5f3f'/>
<id>2c5fb13a0504df593b64c416d952df90fb4a5f3f</id>
<content type='text'>
Fixes &lt;https://issues.guix.gnu.org/65427&gt;.

* guix/read-print.scm (%special-forms): Add ‘parameterize’.
* tests/read-print.scm: Add test.

Reported-by: Maxime Devos &lt;maximedevos@telenet.be&gt;
Change-Id: I922bffc527ade539cf2eb304acb25bc9c705a459
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://issues.guix.gnu.org/65427&gt;.

* guix/read-print.scm (%special-forms): Add ‘parameterize’.
* tests/read-print.scm: Add test.

Reported-by: Maxime Devos &lt;maximedevos@telenet.be&gt;
Change-Id: I922bffc527ade539cf2eb304acb25bc9c705a459
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: read-print: Update expectations.</title>
<updated>2023-09-24T00:00:00+00:00</updated>
<author>
<name>Tobias Geerinckx-Rice</name>
<email>me@tobias.gr</email>
</author>
<published>2023-09-24T00:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=7c861ab4f46c1239ea2da4ef7b57deb88e2b2761'/>
<id>7c861ab4f46c1239ea2da4ef7b57deb88e2b2761</id>
<content type='text'>
This follows up on commit 974b04ab8063382f3a91b0cf5e46bac6e0238672, which
I tested with the wrong test (tests/style.scm) instead.  Oops.

* tests/read-print.scm: Update two TEST-PRETTY-PRINT strings.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This follows up on commit 974b04ab8063382f3a91b0cf5e46bac6e0238672, which
I tested with the wrong test (tests/style.scm) instead.  Oops.

* tests/read-print.scm: Update two TEST-PRETTY-PRINT strings.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: Correctly read "(. x)".</title>
<updated>2023-05-05T21:47:48+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-05-05T16:22:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=8749f31485888c587c6f88a0a7bdd48cc9e8c9b8'/>
<id>8749f31485888c587c6f88a0a7bdd48cc9e8c9b8</id>
<content type='text'>
* guix/read-print.scm (read-with-comments): Check whether REST is a pair
before calling 'set-cdr!'.
* tests/read-print.scm ("read-with-comments: half dot notation"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/read-print.scm (read-with-comments): Check whether REST is a pair
before calling 'set-cdr!'.
* tests/read-print.scm ("read-with-comments: half dot notation"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: 'pretty-print-with-comments' keeps newlines on long strings.</title>
<updated>2023-04-24T08:27:13+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludovic.courtes@inria.fr</email>
</author>
<published>2023-04-24T08:10:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=7931ac810b8feaadcbbfa3a31786087da2d5ee73'/>
<id>7931ac810b8feaadcbbfa3a31786087da2d5ee73</id>
<content type='text'>
* guix/read-print.scm (printed-string)[preserve-newlines?]: New
procedure.
Use it to preserve newlines on long strings.
* tests/read-print.scm: Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/read-print.scm (printed-string)[preserve-newlines?]: New
procedure.
Use it to preserve newlines on long strings.
* tests/read-print.scm: Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: 'read-with-comments' reads comments within gexps.</title>
<updated>2023-03-16T22:03:18+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-03-16T21:18:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=83128f00e9149f3c1bcd4450eb0ed3620a37149c'/>
<id>83128f00e9149f3c1bcd4450eb0ed3620a37149c</id>
<content type='text'>
Fixes &lt;https://issues.guix.gnu.org/62059&gt;.
Reported by Maxim Cournoyer &lt;maxim.cournoyer@gmail.com&gt;.

* guix/read-print.scm (read-with-comments): Special-case #~, #$, and #+.
* tests/read-print.scm: Add two tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://issues.guix.gnu.org/62059&gt;.
Reported by Maxim Cournoyer &lt;maxim.cournoyer@gmail.com&gt;.

* guix/read-print.scm (read-with-comments): Special-case #~, #$, and #+.
* tests/read-print.scm: Add two tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: Correctly handle comments that follow a list head.</title>
<updated>2023-03-07T10:39:50+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-03-07T10:31:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=0a37921d851b94aef6900214098dc5bd62b46e26'/>
<id>0a37921d851b94aef6900214098dc5bd62b46e26</id>
<content type='text'>
Fixes &lt;https://issues.guix.gnu.org/61013&gt;.
Reported by Maxim Cournoyer &lt;maxim.cournoyer@gmail.com&gt;.

* guix/read-print.scm (pretty-print-with-comments)[starts-with-line-comment?]:
New procedure.
Use it when printing a list.
* tests/read-print.scm: Add two tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://issues.guix.gnu.org/61013&gt;.
Reported by Maxim Cournoyer &lt;maxim.cournoyer@gmail.com&gt;.

* guix/read-print.scm (pretty-print-with-comments)[starts-with-line-comment?]:
New procedure.
Use it when printing a list.
* tests/read-print.scm: Add two tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: Do not use extended notation when printing '1+', '1-', etc.</title>
<updated>2023-01-09T16:40:54+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-01-09T16:04:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=6c343d0d0f6b8560e9eb594ce1d4f984753a35fb'/>
<id>6c343d0d0f6b8560e9eb594ce1d4f984753a35fb</id>
<content type='text'>
* guix/read-print.scm (%special-non-extended-symbols): New variable.
(symbol-&gt;display-string): New procedure.
(pretty-print-with-comments): Use it in lieu of 'string-&gt;symbol'.
* tests/read-print.scm: Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* guix/read-print.scm (%special-non-extended-symbols): New variable.
(symbol-&gt;display-string): New procedure.
(pretty-print-with-comments): Use it in lieu of 'string-&gt;symbol'.
* tests/read-print.scm: Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: Correctly support multiple same-named newline forms.</title>
<updated>2022-09-20T17:24:31+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2022-09-17T14:15:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=7a698da0d04d75f1c49f9ae9f358070acab0f781'/>
<id>7a698da0d04d75f1c49f9ae9f358070acab0f781</id>
<content type='text'>
Previously (home-environment (services ...)) would not be considered a
"newline form".  This fixes it.

* guix/read-print.scm (newline-form?): Use 'vhash-foldq*' instead of
'vhash-assq' and iterate over candidates.
* tests/read-print.scm: Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously (home-environment (services ...)) would not be considered a
"newline form".  This fixes it.

* guix/read-print.scm (newline-form?): Use 'vhash-foldq*' instead of
'vhash-assq' and iterate over candidates.
* tests/read-print.scm: Add test.
</pre>
</div>
</content>
</entry>
<entry>
<title>read-print: Define forms for which \n, \t, etc. are not escaped.</title>
<updated>2022-09-02T08:49:35+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2022-09-01T20:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=82968362ead0ed59c64ee8a21fec346c9265a149'/>
<id>82968362ead0ed59c64ee8a21fec346c9265a149</id>
<content type='text'>
Previously, the pretty-printer would unconditionally leave everything
but double-quotes and backslashes unescaped when rendering a string.
With this change, the previous behavior only applies to forms listed in
%NATURAL-WHITESPACE-STRING-FORMS.

* guix/read-print.scm (%natural-whitespace-string-forms): New variable.
(printed-string): New procedure.
(pretty-print-with-comments): Use it instead of 'escaped-string'.
* tests/read-print.scm: Add test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the pretty-printer would unconditionally leave everything
but double-quotes and backslashes unescaped when rendering a string.
With this change, the previous behavior only applies to forms listed in
%NATURAL-WHITESPACE-STRING-FORMS.

* guix/read-print.scm (%natural-whitespace-string-forms): New variable.
(printed-string): New procedure.
(pretty-print-with-comments): Use it instead of 'escaped-string'.
* tests/read-print.scm: Add test.
</pre>
</div>
</content>
</entry>
</feed>
