GNU bug report logs - #75084
bug report with patch 0003-Fix-make-custom-port-in-case-encoding-is-f.patch

Previous Next

Package: guile;

Reported by: Hannes Müller <h.c.f.mueller <at> gmx.de>

Date: Wed, 25 Dec 2024 12:51:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75084 in the body.
You can then email your comments to 75084 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#75084; Package guile. (Wed, 25 Dec 2024 12:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hannes Müller <h.c.f.mueller <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Wed, 25 Dec 2024 12:51:02 GMT) Full text and rfc822 format available.

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

From: Hannes Müller <h.c.f.mueller <at> gmx.de>
To: bug-guile <at> gnu.org
Subject: bug report with patch
 0003-Fix-make-custom-port-in-case-encoding-is-f.patch
Date: Wed, 25 Dec 2024 12:50:13 +0000
[Message part 1 (text/html, inline)]
[0003-Fix-make-custom-port-in-case-encoding-is-f.patch (text/x-patch, attachment)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Fri, 28 Feb 2025 20:29:02 GMT) Full text and rfc822 format available.

Notification sent to Hannes Müller <h.c.f.mueller <at> gmx.de>:
bug acknowledged by developer. (Fri, 28 Feb 2025 20:29:02 GMT) Full text and rfc822 format available.

Message #10 received at 75084-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Hannes Müller <h.c.f.mueller <at> gmx.de>
Cc: 75084-done <at> debbugs.gnu.org
Subject: Re: bug#75084: bug report with patch
 0003-Fix-make-custom-port-in-case-encoding-is-f.patch
Date: Fri, 28 Feb 2025 21:28:39 +0100
[Message part 1 (text/plain, inline)]
Hi,

Hannes Müller <h.c.f.mueller <at> gmx.de> skribis:

> From 72b85f8e6a369e6aef4c6bd6bb233c0cacb80b03 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Hannes=20M=C3=BCller?= <>
> Date: Sat, 21 Dec 2024 16:55:13 +0100
> Subject: [PATCH] Fix make-custom-port in case encoding is #f
>
> * module/ice-9/custom-ports.scm (make-custom-port): Code fails if
> (fluid-ref %default-port-encoding) returns #f. In fact this was the
> case why readline support on MSYS2 failed for guile 3.0.10, ref.
> https://github.com/msys2/MSYS2-packages/issues/5079
> But later used canonicalize-encoding is prepared to handle #f for
> encoding. So allow encoding to also handle this case.

Applied with the simplification below.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/module/ice-9/custom-ports.scm b/module/ice-9/custom-ports.scm
index bc9de8f64..c4376db7b 100644
--- a/module/ice-9/custom-ports.scm
+++ b/module/ice-9/custom-ports.scm
@@ -127,9 +127,7 @@
           (id "custom-port")
           (print (make-default-print #:id id))
           (truncate default-truncate)
-          (encoding (if (string? (fluid-ref %default-port-encoding))
-                        (string->symbol (fluid-ref %default-port-encoding))
-                        (fluid-ref %default-port-encoding)))
+          (encoding (and=> (fluid-ref %default-port-encoding) string->symbol))
           (conversion-strategy (fluid-ref %default-port-conversion-strategy))
           (close-on-gc? #f))
   "Create a custom port whose behavior is determined by the methods passed

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 29 Mar 2025 11:24:44 GMT) Full text and rfc822 format available.

This bug report was last modified 83 days ago.

Previous Next


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