From: Eli Zaretskii <eliz@gnu.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Small docstring improvements
Date: Sat, 20 Aug 2016 18:34:33 +0300 [thread overview]
Message-ID: <83eg5jcv3q.fsf@gnu.org> (raw)
In-Reply-To: <CAArVCkT921ip807Dyhuw_Fv4ZM2vWk-V0dN3bpTbtn4kbxWBUQ@mail.gmail.com> (message from Philipp Stephani on Sat, 20 Aug 2016 13:52:03 +0000)
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 20 Aug 2016 13:52:03 +0000
> Cc: emacs-devel@gnu.org
>
> > +If START is nil, that means to use the entire buffer contents; END is
> > +ignored.
>
> "the entire accessible portion of the buffer" is more accurate than
> "the entire buffer contents", when narrowing is in effect.
>
> That would be incorrect, as these functions ignore narrowing.
You are right, I didn't see that write_region calls widen. Sorry.
> > +This does not take narrowing into account; to count the number of
> > +characters in the accessible portion of the buffer, use
> > +‘(- (point-max) (point-min))’. */)
>
> The advice in the last sentence doesn't work when BUFFER is non-nil.
> (I actually doubt that the advice is needed here; it's enough to have
> something like that in the ELisp manual -- which already hints on
> that, but maybe we should make that more explicit.
>
> I'd prefer a bit of redundancy in a very basic function such as this. At least I wouldn't want to search the Elisp
> manual for additional information unless really necessary. I'd reword it to "the accessible portion of the current
> buffer".
If we want to give advice like that, IMO we should also give such an
advice for when BUFFER is non-nil.
next prev parent reply other threads:[~2016-08-20 15:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 19:26 Small docstring improvements Philipp Stephani
2016-08-19 19:34 ` John Wiegley
2016-08-19 20:34 ` Philipp Stephani
2016-08-19 21:12 ` John Wiegley
2016-08-19 22:04 ` Drew Adams
2016-08-20 0:24 ` John Wiegley
2016-08-20 7:10 ` Eli Zaretskii
2016-08-20 23:17 ` John Wiegley
2016-08-19 21:59 ` Dmitry Gutov
2016-08-20 7:08 ` Eli Zaretskii
2016-08-20 13:52 ` Philipp Stephani
2016-08-20 15:34 ` Eli Zaretskii [this message]
2016-08-20 15:59 ` Philipp Stephani
2016-08-20 16:11 ` Eli Zaretskii
2016-08-20 18:00 ` Philipp Stephani
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=83eg5jcv3q.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=p.stephani2@gmail.com \
/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.