From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Visuwesh Newsgroups: gmane.emacs.bugs Subject: bug#63861: [PATCH] pp.el: New "pretty printing" code Date: Sun, 04 Jun 2023 08:55:29 +0530 Message-ID: <871qirdi3a.fsf@gmail.com> References: <83fs799jmi.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2715"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 63861@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 04 05:26:30 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 1q5eNx-0000ZM-EI for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 04 Jun 2023 05:26:29 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q5eNX-0005LN-Ot; Sat, 03 Jun 2023 23:26: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 1q5eNW-0005LD-DB for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 23:26: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 1q5eNW-0003OZ-4e for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 23:26:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q5eNV-0007lj-Mi for bug-gnu-emacs@gnu.org; Sat, 03 Jun 2023 23:26:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Visuwesh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 04 Jun 2023 03:26: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.168584914329832 (code B ref 63861); Sun, 04 Jun 2023 03:26:01 +0000 Original-Received: (at 63861) by debbugs.gnu.org; 4 Jun 2023 03:25:43 +0000 Original-Received: from localhost ([127.0.0.1]:44592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5eND-0007l6-1a for submit@debbugs.gnu.org; Sat, 03 Jun 2023 23:25:43 -0400 Original-Received: from mail-pf1-f193.google.com ([209.85.210.193]:58642) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q5eN8-0007kk-8H for 63861@debbugs.gnu.org; Sat, 03 Jun 2023 23:25:41 -0400 Original-Received: by mail-pf1-f193.google.com with SMTP id d2e1a72fcca58-65299178ac5so2942982b3a.1 for <63861@debbugs.gnu.org>; Sat, 03 Jun 2023 20:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685849132; x=1688441132; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x0G98lNJMOPAaEylLGxqWp7ZBiNZdZ4xF+Cwpa46Mdo=; b=VEnUf3lFaP6WRx7SasN8+Xx2DMCQMB/B0UhEV40G6Sp/kUoBopqCxbYwoR4g1JgxD2 o2gA/v0gnvuW/SMXCxF+Lqx7XfLkf3pTf0AON1B93FekatjgE7jWLkOLXtFy+xjYSZMa zysmBd9D7tBuvkuNqX2JZW0OonyTR051pQyMCBfzT2OCOeYLsXhn+6Wvabb5OdyDXqE1 160p+Xa1t5PxbT+G00mLnW6LVX1Hvp0cwsI2Fw3frDd+xSDMTY4rlTSB0bF05dHIVhts mOLv2a5niTqgq1dfH+n48bulFSyAArWhKPLE8zdz/DNkdyNfxyH0H4Q3c/OeGZTu7nZQ lu5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685849132; x=1688441132; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=x0G98lNJMOPAaEylLGxqWp7ZBiNZdZ4xF+Cwpa46Mdo=; b=NjoG80mG8QBcM82aRDRnoETiqvI/QZCtXV2yamje+osN98BXIMk7Vvk3/ykTEtO/9u rzjO3H2q/+KDp/T1kC1L36yN/dYN56GPJie6br/y4F0qN/BIlQ+Egt+/SchsEf+FXgIs JREcfoPiSkVqO94k1qWKZ46OedGddmFgKJe3JyXrwMWtpu5BBlVH/7UIPtU+jFJ2/SRZ VKUQQ1y2Iwx9itq+Yb0wMx45zKjnisjy2l49gBcPq7m+E9TCG6D3ia2LoOJn7aWQ1Vfa IdDDFuRdxnnCBkfHKaIb65vnXcABP8075JzGwiR/uw6a5q6o9lFZNZ4MJnZVmWr8L0HF f+pg== X-Gm-Message-State: AC+VfDy9mFr2zhkxWBxZlPhZcMWq0UZlahLZkrQBfow21Zq22kHdzQIV Hdz0ZE7jICkQPggrPILc0Ew= X-Google-Smtp-Source: ACHHUZ5rXfqqW5y2EN865Zjiw7h8D6JP3LMux60LcE4GOFwt6Mixrw6Q+8wTrPjVkZHJSo/oGtN+Vg== X-Received: by 2002:a05:6a20:a204:b0:101:4e04:cef1 with SMTP id u4-20020a056a20a20400b001014e04cef1mr2730263pzk.27.1685849131840; Sat, 03 Jun 2023 20:25:31 -0700 (PDT) Original-Received: from localhost ([49.204.116.165]) by smtp.gmail.com with ESMTPSA id y14-20020a655b4e000000b0053b9bb98331sm3173543pgr.20.2023.06.03.20.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Jun 2023 20:25:31 -0700 (PDT) In-Reply-To: (Stefan Monnier via's message of "Sat, 03 Jun 2023 14:18:36 -0400") 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:262893 Archived-At: [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=9C=E0=AF=82=E0=AE=A9=E0=AF=8D 03, 2023]= Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of tex= t editors" wrote: > Hmm... so you think it should stay as a `defcustom` and we should thus > plan to keep both kinds of pretty-printing in the long term? > I mostly intended it to be a temporary knob for people to be able to try > the new code and easily compare with the old (or revert to the old when > bumping into a problem with the new). > > If so, we should probably think of better names to distinguish the two > pp styles than `pp-buffer` vs `pp-region`. Maybe `pp-fill` for the new > code since arguably the main difference is that the new code pays > attention to `fill-column`? I don't have a good idea for a name for the > old code, OTOH (and I think it would make sense to keep `pp-buffer` as > a dispatch between the two options, so it would be good to have > a separate name for the old style). > > Another difference might be that the new style is maybe aimed more at > pp'ing code than data, whereas the old style might be a bit more > "agnostic" to the definition. Yet another difference is that the old > code tends to use more lines (because it doesn't try to fill the line > upto `fill-column`) and occasionally outputs very long lines because it > only breaks lines near parentheses. BTW, how does this compare to the newly added `pp-emacs-lisp-code'? 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.