unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
@ 2020-09-04  1:07 Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-09-04  1:46 ` Lars Ingebrigtsen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-09-04  1:07 UTC (permalink / raw)
  To: 43191


[-- Attachment #1.1: Type: text/plain, Size: 621 bytes --]

(As I've not been active for a while, I'd appreciate a review of this
admittedly trivial patch; I plan to make another few patches to ispell.el.)

I attach a patch to fix an XXX and add "enchant-2" to the list of spelling
checker programs checked by default. The XXX comment noted that enchant >=
2.1.0 is required by ispell.el; the good news is that enchant is now
commonly installed under the name "enchant-2", which is likely to be a
suitable version (2.0.x releases were not widely adopted), so rather than
look for "enchant" (perhaps that will come later), we can now look for
"enchant-2".

-- 
https://rrt.sc3d.org

[-- Attachment #1.2: Type: text/html, Size: 1187 bytes --]

[-- Attachment #2: 0001-Add-enchant-2-to-list-of-default-spelling-checker-pr.patch --]
[-- Type: text/x-patch, Size: 1351 bytes --]

From 90a0a5ec364efb8207c1b4e1b9b539634135cf3e Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt@sc3d.org>
Date: Fri, 4 Sep 2020 01:58:04 +0100
Subject: [PATCH] Add enchant-2 to list of default spelling checker programs

* lisp/textmodes/ispell.el (ispell-program-name): Check `enchant-2',
as it is likely to be a suitable version. Enchant 2 seems to be
commonly installed under this name, so we don't have to worry about
checking `enchant'.
---
 lisp/textmodes/ispell.el | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 86452ff1e8..8281f1d6bd 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -198,14 +198,11 @@ ispell-choices-win-default-height
   :type 'integer
   :group 'ispell)
 
-;; XXX Add enchant to this list once enchant >= 2.1.0 is widespread.
-;; Before that, adding it is useless, as if it is found, it will just
-;; cause an error; and one of the other spelling engines below is
-;; almost certainly installed in any case, for enchant to use.
 (defcustom ispell-program-name
   (or (executable-find "aspell")
       (executable-find "ispell")
       (executable-find "hunspell")
+      (executable-find "enchant-2")
       "ispell")
   "Program invoked by \\[ispell-word] and \\[ispell-region] commands."
   :type 'string
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
  2020-09-04  1:07 bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2020-09-04  1:46 ` Lars Ingebrigtsen
  2020-09-04  1:51 ` Noam Postavsky
  2020-09-04  7:27 ` Eli Zaretskii
  2 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-04  1:46 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 43191

Reuben Thomas <rrt@sc3d.org> writes:

> (As I've not been active for a while, I'd appreciate a review of this
> admittedly trivial patch; I plan to make another few patches to
> ispell.el.)

Looks good to me (although I haven't used enchant-2 myself).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
  2020-09-04  1:07 bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-09-04  1:46 ` Lars Ingebrigtsen
@ 2020-09-04  1:51 ` Noam Postavsky
  2020-09-05  6:48   ` Eli Zaretskii
  2020-09-04  7:27 ` Eli Zaretskii
  2 siblings, 1 reply; 7+ messages in thread
From: Noam Postavsky @ 2020-09-04  1:51 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 43191

Reuben Thomas <rrt@sc3d.org> writes:

> * lisp/textmodes/ispell.el (ispell-program-name): Check `enchant-2',
> as it is likely to be a suitable version. Enchant 2 seems to be
> commonly installed under this name, so we don't have to worry about
> checking `enchant'.

The second sentence might be better as a code comment (but otherwise,
put 2 spaces after periods).





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
  2020-09-04  1:07 bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2020-09-04  1:46 ` Lars Ingebrigtsen
  2020-09-04  1:51 ` Noam Postavsky
@ 2020-09-04  7:27 ` Eli Zaretskii
  2020-09-04 13:30   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-09-04  7:27 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: 43191

> Date: Fri, 4 Sep 2020 02:07:51 +0100
> From: Reuben Thomas via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> (As I've not been active for a while, I'd appreciate a review of this admittedly trivial patch; I plan to make
> another few patches to ispell.el.)

I will review the patch soon, thanks.

Meanwhile, would you please look into the problems raised in
bug#42248?  I have difficulty understanding the issues there, since
I'm not familiar enough with Enchant (it sounds like they've changed
the valid options and their syntax lately, so our support fails in
some cases?), and would appreciate your help.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
  2020-09-04  7:27 ` Eli Zaretskii
@ 2020-09-04 13:30   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 7+ messages in thread
From: Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-09-04 13:30 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43191

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

On Fri, 4 Sep 2020 at 08:27, Eli Zaretskii <eliz@gnu.org> wrote:

> > Date: Fri, 4 Sep 2020 02:07:51 +0100
> > From: Reuben Thomas via "Bug reports for GNU Emacs,
> >  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >
> > (As I've not been active for a while, I'd appreciate a review of this
> admittedly trivial patch; I plan to make
> > another few patches to ispell.el.)
>
> I will review the patch soon, thanks.
>

Thanks, Eli.

Meanwhile, would you please look into the problems raised in
> bug#42248?  I have difficulty understanding the issues there, since
> I'm not familiar enough with Enchant (it sounds like they've changed
> the valid options and their syntax lately, so our support fails in
> some cases?), and would appreciate your help.
>

No problem, I'll look into it.

-- 
https://rrt.sc3d.org

[-- Attachment #2: Type: text/html, Size: 1799 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
  2020-09-04  1:51 ` Noam Postavsky
@ 2020-09-05  6:48   ` Eli Zaretskii
  2020-09-06 22:25     ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2020-09-05  6:48 UTC (permalink / raw)
  To: Noam Postavsky; +Cc: 43191, rrt

> From: Noam Postavsky <npostavs@gmail.com>
> Date: Thu, 03 Sep 2020 21:51:24 -0400
> Cc: 43191@debbugs.gnu.org
> 
> Reuben Thomas <rrt@sc3d.org> writes:
> 
> > * lisp/textmodes/ispell.el (ispell-program-name): Check `enchant-2',
> > as it is likely to be a suitable version. Enchant 2 seems to be
> > commonly installed under this name, so we don't have to worry about
> > checking `enchant'.
> 
> The second sentence might be better as a code comment (but otherwise,
> put 2 spaces after periods).

I agree, and the patch LGTM otherwise.

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs
  2020-09-05  6:48   ` Eli Zaretskii
@ 2020-09-06 22:25     ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 0 replies; 7+ messages in thread
From: Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2020-09-06 22:25 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 43191-done, Noam Postavsky

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

I've adjusted the patch as suggested, moving the second sentence into a
code comment, and installed the patch.

Thanks all for your reviews.

-- 
https://rrt.sc3d.org

[-- Attachment #2: Type: text/html, Size: 637 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-06 22:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-04  1:07 bug#43191: [PATCH] Add enchant-2 to list of default spelling checker programs Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-04  1:46 ` Lars Ingebrigtsen
2020-09-04  1:51 ` Noam Postavsky
2020-09-05  6:48   ` Eli Zaretskii
2020-09-06 22:25     ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-09-04  7:27 ` Eli Zaretskii
2020-09-04 13:30   ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).