GNU bug report logs - #8452
24.0.50; doc of `pp' and related functions

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Fri, 8 Apr 2011 17:31:02 UTC

Severity: minor

Tags: fixed

Found in version 24.0.50

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #15 received at 8452 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 8452 <at> debbugs.gnu.org
Subject: RE: bug#8452: 24.0.50; doc of `pp' and related functions
Date: Sat, 2 Jul 2011 08:09:44 -0700
> > 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.





This bug report was last modified 14 years and 21 days ago.

Previous Next


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