From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#36566: 27.0.50; debug is sometimes horribly slow Date: Sat, 14 May 2022 12:05:42 -0400 Message-ID: References: <87r26yvb4r.fsf@web.de> <871ryy2l1t.fsf@gmail.com> <87r26xjyon.fsf@web.de> <877e8llbzo.fsf@runbox.com> <8736ilaepu.fsf@runbox.com> <87h871u24i.fsf@gmail.com> <874l2vcrtn.fsf@runbox.com> <874l2eosa7.fsf@gmail.com> <87mufh8jj2.fsf@runbox.com> <87v9tza6gg.fsf@gmail.com> <875zlvj453.fsf@runbox.com> <87bkwp2pjr.fsf@gnus.org> <87a6c72v1t.fsf@runbox.com> <87k0bb16jc.fsf@web.de> <874k2ed828.fsf@gnus.org> <875ym931t9.fsf@runbox.com> <87mtfl1kxt.fsf@gnus.org> <87h75s3gx8.fsf@web.de> <87pmkgl52s.fsf@gnus.org> <87lev4jeyq.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5461"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Michael Heerdegen , Gemini Lasswell , 36566@debbugs.gnu.org, Noam Postavsky To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 14 18:10:49 2022 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 1npuLx-0001GW-7y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 May 2022 18:10:49 +0200 Original-Received: from localhost ([::1]:37622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1npuLv-00039g-SB for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 May 2022 12:10:47 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1npuHL-0000Ur-Ub for bug-gnu-emacs@gnu.org; Sat, 14 May 2022 12:06:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53459) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1npuHK-0005qi-HU for bug-gnu-emacs@gnu.org; Sat, 14 May 2022 12:06:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1npuHK-0005ak-Be for bug-gnu-emacs@gnu.org; Sat, 14 May 2022 12:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 May 2022 16:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36566 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 36566-submit@debbugs.gnu.org id=B36566.165254435821483 (code B ref 36566); Sat, 14 May 2022 16:06:02 +0000 Original-Received: (at 36566) by debbugs.gnu.org; 14 May 2022 16:05:58 +0000 Original-Received: from localhost ([127.0.0.1]:47356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npuHF-0005aP-LN for submit@debbugs.gnu.org; Sat, 14 May 2022 12:05:57 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:19457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1npuHD-0005aB-M3 for 36566@debbugs.gnu.org; Sat, 14 May 2022 12:05:56 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id F19CB807BA; Sat, 14 May 2022 12:05:49 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 745EC80065; Sat, 14 May 2022 12:05:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1652544348; bh=u4lCBCqLZPmjaCFoXFs60+mYBTJR0tn+vcb5y7JPXWo=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cT/t6u90OaGkvvgseTbYEDwfG0iF6o6ktV20ORCsrhilpF1GywFO4U9HDpqi7tRbK aqjV98qC96sArj26/oP94EOtnkj0+mnvbX/Smeo5dfx40WFgjCN5LdPEriy252gOra sgeuFNQ9gCwPTH8XSYlTT3fQGwKxr0v4hH24D7p0tuJBqFLPgEJNjct3zSjchqjU96 tb4bXXPpyS9kCV8v2bC4SYFfttbEwTrILLylHiq+HC+QXOnV68GSt1VM1xmJh+0kb6 LM5NDnimfKwgxhqDHuSvSJkkVF+XuZj4727Ze4C+pIeXs6mJ5eVOH/IzOSiMYAepL2 nyFG42dbGxJIQ== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 35341120549; Sat, 14 May 2022 12:05:48 -0400 (EDT) In-Reply-To: <87lev4jeyq.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 14 May 2022 17:45:01 +0200") 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:232250 Archived-At: > The only issue is "oh no, not yet another printing variable" (that > people will be setting to 14 in ~/.emacs and then everything that does > `prin1' to write out data will fail). As someone requested long ago, we should have some way to "reset" the printing config context in a single step without having to mention individually each and every var. But maybe for this specific issue we could make it so `print-char-length` is only obeyed by `cl-print` (and only when `cl-print-readably` is nil) and not `prin1` (which is the function that prints in a machine-readable way and should hence arguably never truncate). > I did suggest (in conjunction with another bug report in this area) that > we should just extend `prin1{,-to-string}' with a parameter that would > set (on the C level) an equivalent variable. So we'd have > (prin1 object fun `((char-length . ,edebug-print-char-length))) > etc. (And `t' would be "all defaults".) Some kind of "print context" object would be good, indeed. Being able to set/modify this context "at a distance" via dynamic scoping is quite handy, tho, so we probably want to still support that as well. Here's an idea: a print context could include an `inherit` setting which says whether to "keep looking for more settings from the context". Then we printing we use settings from: - the explicit context passed as arg (if present). - the currently existing `print-` vars (if there isn't an explicit context arg whose `inherit` says not to do that). We could even go crazy and add an intermediate step to check a `print-context` var which contains such an object. Stefan