From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Damien Cassou Newsgroups: gmane.emacs.bugs Subject: bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc Date: Fri, 27 Dec 2019 12:51:42 +0100 Message-ID: <87o8vu7zqp.fsf@cassou.me> References: <87immlw7zo.fsf@cassou.me> <83blsc8ujl.fsf@gnu.org> <871rt8gfy0.fsf@cassou.me> <83mubw6lpb.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="114557"; mail-complaints-to="usenet@blaine.gmane.org" Cc: alex.branham@gmail.com, eggert@cs.ucla.edu, k.stevens@ieee.org, 38583@debbugs.gnu.org, zappo@gnu.org, larsi@gnus.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 27 12:53:14 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ikoB5-000TdJ-4T for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Dec 2019 12:53:11 +0100 Original-Received: from localhost ([::1]:34212 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikoB4-0002lp-1Z for geb-bug-gnu-emacs@m.gmane.org; Fri, 27 Dec 2019 06:53:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38174) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ikoAx-0002lj-49 for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2019 06:53:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ikoAw-0002Lq-2r for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2019 06:53:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50621) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ikoAv-0002LD-Vb for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2019 06:53:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ikoAv-0003eU-UX for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2019 06:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Damien Cassou Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 27 Dec 2019 11:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38583 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-Cc: alex.branham@gmail.com, eggert@cs.ucla.edu, k.stevens@ieee.org, bug-gnu-emacs@gnu.org, larsi@gnus.org, zappo@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.157744752213964 (code B ref -1); Fri, 27 Dec 2019 11:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Dec 2019 11:52:02 +0000 Original-Received: from localhost ([127.0.0.1]:56594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iko9y-0003dA-Ge for submit@debbugs.gnu.org; Fri, 27 Dec 2019 06:52:02 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:60773) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iko9v-0003ck-RS for submit@debbugs.gnu.org; Fri, 27 Dec 2019 06:52:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38088) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iko9s-0002fW-Mf for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2019 06:51:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iko9q-00013c-S5 for bug-gnu-emacs@gnu.org; Fri, 27 Dec 2019 06:51:56 -0500 Original-Received: from mail.choca.pics ([80.67.172.235]:60488) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iko9p-0000qu-So; Fri, 27 Dec 2019 06:51:54 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.choca.pics (Postfix) with ESMTP id 0A16C18192DF2; Fri, 27 Dec 2019 12:51:45 +0100 (CET) Original-Received: from mail.choca.pics ([127.0.0.1]) by localhost (mail.choca.pics [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zkZmmYgNyD9O; Fri, 27 Dec 2019 12:51:44 +0100 (CET) Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.choca.pics (Postfix) with ESMTP id 5D81718192B2B; Fri, 27 Dec 2019 12:51:44 +0100 (CET) X-Virus-Scanned: amavisd-new at choca.pics Original-Received: from mail.choca.pics ([127.0.0.1]) by localhost (mail.choca.pics [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id VCiGJsgyW_s8; Fri, 27 Dec 2019 12:51:44 +0100 (CET) Original-Received: from luz4 (87-231-56-147.rev.numericable.fr [87.231.56.147]) by mail.choca.pics (Postfix) with ESMTPSA id E775F18192DF2; Fri, 27 Dec 2019 12:51:43 +0100 (CET) In-Reply-To: <83mubw6lpb.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173814 Archived-At: --=-=-= Content-Type: text/plain Hi Eli, Eli Zaretskii writes: >> Eli Zaretskii writes: >> > What happens if none of the spellers supported by ispell.el is >> > installed on the user's system? >> >> Starting new Ispell process ispell with default dictionary... \ >> Buffer xxx has no process >> >> Emacs exit status is 255 in this case. > > Can we check this up front, and display some user-friendly message to > the effect that spell-checking cannot be done? Here is an additional patch for the series to answer your request. If you believe the patch series is too large to be reviewed, I can split it in several smaller ones. -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-Improve-error-message-when-no-spellchecker-can-be-fo.patch >From 754a6ed8e9bbe7dd46e0d4595d8e46b76dc5b606 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Fri, 27 Dec 2019 12:48:55 +0100 Subject: [PATCH] Improve error message when no spellchecker can be found * lisp/emacs-lisp/checkdoc.el: Throw error when (checkdoc-ispell-init) fails configuring ispell. --- lisp/emacs-lisp/checkdoc.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 3e6542bc80..0269b89790 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2127,6 +2127,9 @@ checkdoc-ispell-docstring-engine (and checkdoc-autofix-flag (not (eq checkdoc-autofix-flag 'never))))) (checkdoc-ispell-init) + (unless checkdoc-spellcheck-documentation-flag + ;; this happens when (checkdoc-ispell-init) can't start `ispell-program-name' + (user-error "No spellchecker installed: check the variable `ispell-program-name'.")) (save-excursion (skip-chars-forward "^a-zA-Z") (let (word sym case-fold-search err word-beginning word-end) -- 2.24.1 --=-=-=--