From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#14764: 24.3.50; width control for pretty printing Date: Mon, 1 Jul 2013 15:01:03 -0700 (PDT) Message-ID: <07a367bb-81ff-431d-938a-eecf2d5b3de6@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1372716136 3329 80.91.229.3 (1 Jul 2013 22:02:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Jul 2013 22:02:16 +0000 (UTC) To: 14764@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 02 00:02:13 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UtmAm-0004gx-Tc for geb-bug-gnu-emacs@m.gmane.org; Tue, 02 Jul 2013 00:02:13 +0200 Original-Received: from localhost ([::1]:60039 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtmAm-0001VZ-Bu for geb-bug-gnu-emacs@m.gmane.org; Mon, 01 Jul 2013 18:02:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44933) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtmAh-0001VT-PG for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:02:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtmAd-0007F7-6W for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:02:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtmAd-0007F1-0V for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UtmAc-0005D1-4A for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 01 Jul 2013 22:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14764 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137271607719969 (code B ref -1); Mon, 01 Jul 2013 22:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jul 2013 22:01:17 +0000 Original-Received: from localhost ([127.0.0.1]:51142 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Utm9t-0005C1-22 for submit@debbugs.gnu.org; Mon, 01 Jul 2013 18:01:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:42754) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Utm9r-0005Bm-Dv for submit@debbugs.gnu.org; Mon, 01 Jul 2013 18:01:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utm9l-00071g-7Y for submit@debbugs.gnu.org; Mon, 01 Jul 2013 18:01:10 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:58527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utm9l-00071c-4T for submit@debbugs.gnu.org; Mon, 01 Jul 2013 18:01:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utm9k-00011P-1M for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:01:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utm9i-0006zq-Pv for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:01:07 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:38271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utm9i-0006xl-J2 for bug-gnu-emacs@gnu.org; Mon, 01 Jul 2013 18:01:06 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r61LsjsL017905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 1 Jul 2013 21:54:45 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r61M13Zc004417 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 1 Jul 2013 22:01:04 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r61M13Kt025428 for ; Mon, 1 Jul 2013 22:01:03 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75780 Archived-At: Enhancement Emacs Lisp pretty printing to offer the equivalent of Common Lisp's width-controlling features. This would be useful for fixing bug #14754, for instance. >From Common Lisp the Language, 2nd Edition, section 27.2, Pretty Printing Control Variables: [Variable] *print-right-margin* A primary goal of pretty printing is to keep the output between a pair of margins. The left margin is set at the column where the output begins. If this cannot be determined, the left margin is set to zero. When *print-right-margin* is not nil, it specifies the right margin to use when making layout decisions. When *print-right-margin* is nil (the initial value), the right margin is set at the maximum line length that can be displayed by the output stream without wraparound or truncation. If this cannot be determined, the right margin is set to an implementation-dependent value. To allow for the possibility of variable-width fonts, *print-right-margin* is in units of ems-the width of an ``m'' in the font being used to display characters on the relevant output stream at the moment when the variables are consulted. [Variable] *print-miser-width* If *print-miser-width* is not nil, the pretty printer switches to a compact style of output (called miser style) whenever the width available for printing a substructure is less than or equal to *print-miser-width* ems. The initial value of *print-miser-width* is implementation-dependent. Note: "A PRIMARY GOAL OF PRETTY PRINTING is to keep the output between a pair of margins." That's the point of this enhancement request. Once pretty printing has this control, please incorporate it into common commands, such as `C-M-q', via a prefix arg for example. In GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-06-27 on ODIEONE Bzr revision: 113205 dgutov@yandex.ru-20130627095155-f1lv1c7xf99g1sss Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --prefix=3D/c/Devel/emacs/binary --enable-checking=3Dyes,glyphs CFLAGS=3D-O0 -g3 LDFLAGS=3D-Lc:/Devel/emacs/lib CPPFLAGS=3D-Ic:/Devel/emacs/include'