Subject: bug#23067: 25.0.92; A detail in the doc of query-replace

From: Drew Adams <[email-masked]>
Date: Fri, 25 Mar 2016 07:13:48 -0700 (PDT)

> > "In Transient Mark mode, if the mark is active, operate on the contents
> > of the region.  Otherwise, operate from point to the end of the buffer."
> >
> > I think the second sentence is confusing (wrong).  The command operates
> > up to `point-max'.
> 
> Thanks.  I fixed the doc string of this function (and of a few others
> in the same file).
> 
> However, I must say that it makes very little sense to me to make such
> corrections only in a couple of functions, when we have gobs of them
> with the same problem in the doc strings, so much so that I wonder
> whether "end of buffer" isn't already a widely accepted synonym of
> "end of the buffer's accessible portion", and we shouldn't bother,
> certainly not with fixing that one function at a time.  I won't be
> surprised if the same issue has crept in the manuals as well.
> 
> Please, let's not start another prolonged dispute that leads nowhere.
> Instead, if someone really thinks this stuff should be spelled out in
> documentation, that someone is kindly requested to submit a patch that
> fixes _all_ of the instances where we don't say that explicitly.  TIA.

There's another way to look at this that occurs to me.  It is also
perhaps not without some ambiguity, but it might nevertheless help.

"End of buffer" can be regarded as `point-max'.

This is what we say in the doc string of the predicate (`eobp') that
determines (tests for) end-of-buffer-ness:

 Return t if point is at the end of the buffer.
                         ^^^^^^^^^^^^^^^^^^^^^
 If the buffer is narrowed, this means the end of the narrowed part.
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Notice too that even though this is a predicate for Lisp, and you
would expect its doc to be aimed at Lisp programmers and not just
non-Lisper users, it does not mention `point-max'.

Again, yes, there is some perhaps inherent ambiguity in using the
term "end of the buffer" this way.  But it might help, in general.