GNU bug report logs - #75364
Manual: Alist example does not work

Previous Next

Package: guile;

Reported by: Jens Egon Nyborg <jens <at> puggaard-nyborg.dk>

Date: Sat, 4 Jan 2025 17:47:05 UTC

Severity: normal

Done: lloda <lloda <at> sarc.name>

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: lloda <lloda <at> sarc.name>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#75364: closed (Manual: Alist example does not work)
Date: Sat, 04 Jan 2025 23:35:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 5 Jan 2025 00:34:32 +0100
with message-id <5EE66450-E579-43C1-9518-7C02B5770B40 <at> sarc.name>
and subject line Re: bug#75364: Manual: Alist example does not work
has caused the debbugs.gnu.org bug report #75364,
regarding Manual: Alist example does not work
to be marked as done.

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


-- 
75364: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=75364
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jens Egon Nyborg <jens <at> puggaard-nyborg.dk>
To: bug-guile <at> gnu.org
Subject: Manual: Alist example does not work
Date: Sat, 4 Jan 2025 16:59:15 +0100
[Message part 3 (text/plain, inline)]
I run

(define capitals '(("New York" . "Albany")
                   ("Oregon"   . "Salem")
                   ("Florida"  . "Miami")))

followed by

(set! capitals
      (assoc-set! capitals "Florida" "Tallahassee"))

and get

"ice-9/boot-9.scm:1676:22: In procedure raise-exception:
In procedure set-cdr!: Wrong type argument in position 1 (expecting 
mutable pair): ("Florida" . "Miami")

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue."


(In geiser in emacs on Arch)

Warning: In my own code it actually worked on and off.

Work-around: Use

(define capitals (list (cons "New York"  "Albany")
                       (cons "Oregon"   . "Salem")
                       (cons "Florida"  . "Miami")))

apparently quoted lists are not mutable!
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
From: lloda <lloda <at> sarc.name>
To: Jens Egon Nyborg <jens <at> puggaard-nyborg.dk>
Cc: 75364-done <at> debbugs.gnu.org
Subject: Re: bug#75364: Manual: Alist example does not work
Date: Sun, 5 Jan 2025 00:34:32 +0100
[Message part 6 (text/plain, inline)]
This is a duplicate of  https://bugs.gnu.org/32841 <https://bugs.gnu.org/32841> which was fixed in 818b879b2e481943340e86dbb5b93f12021206c5.

The online manual should update when 3.0.11 is released. 

Regards
[Message part 7 (text/html, inline)]

This bug report was last modified 216 days ago.

Previous Next


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