* bug#14764: 24.3.50; width control for pretty printing
@ 2013-07-01 22:01 Drew Adams
0 siblings, 0 replies; only message in thread
From: Drew Adams @ 2013-07-01 22:01 UTC (permalink / raw)
To: 14764
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=/c/Devel/emacs/binary --enable-checking=yes,glyphs
CFLAGS=-O0 -g3 LDFLAGS=-Lc:/Devel/emacs/lib
CPPFLAGS=-Ic:/Devel/emacs/include'
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-01 22:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 22:01 bug#14764: 24.3.50; width control for pretty printing Drew Adams
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).