bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#65680: cl-print-to-string-with-limit erroneously imposes a maximum p


From: Stefan Monnier
Subject: bug#65680: cl-print-to-string-with-limit erroneously imposes a maximum print-length of 50
Date: Thu, 21 Sep 2023 12:16:57 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]