GNU bug report logs -
#14764
24.3.50; width control for pretty printing
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Mon, 1 Jul 2013 22:02:01 UTC
Severity: wishlist
Merged with 11934,
14754
Found in versions 24.1, 24.3.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> yandex.ru-20130627095155-f1lv1c7xf99g1sss
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/binary --enable-checking=yes,glyphs
CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
CPPFLAGS=-Ic:/Devel/emacs/include'
This bug report was last modified 2 years and 343 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.