From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Reuben Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#44318: 28.0.50; Problem with ispell/flyspell and ""enchant"" backend Date: Sun, 1 Nov 2020 22:23:44 +0000 Message-ID: References: <83k0v8b1u3.fsf@gnu.org> <83o8ki96m6.fsf@gnu.org> <83k0v6hhzg.fsf@gnu.org> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000e6530705b31315b8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9130"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44318@debbugs.gnu.org, dinkonin To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 23:25:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZLmh-0002Gu-Dl for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 23:25:11 +0100 Original-Received: from localhost ([::1]:49986 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZLmg-0008JU-GP for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 17:25:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZLmY-0008JF-Um for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 17:25:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55567) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZLmY-00078q-LL for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 17:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZLmY-0008Bd-Gz for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 17:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 22:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44318 X-GNU-PR-Package: emacs Original-Received: via spool by 44318-submit@debbugs.gnu.org id=B44318.160426944531400 (code B ref 44318); Sun, 01 Nov 2020 22:25:02 +0000 Original-Received: (at 44318) by debbugs.gnu.org; 1 Nov 2020 22:24:05 +0000 Original-Received: from localhost ([127.0.0.1]:38880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZLld-0008AO-4a for submit@debbugs.gnu.org; Sun, 01 Nov 2020 17:24:05 -0500 Original-Received: from mail-oi1-f171.google.com ([209.85.167.171]:46487) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZLla-00089t-HT for 44318@debbugs.gnu.org; Sun, 01 Nov 2020 17:24:03 -0500 Original-Received: by mail-oi1-f171.google.com with SMTP id x1so12787019oic.13 for <44318@debbugs.gnu.org>; Sun, 01 Nov 2020 14:24:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sc3d.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mbO82nADLXWtxeC47FJLIOA7skZb9pTFQD3E5fS8w1w=; b=MMbLcJyJWBNVGSSahO3NH7oQVzCtEEfqicn6pzHJHAf40ST7Vo8JdFfpkwYJFtygoL MoiJn1J0WctFzsEZe39W99nM3EplcJXxe3rFjLaX+zBy9IUIJC7+/OmzUc84OEJOJb8l i0od38/eSN2+OIJo+xYMI9+rjWHt46AGnyNTA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mbO82nADLXWtxeC47FJLIOA7skZb9pTFQD3E5fS8w1w=; b=t2YBmjpGj/SwOTPKnH3QJ7wsLzRRcWG/UwPx3lhVFsYG9eNxozpSmT02ZT09eQobUb 32psIRaP+5mb1JV+ehUxq3+YzaL6qdT/eDCTgRdbSkPcGNO7byIJzqQUg+vyOqb5d3l8 oC7AnmLJop35O6RUtS2ote6yKTML7+I64JTkh6gW0P7o/ii6rbiZIvSZMJR/vUNDYK3J znbAk4kuldu4wJ+Mzgr3GUUZnvFNoxjmstbusAlSvIKQvuC4CY18zDiLfXu5t2Yb5Dn1 5T1neuUnFzYx4F+ApEP47Ajsm903kSDL/lKZolj8KapCdC8cIBufLcabZC6wgEpl87yM zkaQ== X-Gm-Message-State: AOAM533zsbaXsxhz34xSHZsvN7JEYQFbX0m73qpjAKDqwwdtF84JM6R7 thIMrSVtyAxo7BoA8RoPG8xut3P2+i7D8PB4mzRw0Q== X-Google-Smtp-Source: ABdhPJwqgJ+Ml6h/lYZoEl5PqqjnIzaO1UDZoZA2OfJbwKFEnqmNsnetlLakZkJeRY6ujErk7ysNWBdlfe/JWL6vVJA= X-Received: by 2002:a05:6808:8ea:: with SMTP id d10mr8462937oic.62.1604269436713; Sun, 01 Nov 2020 14:23:56 -0800 (PST) In-Reply-To: <83k0v6hhzg.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:192484 Archived-At: --000000000000e6530705b31315b8 Content-Type: text/plain; charset="UTF-8" On Sat, 31 Oct 2020 at 09:17, Eli Zaretskii wrote: > > From: dinkonin > > Date: Sat, 31 Oct 2020 10:37:49 +0200 > > Cc: Reuben Thomas , 44318@debbugs.gnu.org > > > > I totally agree with you that this is an upstream problem and I have > reported it there. But maybe I have not > > worded my bug correctly (my English is lacking, sorry). Enchant is > working everywhere else on the same > > system i.e. in AbiWord, Vim, GtkSpell and gedit. It does not work only > in Emacs, that's why I reported it here, > > for the benefit of other Arch users using the package and Emacs. > > I don't know how it succeeds working in those other environments, but > I don't think Emacs should work around clear problems in installing > the spell-checker. > I've had a bit more time to think about this now, and I think I understand better what is going on. First, it's pretty obvious why this isn't a problem for programs other than Emacs: they ignore the error messages. I think Enchant is correct to generate the errors, as it shows that it has been mis-installed. I looked at the Arch package, and it depends on libvoikko, so I'm surprised you're getting these errors in the first place. However, I think Emacs should be able (like other Enchant-using programs) to cope with this problem, particularly as all it should have to do is ignore stderr. I think this can be achieved by changing the definition of ispell--call-enchant-lsmod to: (defun ispell--call-enchant-lsmod (&rest args) "Call enchant-lsmod with ARGS and return the output as string." (with-output-to-string (apply #'ispell-call-process (replace-regexp-in-string "enchant\\(-[0-9]\\)?\\'" "enchant-lsmod\\1" ispell-program-name) nil '(t nil) nil args))) (I can't see any reason to use `with-current-buffer` either; am I missing something?) -- https://rrt.sc3d.org --000000000000e6530705b31315b8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, 31 Oct 2020 at= 09:17, Eli Zaretskii <eliz@gnu.org&= gt; wrote:
> From: dinkonin <dinkonin@gmail.com>
> Date: Sat, 31 Oct 2020 10:37:49 +0200
> Cc: Reuben Thomas <rrt@sc3d.org>, 44318@debbugs.gnu.org
>
> I totally agree with you that this is an upstream problem and I have r= eported it there. But maybe I have not
> worded my bug correctly (my English is lacking, sorry). Enchant is wor= king everywhere else on the same
> system i.e. in AbiWord, Vim, GtkSpell and gedit. It does not work only= in Emacs, that's why I reported it here,
> for the benefit of other Arch users using the package and Emacs.

I don't know how it succeeds working in those other environments, but I don't think Emacs should work around clear problems in installing
the spell-checker.

I've had a= bit more time to think about this now, and I think I understand better wha= t is going on.

First, = it's pretty obvious why this isn't a problem for programs other tha= n Emacs: they ignore the error messages.

=
I think Enchant is correct to generate the errors, as it= shows that it has been mis-installed. I looked at the Arch package, and it= depends on libvoikko, so I'm surprised you're getting these errors= in the first place.

H= owever, I think Emacs should be able (like other Enchant-using programs) to= cope with this problem, particularly as all it should have to do is ignore= stderr.

I think this = can be achieved by changing the definition of ispell--call-enchant-lsmod to= :

(defun ispell--call-= enchant-lsmod (&rest args)
=C2=A0 "Call enchant-lsmod with ARGS= and return the output as string."
=C2=A0 (with-output-to-string=C2=A0 =C2=A0 (apply #'ispell-call-process
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(replace-regexp-in-string "enchant\\(-[0-9]\\)?\\'= ;"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"= enchant-lsmod\\1"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0ispell-program-name)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= nil '(t nil) nil args)))

(I can't see any reason to use `with-current-buffer` either; a= m I missing something?)

--
--000000000000e6530705b31315b8--