GNU bug report logs - #14764
24.3.50; width control for pretty printing

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Drew Adams <drew.adams@HIDDEN>; merged with #11934, #14754; dated Mon, 1 Jul 2013 22:02:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Forcibly Merged 11934 14754 14764. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 1 Jul 2013 22:01:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 01 18:01:17 2013
Received: from localhost ([127.0.0.1]:51142 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Utm9t-0005C1-22
	for submit <at> debbugs.gnu.org; Mon, 01 Jul 2013 18:01:17 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42754)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1Utm9r-0005Bm-Dv
 for submit <at> debbugs.gnu.org; Mon, 01 Jul 2013 18:01:16 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Utm9l-00071g-7Y
 for submit <at> debbugs.gnu.org; Mon, 01 Jul 2013 18:01:10 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:58527)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Utm9l-00071c-4T
 for submit <at> debbugs.gnu.org; Mon, 01 Jul 2013 18:01:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44469)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Utm9k-00011P-1M
 for bug-gnu-emacs@HIDDEN; Mon, 01 Jul 2013 18:01:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Utm9i-0006zq-Pv
 for bug-gnu-emacs@HIDDEN; Mon, 01 Jul 2013 18:01:07 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:38271)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1Utm9i-0006xl-J2
 for bug-gnu-emacs@HIDDEN; Mon, 01 Jul 2013 18:01:06 -0400
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 <bug-gnu-emacs@HIDDEN>; Mon, 1 Jul 2013 21:54:45 GMT
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 <bug-gnu-emacs@HIDDEN>; Mon, 1 Jul 2013 22:01:04 GMT
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 <bug-gnu-emacs@HIDDEN>; Mon, 1 Jul 2013 22:01:03 GMT
MIME-Version: 1.0
Message-ID: <07a367bb-81ff-431d-938a-eecf2d5b3de6@default>
Date: Mon, 1 Jul 2013 15:01:03 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; width control for pretty printing
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7  (607090) [OL
 12.0.6668.5000 (x86)]
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
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-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

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@HIDDEN
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'




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#14764; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 29 Apr 2016 00:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.