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
Message #10 received at 65680-done <at> debbugs.gnu.org (full text, mbox):
The bug has been fixed.
On Fri, Sep 01, 2023 at 14:17:12 +0000, Alan Mackenzie 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.
> cl-print-to-string-with-limit is used by backtrace--print-to-string with
> a LIMIT of 5000 to print the first line of a debug buffer. The error
> message gets rudely truncated at 50 characters with an ellipsis, e.g.:
> Debugger entered--Lisp error: (error "Invalid call to `edebug-before'. Is your debug sp...")
> .. We shouldn't be doing this. It is irritating to the user. Correct
> would be to print:
> Debugger entered--Lisp error: (error "Invalid call to `edebug-before'. Is your debug spec correct?")
> .. I propose fixing this bug by removing these limits on print-length and
> print-level in cl-print-to-string-with-limit.
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 1 year and 309 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.