GNU bug report logs -
#65680
cl-print-to-string-with-limit erroneously imposes a maximum print-length of 50
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Fri, 1 Sep 2023 14:18:02 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Alan Mackenzie [2023-09-01 14:17:12] wrote:
> Hello, Emacs.
>
> In cl-print-to-string-with-limit appears the following binding:
>
> (print-length (cond
> ((null limit) nil)
> ((eq limit t) print-length)
> (t (min limit 50))))
> ^^^^^^^^^^^^
>
> .. This has the effect of ignoring the parameter LIMIT (unless it is
> very small) and instead truncating the printed size to 50. There is a
> similar mechanism to limit print-level to 8.
>
> Although the doc string doesn't explicitly say it won't truncate like
> this, it kind of implies that LIMIT is the size it will truncate to.
> This excessive truncation is a bug.
See also bug#34183.
> .. I propose fixing this bug by removing these limits on print-length and
> print-level in cl-print-to-string-with-limit.
Sounds a bit drastic. Strings can be obnoxiously long, so it's
important for cl-print to be able to truncate them.
[ IOW, I'm not happy with commit
761f8901fffdb155cbcc7f3b5a2329161c2c1826. ]
Stefan
This bug report was last modified 1 year and 292 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.