bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
This series of patches makes checkdoc capable of spell-checking even
when the user isn't using it interactively. When TAKE-NOTES is non-nil,
checkdoc will run spell-checking (with ispell) and report spelling
mistakes.

Damien Cassou (5):
  Add function `ispell-correct-p`
  Fix indentation of `checkdoc-ispell-docstring-engine`
  Cleanup of `checkdoc-ispell-docstring-engine`
  Properly initialize ispell in checkdoc
  Add unattended spell-checking to checkdoc

 lisp/emacs-lisp/checkdoc.el | 114 ++++++++++++++++++++----------------
 lisp/textmodes/ispell.el    |  46 +++++++++++----
 2 files changed, 98 insertions(+), 62 deletions(-)

--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

0001-Add-function-ispell-correct-p.patch (3K) Download Attachment
0002-Fix-indentation-of-checkdoc-ispell-docstring-engine.patch (4K) Download Attachment
0003-Cleanup-of-checkdoc-ispell-docstring-engine.patch (3K) Download Attachment
0004-Properly-initialize-ispell-in-checkdoc.patch (1K) Download Attachment
0005-Add-unattended-spell-checking-to-checkdoc.patch (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: "Ken Stevens" <[hidden email]>, "Eric M. Ludlam" <[hidden email]>,
>  "Alex Branham" <[hidden email]>, "Lars Ingebrigtsen"
>  <[hidden email]>, "Paul Eggert" <[hidden email]>, "Eli Zaretskii"
>  <[hidden email]>
> Date: Thu, 12 Dec 2019 22:26:35 +0100
>
> This series of patches makes checkdoc capable of spell-checking even
> when the user isn't using it interactively. When TAKE-NOTES is non-nil,
> checkdoc will run spell-checking (with ispell) and report spelling
> mistakes.

Thanks.

What happens if none of the spellers supported by ispell.el is
installed on the user's system?



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Eli Zaretskii <[hidden email]> 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.


--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email], [hidden email], [hidden email], [hidden email]
> Date: Fri, 13 Dec 2019 20:53:43 +0100
>
> Eli Zaretskii <[hidden email]> 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?



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Hi Eli,

Eli Zaretskii <[hidden email]> writes:

>> Eli Zaretskii <[hidden email]> 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

0006-Improve-error-message-when-no-spellchecker-can-be-fo.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email],
>  [hidden email], [hidden email], [hidden email]
> Date: Fri, 27 Dec 2019 12:51:42 +0100
>
> > 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.

You mean, this is in addition to the previous patches?  If so, I'd
prefer a single patch.

Thanks.



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Eli Zaretskii <[hidden email]> writes:
> You mean, this is in addition to the previous patches?  If so, I'd
> prefer a single patch.

you want all the changes merged into a single patch? This seems much
harder to review but here it is.

--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

0001-Add-unattended-spell-checking-to-checkdoc.patch (12K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Damien Cassou <[hidden email]> writes:

> Eli Zaretskii <[hidden email]> writes:
>> You mean, this is in addition to the previous patches?  If so, I'd
>> prefer a single patch.
>
> you want all the changes merged into a single patch? This seems much
> harder to review but here it is.

any news?

--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email],
>  [hidden email], [hidden email], [hidden email]
> Date: Sat, 11 Jan 2020 12:49:17 +0100
>
> Damien Cassou <[hidden email]> writes:
>
> > Eli Zaretskii <[hidden email]> writes:
> >> You mean, this is in addition to the previous patches?  If so, I'd
> >> prefer a single patch.
> >
> > you want all the changes merged into a single patch? This seems much
> > harder to review but here it is.
>
> any news?

Sorry, it fell through the cracks.

However, I was about to push it now, but compiling the modified
version generates warnings:

    ELC      emacs-lisp/checkdoc.elc

  In checkdoc-ispell-docstring-engine:
  emacs-lisp/checkdoc.el:2161:47:Warning: reference to free variable
      `ispell-format-word-function'
  emacs-lisp/checkdoc.el:2162:62:Warning: reference to free variable
      `ispell-program-name'
  emacs-lisp/checkdoc.el:2163:42:Warning: reference to free variable
      `ispell-current-dictionary'

  In end of data:
  emacs-lisp/checkdoc.el:2714:1:Warning: the following functions are not known
      to be defined: ispell-set-spellchecker-params,
      ispell-accept-buffer-local-defs, ispell-correct-p

Could you please augment the patch so that these warnings are avoided?

Also, please mention the bug number in the commit log message.

TIA



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Eli Zaretskii <[hidden email]> writes:
> Sorry, it fell through the cracks.


no problem.


> However, I was about to push it now, but compiling the modified
> version generates warnings: […]
>
> Could you please augment the patch so that these warnings are avoided?


fixed


> Also, please mention the bug number in the commit log message.


fixed

--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill

0001-Add-unattended-spell-checking-to-checkdoc.patch (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email],
>  [hidden email], [hidden email], [hidden email]
> Date: Mon, 13 Jan 2020 06:19:56 +0100
>
> >From 46df39d2f7ddfe79dd55d8342ea20a2dc17ac31c Mon Sep 17 00:00:00 2001
> From: Damien Cassou <[hidden email]>
> Date: Fri, 27 Dec 2019 15:35:52 +0100
> Subject: [PATCH] Add unattended spell-checking to checkdoc

Thanks, I've now pushed this to the master branch.

Sorry for the delays and thanks for persevering.



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Hi Eli,

Eli Zaretskii <[hidden email]> writes:
> Thanks, I've now pushed this to the master branch.
>
> Sorry for the delays and thanks for persevering.

thank you very much. Is it too late for Emacs 27?

Best,

--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email],
>  [hidden email], [hidden email], [hidden email]
> Date: Thu, 16 Jan 2020 22:07:33 +0100
>
> Eli Zaretskii <[hidden email]> writes:
> > Thanks, I've now pushed this to the master branch.
> >
> > Sorry for the delays and thanks for persevering.
>
> thank you very much. Is it too late for Emacs 27?

In general, yes.  But you can try convincing me that it is so
important to have in Emacs 27 that we should make an exception.  I
considered this, and concluded that it's a minor convenience feature.
But maybe I'm missing something?



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Eli Zaretskii
> From: Damien Cassou <[hidden email]>
> Cc: [hidden email], [hidden email], [hidden email],
>  [hidden email], [hidden email], [hidden email]
> Date: Fri, 17 Jan 2020 10:06:09 +0100
>
> Eli Zaretskii <[hidden email]> writes:
> > In general, yes.  But you can try convincing me that it is so
> > important to have in Emacs 27 that we should make an exception.  I
> > considered this, and concluded that it's a minor convenience feature.
> > But maybe I'm missing something?
>
> Integrating into Emacs 27 late in the process is risky because my code
> could have introduced subtle bugs inside checkdoc and I would not like
> to be responsible for a delay in the release.  That being said and
> checkdoc being automatically activated by flycheck (which I believe many
> people use), I think we will find bugs in my code quite fast if there
> are any.  Moreover, I think that improving the overall quality of Emacs
> code is important and every little step in this direction would be
> helpful.
>
> I'm not sure this is convincing enough but I would have tried :-D.

OK, I've cherry-picked this to the release branch, mainly because it
narrowly missed the branching due to delays in our review of the
patch.

> FYI, this work on checkdoc is part of a larger piece of work I've
> started some years ago on improving the quality of Emacs packages.  Here
> are some of my activities in this area:

Thank you for your work on this.



Reply | Threaded
Open this post in threaded view
|

bug#38583: [PATCH] 27.0.50; Add unattended spell-checking to checkdoc

Damien Cassou-2
Eli Zaretskii <[hidden email]> writes:
> OK, I've cherry-picked this to the release branch, mainly because it
> narrowly missed the branching due to delays in our review of the
> patch.

thank you!

--
Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill