all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Damien Cassou <damien@cassou.me>
To: Eli Zaretskii <eliz@gnu.org>
Cc: alex.branham@gmail.com, eggert@cs.ucla.edu, k.stevens@ieee.org,
	38583@debbugs.gnu.org, zappo@gnu.org, larsi@gnus.org
Subject: bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc
Date: Fri, 27 Dec 2019 12:51:42 +0100	[thread overview]
Message-ID: <87o8vu7zqp.fsf@cassou.me> (raw)
In-Reply-To: <83mubw6lpb.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Hi Eli,

Eli Zaretskii <eliz@gnu.org> writes:
>> Eli Zaretskii <eliz@gnu.org> 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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0006-Improve-error-message-when-no-spellchecker-can-be-fo.patch --]
[-- Type: text/x-patch, Size: 1131 bytes --]

From 754a6ed8e9bbe7dd46e0d4595d8e46b76dc5b606 Mon Sep 17 00:00:00 2001
From: Damien Cassou <damien@cassou.me>
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


  reply	other threads:[~2019-12-27 11:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 21:26 bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc Damien Cassou
2019-12-13  9:05 ` Eli Zaretskii
2019-12-13 19:53   ` Damien Cassou
2019-12-13 19:59     ` Eli Zaretskii
2019-12-27 11:51       ` Damien Cassou [this message]
2019-12-27 14:08         ` Eli Zaretskii
2019-12-27 14:43           ` Damien Cassou
2020-01-11 11:49             ` Damien Cassou
2020-01-11 12:26               ` Eli Zaretskii
2020-01-13  5:19                 ` Damien Cassou
2020-01-16 18:43                   ` Eli Zaretskii
2020-01-16 21:07                     ` Damien Cassou
2020-01-17  7:59                       ` Eli Zaretskii
2020-01-17  9:06                         ` Damien Cassou
2020-01-17  9:49                           ` Eli Zaretskii
2020-01-17 10:35                             ` Damien Cassou

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=87o8vu7zqp.fsf@cassou.me \
    --to=damien@cassou.me \
    --cc=38583@debbugs.gnu.org \
    --cc=alex.branham@gmail.com \
    --cc=eggert@cs.ucla.edu \
    --cc=eliz@gnu.org \
    --cc=k.stevens@ieee.org \
    --cc=larsi@gnus.org \
    --cc=zappo@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.