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: Tue, 3 Nov 2020 17:06:30 +0000 Message-ID: References: <83k0v8b1u3.fsf@gnu.org> <83o8ki96m6.fsf@gnu.org> <83k0v6hhzg.fsf@gnu.org> <83h7q8e8ja.fsf@gnu.org> <838sbjepcw.fsf@gnu.org> <83y2jjd9ix.fsf@gnu.org> <83a6vycru9.fsf@gnu.org> Reply-To: Reuben Thomas Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000005798b05b336e331" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23335"; 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 Tue Nov 03 18:07:12 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 1kZzm3-0005xX-LI for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Nov 2020 18:07:12 +0100 Original-Received: from localhost ([::1]:53480 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZzm2-0005QE-Lf for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Nov 2020 12:07:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZzlu-0005Of-6L for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2020 12:07:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34730) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZzlt-0001lp-ST for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2020 12:07:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZzlt-00066h-Mk for bug-gnu-emacs@gnu.org; Tue, 03 Nov 2020 12:07:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Reuben Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Nov 2020 17:07:01 +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.160442320923454 (code B ref 44318); Tue, 03 Nov 2020 17:07:01 +0000 Original-Received: (at 44318) by debbugs.gnu.org; 3 Nov 2020 17:06:49 +0000 Original-Received: from localhost ([127.0.0.1]:46276 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZzlh-00066E-Bm for submit@debbugs.gnu.org; Tue, 03 Nov 2020 12:06:49 -0500 Original-Received: from mail-oo1-f47.google.com ([209.85.161.47]:40882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZzlf-000661-JD for 44318@debbugs.gnu.org; Tue, 03 Nov 2020 12:06:48 -0500 Original-Received: by mail-oo1-f47.google.com with SMTP id p73so4368588oop.7 for <44318@debbugs.gnu.org>; Tue, 03 Nov 2020 09:06:47 -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=Tzq1pNLh2NXgjEwrvj289IwcWF3Pb96cZZgKvDFvJEw=; b=AvQ2dvIwGkSlf7HaOGJNNPII2gZvAnzCBVNRLXYLw+bW39qtj9KtLnK4lOdxgxWSL0 sOQJhy/Nnz1cx8fCZHs9KefIhoJHT01+JlTzgKVb/FG8XonI1TF+jPaMh6Z795Qj+D2B Sw2EidUpEHMJekDzaGh8wBrvYB5ZHf80ledqw= 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=Tzq1pNLh2NXgjEwrvj289IwcWF3Pb96cZZgKvDFvJEw=; b=WKd5L7t8MfYtdxALutUZnIkZsJBGYrrfMjs0tDzyIZkHOZm71d2WEXkkBz0AZw9gUa ktgG2U7x9S/glTt6BQHD46yGFZONkqRHouT51YXvs5R6ABXifwfcp8Q9JApIbQjANjRq KLsW5NklYR4Z8UllyjKVTAaY/sjzOBzgbp9XcSRBK1IYm0ScH+HtF3TaDVP18viEQgr7 TZBPOECE9BAuU9uUiCCgF+UOPo6bz4kDZCzyZCkIxtv2LVTWufY8UPiLY9BkEKWichhT cImTMkmD4gCOOkvdcmT/YHRbY6GiFpX2cGGcvNxUubOMIlhNlkuOJh3UQq3ZZ7CzN1xT L01g== X-Gm-Message-State: AOAM5329/gA484fvIqkqoT2Bd7fIvWMrNI7VW4+Cd2JJ7X5syUHG9JV1 LUi0I6OeqtUly1/6Wqvvg5vHG1eUoa0RbPUrqK4y1g== X-Google-Smtp-Source: ABdhPJy9tLQwrxyQT7Bi3RPKBqi3kIS9fM/huF4VdCeILX81i0/UVXIiXt6sY2f+cEtMV4PI5bP4QrTvg3MuZdjql3w= X-Received: by 2002:a4a:b503:: with SMTP id r3mr15911289ooo.28.1604423201935; Tue, 03 Nov 2020 09:06:41 -0800 (PST) In-Reply-To: <83a6vycru9.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:192626 Archived-At: --00000000000005798b05b336e331 Content-Type: text/plain; charset="UTF-8" [Apologies Eli, re-sending to list rather than just you.] On Tue, 3 Nov 2020 at 16:45, Eli Zaretskii wrote: > > I'm okay with the first 2, Great, I'll install those! but I'm less comfortable with the 3rd one. > It is wrong to assume that nothing but warnings come through stderr: > for example "hunspell -D" emits the important information to stderr, > at least on my system. Exactly, I found this while testing a more ambitious patch that never collected stderr (and indeed versions of Enchant until last night's release of 2.2.13 printed their --version output on stderr). Hence, all of those uses still collect stderr. It could be that we don't currently use the 2 > functions you suggest to change for such cases, but I think ignoring > stderr in some calls and not the others is a slippery slope of > confusion and subtle bugs. The two functions I changed implement a long-running communication with the spellchecker using the ispell protocol, notionally over a pipe. There's no reason to mix two streams, and in any case that would only work fortuitously, since the spellchecker doesn't know how those streams will be combined. In other words, a source of confusion and subtle bugs. Fortunately, none of the current spellcheckers we support tries to do this. > Since the important case -- that of > enchanty-lsmod -- is already solved, why do we need to make changes > that are not really required, and currently don't give us any gains? > Unfortunately, as I mentioned before, it's not completely solved, as the "enchant" program outputs warnings on stderr, just like enchant-lsmod. This is interpreted by Emacs as additions to the suggestions or corrections list, which is clearly wrong. -- https://rrt.sc3d.org --00000000000005798b05b336e331 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
[A= pologies Eli, re-sending to list rather than just you.]

On Tue, 3 Nov 2020 at 16:45, Eli Zaretskii <eliz@gnu.org> wrote:

I'm okay with the first 2,

Great, I'll install those!

but I'm le= ss comfortable with the 3rd one.
It is wrong to assume that nothing but warnings come through stderr:
for example "hunspell -D" emits the important information to stde= rr,
at least on my system.=C2=A0

Exactly, I found this while testing a more ambitious patch that never collected=20 stderr (and indeed versions of Enchant until last night's release of=20 2.2.13 printed their --version output on stderr).
<= br>
Hence, all of those uses still collect stderr.=

It could be that we don't currently use the 2
functions you suggest to change for such cases, but I think ignoring
stderr in some calls and not the others is a slippery slope of
confusion and subtle bugs.

The two functions I changed implement a long-running communication with the spellchecker using the ispell protocol, notionally over a pipe. There'= s no reason to mix two streams, and in any case that would only work=20 fortuitously, since the spellchecker doesn't know how those streams wil= l be combined. In other words, a source of confusion and subtle bugs.
<= div style=3D"font-family:arial,helvetica,sans-serif;font-size:small" class= =3D"gmail_default">
Fortunately, none of the cu= rrent spellcheckers we support tries to do this.
=C2=A0
=C2=A0 Since the important case -- that of
enchanty-lsmod -- is already solved, why do we need to make changes
that are not really required, and currently don't give us any gains?

Unfortunately, as I mentioned before, it's not completely solved, as the "enchan= t"=20 program outputs warnings on stderr, just like enchant-lsmod. This is=20 interpreted by Emacs as additions to the suggestions or corrections=20 list, which is clearly wrong.

--
--00000000000005798b05b336e331--