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
Hello, Michael.
On Tue, Oct 03, 2023 at 04:11:16 +0200, Michael Heerdegen wrote:
> Hello Alan,
> in 01229fe0096 "Stop truncating strings too much in
> cl-print-string-with-limit" there is an error: the first `cond'
> condition will error when limit is nil (`zerop' expects a number):
I think you mean when limit is t. When limit is nil, the (null limit)
inside the `or' will catch it.
Thanks for pointing out this bug. I'll fix it.
> | @@ -557,6 +572,11 @@ cl-print-to-string-with-limit
> | ((null limit) nil)
> | ((eq limit t) print-level)
> | (t (min 8 (truncate (log limit))))))
> | + (cl-print-string-length
> | + (cond
> | + ((or (null limit) (zerop limit)) nil)
> | + ((eq limit t) cl-print-string-length)
> | + (t (max 0 (- limit 3)))))
> TIA,
> Michael.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 1 year and 294 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.