From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#67217: [PATCH] Improve docstring argument conventions Date: Thu, 16 Nov 2023 23:55:29 +0000 Message-ID: <87v8a1tfoo.fsf@jeremybryant.net> References: <874jhmvapa.fsf@jeremybryant.net> <83y1eyp6l4.fsf@gnu.org> Reply-To: Jeremy Bryant Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37159"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67217@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 17 00:58:08 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r3mFL-0009Vt-VS for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 17 Nov 2023 00:58:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3mFH-0007jA-Vw; Thu, 16 Nov 2023 18:58:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3mFG-0007ie-JE for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 18:58:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3mFG-0001Hw-Aw for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 18:58:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3mFG-0005Ra-69 for bug-gnu-emacs@gnu.org; Thu, 16 Nov 2023 18:58:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jeremy Bryant Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 16 Nov 2023 23:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67217 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 67217-submit@debbugs.gnu.org id=B67217.170017903920874 (code B ref 67217); Thu, 16 Nov 2023 23:58:02 +0000 Original-Received: (at 67217) by debbugs.gnu.org; 16 Nov 2023 23:57:19 +0000 Original-Received: from localhost ([127.0.0.1]:44872 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3mEY-0005Qc-Fm for submit@debbugs.gnu.org; Thu, 16 Nov 2023 18:57:18 -0500 Original-Received: from out-173.mta1.migadu.com ([2001:41d0:203:375::ad]:54570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3mEV-0005QQ-Rp for 67217@debbugs.gnu.org; Thu, 16 Nov 2023 18:57:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeremybryant.net; s=key1; t=1700179033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Xda939QXz8dwIn0lTgqobs46SzbEd2A0hZbDGvF6HHI=; b=OzpVbqQWXlTDzwgJ8mrNTqNVN9hXfIzI8q9QEfXAgg8Ns5aYheOd6R7ENFzqyy9Ka7HzMh Q/opEU2XMp3T5rrY8oXTdtSvLvpMtIor2VEB3ythnaWTh1/6U/7wsAKVzIEdzmcNlPRvmm LSxLWWhIajGYp3m4sAVoV3b4qV96JZ3IQ1cWcO9ftluOLPvF4rN5S8A5WQXB7gdr+aumLu vAOoNFKL4fmksycrYnAAHHTML9HOCkPCvO9kH5dtBxdC9dzdmILmfm+5GpzLbq6HvfOBgb HNmaYDTtB/BIokUhiBWjxnid9k3HQsj6jEIA78QmCgMUbSnmRj7TcwXtX9jioA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-reply-to: <83y1eyp6l4.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274485 Archived-At: Eli Zaretskii writes: >> Date: Wed, 15 Nov 2023 23:47:35 +0000 >> From: Jeremy Bryant via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> Eli, following this convention mentioned in a recent bug, >>=20 >> > The first sentence of a doc string should preferably mention the >> > mandatory arguments (TYPE and ARG). If the result is too long to fit >> > on a single line, consider saying only the main part there, and then >> > describing the details in the following lines. >>=20 >> It doesn't appear to me to be in the manual. > > Yes, it does: > > =E2=80=A2 The first line should mention all the important arguments of= the > function, and should mention them in the order that they are > written in a function call. If the function has many arguments, > then it is not feasible to mention them all in the first line; in > that case, the first line should mention the first few arguments, > including the most important arguments. > >> diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi >> index f760b2554f0..9f1c15525cb 100644 >> --- a/doc/lispref/tips.texi >> +++ b/doc/lispref/tips.texi >> @@ -642,7 +642,8 @@ Documentation Tips >> in a function call. If the function has many arguments, then it is >> not feasible to mention them all in the first line; in that case, the >> first line should mention the first few arguments, including the most >> -important arguments. >> +important arguments. Mandatory arguments should be documented before >> +optional arguments. > > What you suggest to add is already there: it says to mention the > arguments in the order they are written in the signature, which means > mandatory first, then the optional ones (if they are important > enough). > > What I said was the usual interpretation of "most important", nothing > more, nothing less. My intent was that the optional variables don't > need to be mentioned if that is somehow unneeded or impractical or > something else, but the mandatory ones should generally be mentioned. > The manual says the same using a different wording. > > So let me turn the table and ask you: why did you think the existing > text is insufficient in this aspect? I thought your wording was clearer than the manual and proposed adapting the manual to your wording and to be more explicit about mandatory and opti= onal. I accept that it is comparable.