From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#63861: [PATCH] pp.el: New "pretty printing" code Date: Mon, 05 Jun 2023 19:12:49 +0300 Organization: LINKOV.NET Message-ID: <86r0qqnjce.fsf@mail.linkov.net> References: <83fs799jmi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28579"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) Cc: eliz@gnu.org, monnier@iro.umontreal.ca To: 63861@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 05 18:41:12 2023 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 1q6DGY-0007KG-R6 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 05 Jun 2023 18:41:10 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6DGT-0004r4-EM; Mon, 05 Jun 2023 12:41:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6DGR-0004pD-01 for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 12:41:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q6DGQ-0004eh-1Y for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 12:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6DGP-0004rW-Tm for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 12:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 05 Jun 2023 16:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63861 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" X-Debbugs-Original-Cc: Eli Zaretskii , 63861@debbugs.gnu.org, Stefan Monnier Original-Received: via spool by submit@debbugs.gnu.org id=B.168598320418588 (code B ref -1); Mon, 05 Jun 2023 16:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 5 Jun 2023 16:40:04 +0000 Original-Received: from localhost ([127.0.0.1]:50265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6DFT-0004pc-Rl for submit@debbugs.gnu.org; Mon, 05 Jun 2023 12:40:04 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:46730) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6DFS-0004oy-6K for submit@debbugs.gnu.org; Mon, 05 Jun 2023 12:40:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6DFR-0004UB-US for bug-gnu-emacs@gnu.org; Mon, 05 Jun 2023 12:40:01 -0400 Original-Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6DFQ-00045S-CV; Mon, 05 Jun 2023 12:40:01 -0400 X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net X-GND-Sasl: juri@linkov.net Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 210FBE000B; Mon, 5 Jun 2023 16:39:55 +0000 (UTC) In-Reply-To: (Stefan Monnier via's message of "Sat, 03 Jun 2023 14:18:36 -0400") Received-SPF: pass client-ip=2001:4b98:dc4:8::224; envelope-from=juri@linkov.net; helo=relay4-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263024 Archived-At: > FWIW, the change affects other functionality that uses `pp`, such as > `C-h v`. While working on (previous versions of) this code, I've had > performance problems show up during the generation of `emoji-labels.el`. When tried on emoji-labels.el, at the end it failed with (scan-error "Containing expression ends prematurely" 255866 255867) >> Also, I think this warrants a NEWS entry and should be documented in >> the ELisp manual. > > Definitely for NEWS, yes. For the ELisp manual, currently we don't > document `pp-buffer`, the closest I see is `indent-pp-sexp` (in > `programs.texi`). For indent-pp-sexp with a prefix arg used on defuns, the new version is much better - it makes code more readable. It has only one snag: it inserts an empty line between the defun line and the docstring.