Subject: Re: bug#51037: [PATCH] Make `print-level` & `print-length` customizable in ERT batch tests

From: Eli Zaretskii <[email-masked]>
Date: Wed, 06 Oct 2021 15:52:13 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Wed, 06 Oct 2021 11:30:03 +0200
> Cc: [email-masked]
> 
> Michael <[email-masked]> writes:
> 
> > When running ERT tests in batch mode, the conservative values
> > chosen for `print-level` and `print-length` sometimes make it
> > difficult to see what exactly is wrong.  This patch introduces
> > two new variables (`ert-batch-print-level` &
> > `ert-batch-print-length`) that one can use to customize them;
> > e.g.
> >
> >    emacs -batch -l ert -l my-tests.el \
> >          --eval "(let ((ert-batch-print-level 10) \
> >                        (ert-batch-print-length 120)) \
> >                    (ert-run-tests-batch-and-exit))"
> 
> Sounds like a good idea.

Why do we limit print-length in batch mode?  In interactive session,
one can click or type RET on the ellipsis and get it expanded, but no
such joy in batch.  See

  https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg00395.html

for how that makes debugging more difficult than it has to be.

So how about using huge values in batch?  Are there any downsides?