From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.bugs Subject: bug#51037: [PATCH] Make `print-level` & `print-length` customizable in ERT batch tests Date: Mon, 22 Nov 2021 20:29:39 +0300 Message-ID: References: <86tuhvmtpl.fsf@runbox.com> <86ily2mjtq.fsf@runbox.com> <87r1cp89o4.fsf@gnus.org> <86fst5m48v.fsf@runbox.com> <87a6jd5891.fsf@gnus.org> <86mtmykxro.fsf@runbox.com> <87y26hz24c.fsf@gnus.org> <86bl3blcgm.fsf@runbox.com> <87wnlya9sj.fsf@gnus.org> <86wnlbmooj.fsf@runbox.com> <87fsry7qdy.fsf@gnus.org> <87bl2m7q9g.fsf@gnus.org> <86zgq5kn9y.fsf@runbox.com> <87ilws7d7e.fsf@gnus.org> <87pmqxlsob.fsf@gnus.org> <86pmqwkw1r.fsf@pobox.com> <86mtlylqm6.fsf@pobox.com> <86h7c4l1wa.fsf@pobox.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3455"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (darwin) Cc: gazally@runbox.com, Lars Ingebrigtsen , 51037@debbugs.gnu.org To: Michael Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 22 18:30:17 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mpD8y-0000fu-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Nov 2021 18:30:16 +0100 Original-Received: from localhost ([::1]:55760 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mpD8x-0001yS-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 22 Nov 2021 12:30:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mpD8k-0001xA-W0 for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2021 12:30:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37448) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mpD8k-0007Tb-Mj for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2021 12:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mpD8k-0004hF-Fv for bug-gnu-emacs@gnu.org; Mon, 22 Nov 2021 12:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Filipp Gunbin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Nov 2021 17:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51037 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 51037-submit@debbugs.gnu.org id=B51037.163760219418013 (code B ref 51037); Mon, 22 Nov 2021 17:30:02 +0000 Original-Received: (at 51037) by debbugs.gnu.org; 22 Nov 2021 17:29:54 +0000 Original-Received: from localhost ([127.0.0.1]:48994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpD8c-0004gT-Eo for submit@debbugs.gnu.org; Mon, 22 Nov 2021 12:29:54 -0500 Original-Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:60491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mpD8Y-0004gD-0k for 51037@debbugs.gnu.org; Mon, 22 Nov 2021 12:29:53 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 1118A320046E; Mon, 22 Nov 2021 12:29:44 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 22 Nov 2021 12:29:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=fm1; bh=+uxkVE/u9PbJJwpqfu9Ug/Ye9c x8htmUmxnhLU+3PbI=; b=Eddk6keSfowPs5nXL24xo83oLyiNA2PmXTCdPg4xp6 3sIbMGKsBQ+FIgCZy3F5STlvhaovhGLnfz6ZcqBYXEPX3xj5YyJoyBRwBkd3nz1Y 4N7s0NxtzzHYHb8lJXHS5+km4Zf7I7ksCiFporse3Bkl9jy87mi3VYUnX3RdxKqE atGvDFJY1fx37wHS4ECobsAI5cSqqDoT3CUV7Do2rSc4ki58XUZRUlf0vdx3q6es PIo7iSdVYTa8S8AacxKugjcklQxJC8PgShkca7e+Opkey7O0bDSM/uC88v1gVjvj +aY3skgVlFtyXKPowSceVqRVJ7A8eCHHwPrt1+R0CcTA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+uxkVE /u9PbJJwpqfu9Ug/Ye9cx8htmUmxnhLU+3PbI=; b=FGxBEoh/k6pgyue+j4irOI bKAvnpmatxXJPdHYmRW6qSNfD4V4usOKKSxRefsADtRVydOFpuedqclkNyNx7cra eDlvL3CC1LkMMdgOz6kwTy0GeI+KT2Mf/EnITAQikYvly4aXMSP4I/P1dXuUbVwf QB5lBOdwfddAIZ/6Tnc9wD+GaHywT3+pRqRv/5i6nn6YCbSewqGx2uD5LLoGW4Iv euFndfRiAHOQ+k4uCW1A1MtbWoUUsUKhMfR8xZ3gvkhm4XdpD81o38TWJvfj9C5u r8HI/5tlFwkr65hbOqO9vqUOpX+/5pKxp8riVXzXxUAE7lySrDfUYRM4gMIy4G6g == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrgeeggddutdefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufgjfhgffffkgggtsehttdertddtredtnecuhfhrohhmpefhihhlihhp phcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecuggftrf grthhtvghrnhepvdevkeffvdeuvefhuddtjeehkedvueefveettddtveduudfgieffieev ieevhfdtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epfhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 22 Nov 2021 12:29:42 -0500 (EST) In-Reply-To: <86h7c4l1wa.fsf@pobox.com> (Michael's message of "Mon, 22 Nov 2021 06:07:33 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:220626 Archived-At: On 22/11/2021 06:07 -0800, Michael wrote: > So, we could do either of: > > 1. As Filipp suggests, just change the contract for > `ert-batch-backtrace-line-length' to: if set to nil, you get > full stack traces, period. > > 2. change `cl-print-to-string-with-limit' to respect the > existing values of `print-length' & `print-level' when > `limit' is nil. Note that the only caller (in Emacs) of this > function is the backtrace package. > > I vote for option 2. What say you all? I think the right way is 1 (which I already installed) because then, as the result of your patch, we get the ability to override backtrace-line-length with ert-batch-backtrace-line-length, and nothing more. Changing the semantics of backtrace-line-length should be done (if done) in a separate issue, IMO. Personally, I like that LIMIT in cl-print-to-string-with-limit is "hard override". Filipp