~( format directive suppresses pretty printing directives

Bug #1988784 reported by Zach Shaftel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Undecided
Unassigned

Bug Description

  (format nil "~<~(~A~^ ~4I~:@_~A~)~:>" '(foo bar))
yields
"foo bar"
whereas
  (format nil "~<~A~^ ~4I~:@_~A~:>" '(foo bar))
yields the expected
"FOO
    BAR"

I'm guessing this is because the case conversion stream bound by ~( is not a pretty-printing stream, so pprint-indent and pprint-newline think there's nothing for them to do.

SBCL version 2.2.8

$ uname -a
Linux bigbox 5.19.6-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 31 Aug 2022 22:09:40 +0000 x86_64 GNU/Linux

*features* =
(:SLYNK :QUICKLISP :QUICKLISP-SUPPORT-HTTPS :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3
 :ASDF2 :ASDF :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :ROS.INIT :X86-64
 :GENCGC :64-BIT :ANSI-CL :COMMON-LISP :ELF :IEEE-FLOATING-POINT :LINUX
 :LITTLE-ENDIAN :PACKAGE-LOCAL-NICKNAMES :SB-CORE-COMPRESSION :SB-LDB
 :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE :SBCL :UNIX)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.