From: Stefan Kangas <stefan@marxist.se>
To: 50658@debbugs.gnu.org
Subject: bug#50658: Error messages including function names violates coding conventions
Date: Sat, 18 Sep 2021 03:52:54 -0700 [thread overview]
Message-ID: <CADwFkmkgV9uqf46YbfPp3qRsNTyTy8fw__UF-GyUWn4W84bo5Q@mail.gmail.com> (raw)
Severity: minor
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.
Fixing all these according to our current conventions would in the above
case mean that it should say:
(error "There are no advised functions")
Unfortunately, this might lose some pertinent information (the function
name) if the user is running with `debug-on-error' off.
Do we care about that? If we don't care, we should just make the above
change, and there is nothing more to discuss.
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.
next reply other threads:[~2021-09-18 10:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-18 10:52 Stefan Kangas [this message]
2021-09-18 11:08 ` bug#50658: Error messages including function names violates coding conventions Eli Zaretskii
2021-09-18 11:58 ` Stefan Kangas
2021-09-18 12:02 ` Eli Zaretskii
2021-09-18 12:49 ` Stefan Kangas
2021-09-18 13:25 ` Eli Zaretskii
2021-09-18 14:54 ` Stefan Kangas
2021-09-18 15:00 ` Eli Zaretskii
2021-09-27 23:25 ` Stefan Kangas
2021-09-28 5:54 ` Eli Zaretskii
2021-09-28 12:11 ` Stefan Kangas
2021-09-28 12:28 ` Eli Zaretskii
2021-09-28 12:59 ` Stefan Kangas
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=CADwFkmkgV9uqf46YbfPp3qRsNTyTy8fw__UF-GyUWn4W84bo5Q@mail.gmail.com \
--to=stefan@marxist.se \
--cc=50658@debbugs.gnu.org \
/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.