From: "Drew Adams" <drew.adams@oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi@gnus.org>
Cc: 8452@debbugs.gnu.org
Subject: bug#8452: 24.0.50; doc of `pp' and related functions
Date: Sat, 2 Jul 2011 08:09:44 -0700 [thread overview]
Message-ID: <AFF18DFA02154BF79F101781407AAB1C@us.oracle.com> (raw)
In-Reply-To: <m3hb74vnhw.fsf@quimbies.gnus.org>
> > 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.
next prev parent reply other threads:[~2011-07-02 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2011-07-02 15:48 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AFF18DFA02154BF79F101781407AAB1C@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=8452@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.