From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: Small docstring improvements Date: Sat, 20 Aug 2016 15:59:54 +0000 Message-ID: References: <83shtzdijr.fsf@gnu.org> <83eg5jcv3q.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b5d43f893a318053a82e83b X-Trace: blaine.gmane.org 1471708970 7650 195.159.176.226 (20 Aug 2016 16:02:50 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 20 Aug 2016 16:02:50 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Aug 20 18:02:46 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bb8jN-0001j4-Sm for ged-emacs-devel@m.gmane.org; Sat, 20 Aug 2016 18:02:46 +0200 Original-Received: from localhost ([::1]:33631 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb8jL-0007jK-4i for ged-emacs-devel@m.gmane.org; Sat, 20 Aug 2016 12:02:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb8gs-0005uy-E6 for emacs-devel@gnu.org; Sat, 20 Aug 2016 12:00:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bb8gr-0003Av-BL for emacs-devel@gnu.org; Sat, 20 Aug 2016 12:00:10 -0400 Original-Received: from mail-wm0-x22c.google.com ([2a00:1450:400c:c09::22c]:38076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bb8go-00037l-MQ; Sat, 20 Aug 2016 12:00:06 -0400 Original-Received: by mail-wm0-x22c.google.com with SMTP id o80so81829208wme.1; Sat, 20 Aug 2016 09:00:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jDwuHuNzBAczTUEQ9EHEAzwqdYtP9gcRDkwg/tulY9I=; b=t1OzWztvL5YzctxSV31D068Euc1GWqJRNDeqKD19aYE5Zud5JwTgxFi/eeFhA+tlIx Hx8FPxE0aTt7i1cPfsqfN6tu+LZRLGa+Cw+n2VMMzz4E8wMHDZM4fD40ltpGLEwYI8n0 pPJwziGWfomaYeI0OeHm3XDzbdQl4TvnWs21XOP6R5cTW0gm183k2NcBniyS0Wh9rXkl eDf4/Ehux7xbDV3tau8I7qgBRwrtBrMTjXTRz9lba/YOaUHpOexjy17cKxjj2DC3RqIy Bs7Okc73VdowVtt1DZq5HeR/ROClleRM08xd+YFOy5TlIXG6wGeY39bVJYwk0rps+XTt qVwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jDwuHuNzBAczTUEQ9EHEAzwqdYtP9gcRDkwg/tulY9I=; b=JkLa/WL6esD9EiTic7+ahs2buqGOC4HMN1an0blBTKOzwCGD90tMGOWG0r3y1W85+D fCwPeqEmPWg6/ZQFghn3mHWUJd8fI9mafVXh+YVZSDHOnQ7vwUsz3J4B4nvLwyXNWa4X 2ut4Ka+zi4ae127IXyhlFCzQqly4dGdmf7gJsp+JLC5As/xyeBSbcZd36fMxoNCbRtO3 WUD88dq14o2Snxnlghqwxoak4RTZzHBUBza48Eobu2OPzCBaH5GjE967FJKIMKpatra8 fq2bBSOU0dOXgz8EbzO9f29tS/KEGHlL0VpCuAslHOefYBxdA/vSiO8kOVs94Q3vpo5z WLLA== X-Gm-Message-State: AEkooutL/GPv5saUscp3lAak/IynhXlHggcooI2sOvhMhtvrWyYYvJowAR7j9WnSGa2tklU7PxoK6R/8I0Qm5g== X-Received: by 10.194.6.229 with SMTP id e5mr10237831wja.85.1471708805700; Sat, 20 Aug 2016 09:00:05 -0700 (PDT) In-Reply-To: <83eg5jcv3q.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:206704 Archived-At: --047d7b5d43f893a318053a82e83b Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii schrieb am Sa., 20. Aug. 2016 um 17:34 Uhr: > > > +This does not take narrowing into account; to count the number of > > > +characters in the accessible portion of the buffer, use > > > +=E2=80=98(- (point-max) (point-min))=E2=80=99. */) > > > > 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. A= t > least I wouldn't want to search the Elisp > > manual for additional information unless really necessary. I'd reword i= t > 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. > OK, then I'd append ", and to count the number of characters in some other BUFFER, use `(with-current-buffer BUFFER (- (point-max) (point-min)))'.". --047d7b5d43f893a318053a82e83b Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Sa., 20. Aug. 2016 um 17:34=C2=A0Uhr:
>=C2=A0 > +This does not take narrowing into account; to count th= e number of
>=C2=A0 > +characters in the accessible portion of the buffer, use >=C2=A0 > +=E2=80=98(- (point-max) (point-min))=E2=80=99. */)
>
>=C2=A0 The advice in the last sentence doesn't work when BUFFER is = non-nil.
>=C2=A0 (I actually doubt that the advice is needed here; it's enoug= h to have
>=C2=A0 something like that in the ELisp manual -- which already hints o= n
>=C2=A0 that, but maybe we should make that more explicit.
>
> I'd prefer a bit of redundancy in a very basic function such as th= is. At least I wouldn't want to search the Elisp
> manual for additional information unless really necessary. I'd rew= ord 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.

OK, = then I'd append ", and to count the number of characters
in some other BUFFER, use
`(with-current-buffer BUFFER (- (point= -max) (point-min)))'.".=C2=A0
--047d7b5d43f893a318053a82e83b--