From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50658: Error messages including function names violates coding conventions Date: Sat, 18 Sep 2021 14:08:38 +0300 Message-ID: <83y27u5efd.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28996"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50658@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 18 13:28:10 2021 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 1mRYVu-0007LT-At for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Sep 2021 13:28:10 +0200 Original-Received: from localhost ([::1]:57646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRYVs-0004Av-No for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Sep 2021 07:28:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRYVm-00048s-8R for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 07:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50413) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mRYVl-0003IZ-V9 for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 07:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mRYVl-0002PE-MO for bug-gnu-emacs@gnu.org; Sat, 18 Sep 2021 07:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Sep 2021 11:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50658 X-GNU-PR-Package: emacs Original-Received: via spool by 50658-submit@debbugs.gnu.org id=B50658.16319644769235 (code B ref 50658); Sat, 18 Sep 2021 11:28:01 +0000 Original-Received: (at 50658) by debbugs.gnu.org; 18 Sep 2021 11:27:56 +0000 Original-Received: from localhost ([127.0.0.1]:33726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRYVf-0002Ot-Te for submit@debbugs.gnu.org; Sat, 18 Sep 2021 07:27:56 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:38154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mRYVd-0002Og-U6 for 50658@debbugs.gnu.org; Sat, 18 Sep 2021 07:27:54 -0400 Original-Received: from [2001:470:142:3::e] (port=49552 helo=fencepost.gnu.org) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRYDB-0002k9-U2; Sat, 18 Sep 2021 07:08:49 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2821 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRYDB-0005fb-HB; Sat, 18 Sep 2021 07:08:49 -0400 In-Reply-To: (message from Stefan Kangas on Sat, 18 Sep 2021 03:52:54 -0700) 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" Xref: news.gmane.io gmane.emacs.bugs:214616 Archived-At: > From: Stefan Kangas > Date: Sat, 18 Sep 2021 03:52:54 -0700 > > We currently have a whole lot of places in Emacs where the error message > include the function name that they come from, such as: > > (error "ad-read-advised-function: There are no advised functions") > > This violates our coding convention in `(elisp) Programming Tips': > > • An error message should start with a capital letter but should not > end with a period. > > These cases are all flagged by checkdoc when it tries to enforce the > above convention. I think it's a bug in checkdoc: the error message text, which excludes the function name, fulfills the requirement. > If we do care, I see three options: > > 1. We decide on some format for how to type out the function name that > does not put it at the start of the message (since that violates the > coding convention), and then we document that to be the convention. > > 2. We modify the above coding convention to say that including the > function name at the start is okay. Presumably this includes > updating checkdoc to check that it is actually the function name that > is used (or perhaps to just accept any symbol). > > 3. We add some way of displaying the function name in the error message > without having to type it out. I think 2 is TRT, except that it isn't really a change in the conventions. Thanks.