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#63861: [PATCH] pp.el: New "pretty printing" code Date: Wed, 07 Jun 2023 11:48:32 -0400 Message-ID: References: <83fs799jmi.fsf@gnu.org> <871qirdi3a.fsf@gmail.com> 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="34595"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 63861@debbugs.gnu.org To: Visuwesh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 07 17:49:25 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 1q6vPY-0008ls-56 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 07 Jun 2023 17:49:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q6vPD-0008Rp-Qr; Wed, 07 Jun 2023 11:49:03 -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 1q6vPC-0008RN-OP for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2023 11:49:02 -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 1q6vPC-0003JM-GQ for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2023 11:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q6vPB-0005Vu-Qy for bug-gnu-emacs@gnu.org; Wed, 07 Jun 2023 11:49:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Jun 2023 15:49: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 Original-Received: via spool by 63861-submit@debbugs.gnu.org id=B63861.168615292121158 (code B ref 63861); Wed, 07 Jun 2023 15:49:01 +0000 Original-Received: (at 63861) by debbugs.gnu.org; 7 Jun 2023 15:48:41 +0000 Original-Received: from localhost ([127.0.0.1]:54572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6vOr-0005VC-J5 for submit@debbugs.gnu.org; Wed, 07 Jun 2023 11:48:41 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6vOp-0005Uo-Uf for 63861@debbugs.gnu.org; Wed, 07 Jun 2023 11:48:40 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A4C501000C3; Wed, 7 Jun 2023 11:48:34 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9B65610002F; Wed, 7 Jun 2023 11:48:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1686152913; bh=zWc3UxkpG27Vw1j5ec3WMcgGfbiQMjTvdxOkV4Z9hRY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Fa9xQBfAx6ssp/WdJRb52reel6AJp2fmiG5HiZ/o13Rr8AFMaB/9wKTT36tofgWQp /0UAZE0SmchlguCBF8w8K0VKrg4SE0BhoOBE/SDrAXos6wto1liEozuhP9Qg/CIuw9 7fjejIUlazwKNzCHEhiY9tYVGDZ49Y32bB/yWBeRlNO2StvxIo9w0x0Hln7e9w8Ycv nlyawbH4i5+jaFu4C6m/8611TxH8NFwC5ArMCoRsdaLnhmCi+LHcSCTjoALj+Njyi+ HTHeHs9nJCf+z144CEXizkcEUfjJlWhsE8GV74Os3nR3dhYq2keSrz3UDsGpeN8k0m idKvD5Ha692jA== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 609C812029C; Wed, 7 Jun 2023 11:48:33 -0400 (EDT) In-Reply-To: <871qirdi3a.fsf@gmail.com> (Visuwesh's message of "Sun, 04 Jun 2023 08:55:29 +0530") 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:263078 Archived-At: > BTW, how does this compare to the newly added `pp-emacs-lisp-code`? Very good question. I had completely missed that (and its `pp-use-max-width`). This points to a host of integration issues between my code and the existing code. I'll have to take a deeper look. > It was still rough around the edges the last time I set > `pp-use-max-width' non-nil. It is also quite a lot slower than the > old path. My new code is expected to be slower than the "normal" pretty-printer, but barring performance bugs in `lisp-indent-line` (such as the one fixed by the patch I just sent to Thierry) it should be approximately a constant factor slower. AFAICT the performance of `pp-emacs-lisp-code` can be more problematic. Beside performance, I guess the behavior of the two should be somewhat similar, tho I also see that `pp-emacs-lisp-code` pays attention to the Edebug and `doc-string-elt` info, so it may give slightly more refined info. Another difference is that `pp-emacs-lisp-code` starts with an S-exp object, whereas my code starts with a region (i.e. an sexp that's already been printed). Stefan