unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8452: 24.0.50; doc of `pp' and related functions
@ 2011-04-08 17:30 Drew Adams
  2011-07-02 13:08 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2011-04-08 17:30 UTC (permalink / raw)
  To: 8452

1. Please add to the doc (e.g. doc strings) for `pp' and similar
functions a mention of the various `print-*' variables that are
respected and (if any) not respected.  In particular, `print-circle'.
 
2. Please document `pp' and its relatives in the Elisp manual, and index
them.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-04-04 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/imagesupport/include'
 






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#8452: 24.0.50; doc of `pp' and related functions
  2011-04-08 17:30 bug#8452: 24.0.50; doc of `pp' and related functions Drew Adams
@ 2011-07-02 13:08 ` Lars Magne Ingebrigtsen
  2011-07-02 15:09   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-02 13:08 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8452

"Drew Adams" <drew.adams@oracle.com> writes:

> 1. Please add to the doc (e.g. doc strings) for `pp' and similar
> functions a mention of the various `print-*' variables that are
> respected and (if any) not respected.  In particular, `print-circle'.

I've had a look at the source code, and as far as I can see, it doesn't
handle any of the `print-*' variables explicitly, but leaves that to
princ and friends.

So I don't think there's anything there much to add to the doc strings.

> 2. Please document `pp' and its relatives in the Elisp manual, and index
> them.

Ok; done.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#8452: 24.0.50; doc of `pp' and related functions
  2011-07-02 13:08 ` Lars Magne Ingebrigtsen
@ 2011-07-02 15:09   ` Drew Adams
  2011-07-02 15:48     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2011-07-02 15:09 UTC (permalink / raw)
  To: 'Lars Magne Ingebrigtsen'; +Cc: 8452

> > 1. Please add to the doc (e.g. doc strings) for `pp' and similar
> > functions a mention of the various `print-*' variables that are
> > respected and (if any) not respected.  In particular, 
> > `print-circle'.
> 
> I've had a look at the source code, and as far as I can see, 
> it doesn't handle any of the `print-*' variables explicitly,
> but leaves that to princ and friends.
> 
> So I don't think there's anything there much to add to the 
> doc strings.

1. Users should not need to dive into the `pp' source code to discover its
behavior.  The doc string should describe that.  And its behavior is designed to
change with these vars.  Those behavior differences need to be pointed out.

Those print-* vars are specifically designed to influence the behavior of the
print functions, and the doc for the print functions should call that out.  It's
about the behavior ("interface") of the function, not its implementation.


2. That `pp' does its work using `princ' etc. is irrelevant to describing its
behavior.  Unless, that is, we must punt for some reason and explicitly say "see
XYZ for how `pp' behaves with respect to variables A, B, C".

If you do that, OK.  But that would likely be more long-winded than to just say
directly that the behavior of `pp' depends on those vars.  In general, it is
better for the behavior of `pp' to be called out in its own doc, rather than to
refer to the behavior of other functions.  It's about user convenience - why add
indirection?


3. This bug is not just about `pp'.  It is about (the doc of)
"`pp' and similar functions":  

pp
pp-buffer
pp-display-expression
pp-eval-expression 
pp-eval-last-sexp
pp-last-sexp
pp-macroexpand-expression 
pp-macroexpand-last-sexp
pp-to-string

Some of these are even commands.  Users should especially know about the command
behaviors wrt the print-* vars.  Variable `print-circle' is even
`user-variable-p': a variable intended to be modified by users.


> > 2. Please document `pp' and its relatives in the Elisp 
> >    manual, and index them.
> 
> Ok; done.

Thanks.






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#8452: 24.0.50; doc of `pp' and related functions
  2011-07-02 15:09   ` Drew Adams
@ 2011-07-02 15:48     ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-07-02 15:48 UTC (permalink / raw)
  To: Drew Adams; +Cc: 8452

"Drew Adams" <drew.adams@oracle.com> writes:

> 1. Users should not need to dive into the `pp' source code to discover
> its behavior.  The doc string should describe that.  And its behavior
> is designed to change with these vars.  Those behavior differences
> need to be pointed out.

Not even `princ' describes what is does with the myriad `print-*'
variables.  I think the assumption is that someone who uses the Lisp
printer are aware that these things exist, and repeating it in all the
print-related function is unnecessary.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-02 15:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 17:30 bug#8452: 24.0.50; doc of `pp' and related functions Drew Adams
2011-07-02 13:08 ` Lars Magne Ingebrigtsen
2011-07-02 15:09   ` Drew Adams
2011-07-02 15:48     ` Lars Magne Ingebrigtsen

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).