From unknown Sat Jun 21 05:18:38 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#64075 <64075@debbugs.gnu.org> To: bug#64075 <64075@debbugs.gnu.org> Subject: Status: 28.2; ispell broken on uncolored terminals Reply-To: bug#64075 <64075@debbugs.gnu.org> Date: Sat, 21 Jun 2025 12:18:38 +0000 retitle 64075 28.2; ispell broken on uncolored terminals reassign 64075 emacs submitter 64075 Al Petrofsky severity 64075 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 14 19:13:32 2023 Received: (at submit) by debbugs.gnu.org; 14 Jun 2023 23:13:32 +0000 Received: from localhost ([127.0.0.1]:45765 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9ZgC-0004mH-IC for submit@debbugs.gnu.org; Wed, 14 Jun 2023 19:13:32 -0400 Received: from lists.gnu.org ([209.51.188.17]:57262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9ZgB-0004m9-6S for submit@debbugs.gnu.org; Wed, 14 Jun 2023 19:13:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9ZgA-0007My-Vu for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 19:13:30 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q9Zg9-0003x0-EA for bug-gnu-emacs@gnu.org; Wed, 14 Jun 2023 19:13:30 -0400 Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-25bd8d52f24so859508a91.0 for ; Wed, 14 Jun 2023 16:13:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686784407; x=1689376407; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ymgnVRUHKlgU3uX1ysT4ivziSVzV7UqiHxvgjkz4Zmw=; b=ebHfLGoXaD3XrnIvJwNVdnSwXMjXOYAAwyLCSyn+T/lFpc5b0upkW0BFKx5O3Xwmvq mDBx3Vws0Q/lvVOXaKimaARqsnLidp0bKbMedeKbAshvpj88D/v7uA0WUQqm9uLiZ2Oa OnZ5zHFxUl3ucJj3fUBPv6MIXYIgYe/YXONDn59V4/urlMdg4005mSGOo8O3q3mx20Rd VV68mfAJHpyT0v/0T6AuqIT5ADYGOQgF6/VRZeY9Iuaf0AJK2+xUHjc4P6oaVCWyOau4 mpYp8PIWMiYvNS+qHVJAMn7uYCnBIDkpXL+vaDV7bDQVy1bcVzhKfpv2ohPzk2ZzZ/gg ei8w== X-Gm-Message-State: AC+VfDzik4EaPbF6rrq2uBt0MtKcfiF7nlTV214L3BqJ8eWtMK2jw05k mxU2dnPU0RZ1Cr9+N5Y9sgrcL1elY5xggktO2LoKO93k1TE= X-Google-Smtp-Source: ACHHUZ6EgzIYUatyphb5AG3+dSVpVYMKyTQMsxlMY7CCwh438EyLjqzkBsmjuLRjMO8hdXpFgGc7x1IximYlQNpK9WA= X-Received: by 2002:a17:90b:1b0c:b0:25b:e057:7526 with SMTP id nu12-20020a17090b1b0c00b0025be0577526mr12199502pjb.4.1686784407245; Wed, 14 Jun 2023 16:13:27 -0700 (PDT) MIME-Version: 1.0 From: Al Petrofsky Date: Wed, 14 Jun 2023 19:13:14 -0400 Message-ID: Subject: 28.2; ispell broken on uncolored terminals To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="00000000000068198905fe1f19a9" Received-SPF: pass client-ip=209.85.216.47; envelope-from=al.petrofsky@gmail.com; helo=mail-pj1-f47.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --00000000000068198905fe1f19a9 Content-Type: text/plain; charset="UTF-8" emacs-28.2 -Q -nw --color=no s t o n k s M-$ 1 At this point, I expect to see the word "stonks" replaced with "stocks", but it is instead replaced with "stockstonks". The problem seems to be in ispell-highlight-spelling-error-generic, a 20th-century kludge from before face support for ttys was added in emacs-21 in 2001. It's been unnecessary since then, and it looks like it's been breaking ispell on colorless ttys since at least emacs-23. Changing "(display-color-p)" to "t" in ispell-highlight-spelling-error suffices to fix the bug. --00000000000068198905fe1f19a9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

=C2=A0 =C2=A0emacs-28.2 -Q -nw --color=3Dno
=C2=A0 = =C2=A0s t o n k s M-$ 1

At this point, I expect to see the word &quo= t;stonks" replaced with
"stocks", but it is instead repla= ced with "stockstonks".

The problem seems to be in ispell-= highlight-spelling-error-generic, a
20th-century kludge from before face= support for ttys was added in
emacs-21 in 2001.=C2=A0 It's been unn= ecessary since then, and it looks like
it's been breaking ispell on = colorless ttys since at least emacs-23.

Changing "(display= -color-p)" to "t" in ispell-highlight-spelling-error
suff= ices to fix the bug.

--00000000000068198905fe1f19a9-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 14 19:25:14 2023 Received: (at 64075) by debbugs.gnu.org; 14 Jun 2023 23:25:15 +0000 Received: from localhost ([127.0.0.1]:45779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9ZrW-00055D-L6 for submit@debbugs.gnu.org; Wed, 14 Jun 2023 19:25:14 -0400 Received: from heytings.org ([95.142.160.155]:43874) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9ZrU-000554-5m for 64075@debbugs.gnu.org; Wed, 14 Jun 2023 19:25:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20220101; t=1686785111; bh=YERgCEiHUL/BRLezc95Qp4QC6PPoU9yw/vwl7OfXXIg=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=gjz1eZyLV82y6k+jQgICTRIyXDaxR6co4wT8kwNtABgZ4XXQq5lWFkPt8Vd/WJkIr Z14CjWO5RUZP9+mcSsTk7OdsSxT/tt1HLhmjaJ/3oKX6VobO6FCNwkHI2r6FaBhmo3 NJwykj0gMWNc7IwNmX+xVPxD/BbtHx1yHWZMFrdfSCKlmB30/fNTefCrOnAgMNR7jr bh+Pjp6kCMlXoV1ALTB0puhWLBroY85PGNO6jlF/U72nnwOOIAmYsgzdbRt3re+jxc B50BDo/e3VWs+nD8A7nBuCwU8EQlGYs3tCKygskKgTm8torlXX8FaWdYrH/0FDYtf/ wM2Y/H7n6rw8A== Date: Wed, 14 Jun 2023 23:25:10 +0000 From: Gregory Heytings To: Al Petrofsky Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals In-Reply-To: Message-ID: <42ff58c7e8e4095a1f34@heytings.org> References: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Zxj4QVJaPX" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Zxj4QVJaPX Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable >=20 > emacs-28.2 -Q -nw --color=3Dno > s t o n k s M-$ 1 > > At this point, I expect to see the word "stonks" replaced with "stocks",= =20 > but it is instead replaced with "stockstonks". >=20 > The problem seems to be in ispell-highlight-spelling-error-generic, a=20 > 20th-century kludge from before face support for ttys was added in=20 > emacs-21 in 2001.=C2=A0 It's been unnecessary since then, and it looks li= ke=20 > it's been breaking ispell on colorless ttys since at least emacs-23. > This recipe can be reproduced with Emacs 25, 26, 27 and 28... but not with= =20 Emacs 29, in which "stonks" is indeed replaced with "stocks". --Zxj4QVJaPX-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 14 19:48:58 2023 Received: (at 64075) by debbugs.gnu.org; 14 Jun 2023 23:48:58 +0000 Received: from localhost ([127.0.0.1]:45796 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9aEU-0005is-Cr for submit@debbugs.gnu.org; Wed, 14 Jun 2023 19:48:58 -0400 Received: from mail-pj1-f51.google.com ([209.85.216.51]:39062) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9aES-0005ie-9o for 64075@debbugs.gnu.org; Wed, 14 Jun 2023 19:48:57 -0400 Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-25e0fddf3a2so246500a91.0 for <64075@debbugs.gnu.org>; Wed, 14 Jun 2023 16:48:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686786530; x=1689378530; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CrK34zsPNyXiFrhUs0YAybU7I7IVtva7GcPao3PrY9o=; b=dItLyJbZluoeWzdebnoeQgv7H6izwB0vuzD2ZJQXgewhGVxeoq5bcdpXunXWxtmLYY Vup4LqSlw/NxCl+Yion4yqAxEMBIBvzoTyvYswAM3TzpwUs27FoSfHCC+L+I2qphhLZc 3gRstH4PK7ZOHygIy1B6qO/9U+ouxVa08+Y75ntU+XPXYTKGsJrILHe9mxztq79ctQJY e8j8IZQYZb5viq/ecLUTMJ38P6hq0Otgoy27bt9URrbtzqaYjpLaGspIaJUJtuGxqosC C8PqZX/nBwJDOh5dkwyK7OB/v1qN8/a6BfPtxm+3xBjcFyi49dbP55Sgu31b58NETwAM r8tQ== X-Gm-Message-State: AC+VfDxq9GF+9hA1/qTBrTY7UtgVWCSbyBxUNjuznzyGOguqZQfIHvaX yubE5qxn6ZjEDK+09VtJbw/VV3S6AwRr7Uk27Tk= X-Google-Smtp-Source: ACHHUZ46XuysLI++ACU7NcgPU8pqaj0l3q3KvNZXOJ6xAozsucwc4+tmysUw3f8PAC8jOJB0BssL0/sQjDeTBcMtu6U= X-Received: by 2002:a17:90b:1bcf:b0:255:54c4:9a75 with SMTP id oa15-20020a17090b1bcf00b0025554c49a75mr18562606pjb.2.1686786530103; Wed, 14 Jun 2023 16:48:50 -0700 (PDT) MIME-Version: 1.0 References: <42ff58c7e8e4095a1f34@heytings.org> In-Reply-To: <42ff58c7e8e4095a1f34@heytings.org> From: Al Petrofsky Date: Wed, 14 Jun 2023 19:48:37 -0400 Message-ID: Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals To: Gregory Heytings Content-Type: multipart/alternative; boundary="000000000000f0534505fe1f971e" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000f0534505fe1f971e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, I see Eli fixed ispell-highlight-spelling-error-generic last year. http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/textmodes/ispell.el?= id=3Df3b876fa75042a1c00886e07d8491ac11824a892 Still, this anachronistic kludge should really be nuked entirely. Even with the current fix, it fails to use ispell-highlight-face, instead always using inverse-video. By "nuked entirely" I mean: (1) delete ispell-highlight-spelling-error (2) delete ispell-highlight-spelling-error-generic (3) rename ispell-highlight-spelling-error-overlay to ispell-highlight-spelling-error On Wed, Jun 14, 2023 at 7:25=E2=80=AFPM Gregory Heytings wrote: > > > > > emacs-28.2 -Q -nw --color=3Dno > > s t o n k s M-$ 1 > > > > At this point, I expect to see the word "stonks" replaced with "stocks"= , > > but it is instead replaced with "stockstonks". > > > > The problem seems to be in ispell-highlight-spelling-error-generic, a > > 20th-century kludge from before face support for ttys was added in > > emacs-21 in 2001. It's been unnecessary since then, and it looks like > > it's been breaking ispell on colorless ttys since at least emacs-23. > > > > This recipe can be reproduced with Emacs 25, 26, 27 and 28... but not wit= h > Emacs 29, in which "stonks" is indeed replaced with "stocks". > --000000000000f0534505fe1f971e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Ah, I see Eli fixed ispell-highlight-= spelling-error-generic last year.
http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/= textmodes/ispell.el?id=3Df3b876fa75042a1c00886e07d8491ac11824a892
Still, this anachronistic kludge should really be nuked entirely.
Even= with the current fix, it fails to use ispell-highlight-face,
instead al= ways using inverse-video.

By "nuked entirely" I mean:
= =C2=A0 =C2=A0(1) delete ispell-highlight-spelling-error
=C2=A0 =C2=A0(2)= delete ispell-highlight-spelling-error-generic
=C2=A0 =C2=A0(3) rename = ispell-highlight-spelling-error-overlay
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0to ispell-highlight-spelling-error

=
On W= ed, Jun 14, 2023 at 7:25=E2=80=AFPM Gregory Heytings <gregory@heytings.org> wrote:=

>
> emacs-28.2 -Q -nw --color=3Dno
> s t o n k s M-$ 1
>
> At this point, I expect to see the word "stonks" replaced wi= th "stocks",
> but it is instead replaced with "stockstonks".
>
> The problem seems to be in ispell-highlight-spelling-error-generic, a =
> 20th-century kludge from before face support for ttys was added in > emacs-21 in 2001.=C2=A0 It's been unnecessary since then, and it l= ooks like
> it's been breaking ispell on colorless ttys since at least emacs-2= 3.
>

This recipe can be reproduced with Emacs 25, 26, 27 and 28... but not with =
Emacs 29, in which "stonks" is indeed replaced with "stocks&= quot;.
--000000000000f0534505fe1f971e-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 01:23:04 2023 Received: (at 64075) by debbugs.gnu.org; 15 Jun 2023 05:23:04 +0000 Received: from localhost ([127.0.0.1]:45932 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9fRo-0005qd-BH for submit@debbugs.gnu.org; Thu, 15 Jun 2023 01:23:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9fRm-0005pv-NA for 64075@debbugs.gnu.org; Thu, 15 Jun 2023 01:23:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9fRh-0006bs-3P; Thu, 15 Jun 2023 01:22:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=dztRtTesPd5bhi6TVBfkrPrcItPiQks0XInbOIAjWTM=; b=QjtjVcSTkMcuM5nFzs36 0mB6qYUkRiFaQe/ijx7LzYtxUYF3/HOaBMbINkw4CHvwE5N4ayZ9ubTufxZttghAMrWUGB7hndxkH ilTjihcQBZJkumHLBzzgaH1maT5ruUJMfNP9PdTiKGQakyU9Vc+V486oyAgPYWw0W4Zcu459esl36 MknBDRhPJ1SskEHikFTqeywF5JJqMRXzWsYoObPHSxpGwAzeqEpEi5ucs4wG3ja1iCPVbxTAs3aUl 6KhqXRJxa/4R/jzWopsZ1aWrHDOH5AdxoyRUJ63nnBwreCw2rSOd4B6+wUYmU8T72LHHF0ZgZ2TX+ 27P5kq3ybU6Wog==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9fRg-0008UV-Jt; Thu, 15 Jun 2023 01:22:56 -0400 Date: Thu, 15 Jun 2023 08:23:19 +0300 Message-Id: <837cs5uwmw.fsf@gnu.org> From: Eli Zaretskii To: Gregory Heytings In-Reply-To: <42ff58c7e8e4095a1f34@heytings.org> (message from Gregory Heytings on Wed, 14 Jun 2023 23:25:10 +0000) Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals References: <42ff58c7e8e4095a1f34@heytings.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64075 Cc: al@petrofsky.org, 64075@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 64075@debbugs.gnu.org > Date: Wed, 14 Jun 2023 23:25:10 +0000 > From: Gregory Heytings > > > emacs-28.2 -Q -nw --color=no > > s t o n k s M-$ 1 > > > > At this point, I expect to see the word "stonks" replaced with "stocks", > > but it is instead replaced with "stockstonks". > > > > The problem seems to be in ispell-highlight-spelling-error-generic, a > > 20th-century kludge from before face support for ttys was added in > > emacs-21 in 2001.  It's been unnecessary since then, and it looks like > > it's been breaking ispell on colorless ttys since at least emacs-23. > > > > This recipe can be reproduced with Emacs 25, 26, 27 and 28... but not with > Emacs 29, in which "stonks" is indeed replaced with "stocks". Yes, see bug#56219. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 01:36:17 2023 Received: (at 64075) by debbugs.gnu.org; 15 Jun 2023 05:36:17 +0000 Received: from localhost ([127.0.0.1]:45957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9fea-0006FQ-NW for submit@debbugs.gnu.org; Thu, 15 Jun 2023 01:36:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9feX-0006FB-UC for 64075@debbugs.gnu.org; Thu, 15 Jun 2023 01:36:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9feR-0000YJ-Ux; Thu, 15 Jun 2023 01:36:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=pCST+SNUYoMiTeK3t6g5ZT6xEcZGTRV6emQa2zVzyQU=; b=YfE1bSRYeelf UOtS2xfdocxopGDGNixM3t6mEKpgy4ZdBQNIcBh0eFNkkxClBka7RpXT87W/epciFgutJq6eMJorO LNKtY7gFmCEEdArq8ZyTrJNzgxbCP/stvCPsTo0J5QIDKn7ZkU2sopUzE+itnWQOKrKIdUPepRQa+ bNdol4W/4d43+wlouSZGxymPNWg+xOtV2yNx9LWaBcUFwIeHQ6XO1PYsUExv4nr/SjpDTbbYpbCFD 2XqTK5Jw8JTCZ8D/TK1wJNhiszST2m/HP6xBe1s/xKPuxVh7W1ZtbPpi5hnF/rKSDqTV2qymlU0Sb jAA8298uyDNCnSjYm7fFMw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9feQ-0003IO-UG; Thu, 15 Jun 2023 01:36:07 -0400 Date: Thu, 15 Jun 2023 08:36:28 +0300 Message-Id: <835y7puw0z.fsf@gnu.org> From: Eli Zaretskii To: Al Petrofsky In-Reply-To: (message from Al Petrofsky on Wed, 14 Jun 2023 19:48:37 -0400) Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals References: <42ff58c7e8e4095a1f34@heytings.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org, gregory@heytings.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 64075@debbugs.gnu.org > From: Al Petrofsky > Date: Wed, 14 Jun 2023 19:48:37 -0400 > > Still, this anachronistic kludge should really be nuked entirely. Why? And what's "anachronistic" about that code? > Even with the current fix, it fails to use ispell-highlight-face, > instead always using inverse-video. Why is that a problem? This function exists so that even the dumbest terminals could be used for spell-checking with reasonable convenience. > By "nuked entirely" I mean: > (1) delete ispell-highlight-spelling-error > (2) delete ispell-highlight-spelling-error-generic > (3) rename ispell-highlight-spelling-error-overlay > to ispell-highlight-spelling-error Sorry, not going to happen. You are suggesting to delete a useful capability for no good reason, just because you happen to think it's "anachronistic". Unlike what you seem to think, display-color-p is not "a 20th-century kludge from before face support for ttys was added in emacs-21 in 2001". Quite to the contrary, display-color-p was introduced with Emacs 21, to replace references to window-system (which _was_ "the 20-century kludge" for requesting faces) in a way that would support text-mode terminals. Now, I'm okay will adding more tests to display-color-p, for monochrome terminals that can support other face attributes which will make the misspelled word stand out, but then the ispell-highlight-face should probably be modified accordingly, keeping in mind that (a) the user could customize the 'isearch' and/or 'highlight' faces from which it inherits, and (b) face customization is global, not specific to frame, let alone Emacs command, and users rarely customize faces in complex ways that can account for frame capabilities. And in any case, we should keep that code for terminals which can only support inverse video. There's no reason to delete it, none whatsoever. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 02:35:09 2023 Received: (at 64075) by debbugs.gnu.org; 15 Jun 2023 06:35:09 +0000 Received: from localhost ([127.0.0.1]:46014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9gZY-0007kE-MK for submit@debbugs.gnu.org; Thu, 15 Jun 2023 02:35:09 -0400 Received: from mail-pj1-f47.google.com ([209.85.216.47]:41310) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9gZX-0007jk-SS for 64075@debbugs.gnu.org; Thu, 15 Jun 2023 02:35:08 -0400 Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-25bc399535bso1027453a91.1 for <64075@debbugs.gnu.org>; Wed, 14 Jun 2023 23:35:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686810902; x=1689402902; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hDWrPe4GcnhgNZvVuuXVb4NgKUXMvuuRw3ZM+CrZY/A=; b=EDiGs1wBEcuvVJaEpsMMEDQ4vdChS7q/oobvTrHDWtTgjHOpslRFtk2IwKCiBU/8aK wlYdZDie2dVvo9ShlnrmTP4eX71+NwBgqCBNFSAEtUtWoDZ/laA5a1mM7EyUMC+7p9Qe IRKC4WxTpieBYfAP5tSHe4WDtMsZKa2Pb/wXs5XkTSO3UKh3RNrF1wlUhRxbbZODPY9P 1SJjsGVd9FGZ/6d1zeNup1IIAcd5UAfwlVbTG2up+OH6ZFHekYwUqK00kCZRUcxrThlK j9n0eLTfwML6mqVZ8L3sFzwhH+3TxDUEm+btAWitTjdzU0getND2ADuhyZPVJxrAnLxs O6vw== X-Gm-Message-State: AC+VfDwBInJRSFCJrL8uEpSSEZAQ2IRm2mkDKhr843pgSsPCPLx9pWCF wuhIncfbe18LuFbIuwZwHdn0tAB+f4/qNgbA0xc= X-Google-Smtp-Source: ACHHUZ567qYvCRjOehZoAbS/N/0K6YyX4CG9vN9byUFz+dWLO2BF7rDaMEzHK4lSGRYHdZvPCk1o+PUkuGMVkow6TxE= X-Received: by 2002:a17:90b:1c08:b0:252:b342:a84a with SMTP id oc8-20020a17090b1c0800b00252b342a84amr20135581pjb.0.1686810901554; Wed, 14 Jun 2023 23:35:01 -0700 (PDT) MIME-Version: 1.0 References: <42ff58c7e8e4095a1f34@heytings.org> <835y7puw0z.fsf@gnu.org> In-Reply-To: <835y7puw0z.fsf@gnu.org> From: Al Petrofsky Date: Thu, 15 Jun 2023 02:34:48 -0400 Message-ID: Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000009729f805fe2544cd" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org, gregory@heytings.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000009729f805fe2544cd Content-Type: text/plain; charset="UTF-8" I apologize if I'm misunderstanding things. I'm certainly not suggesting removing any functionality that is useful on old monochrome ttys. The reason I became aware of this bug is that I am using a monochrome tty. > > Still, this anachronistic kludge should really be nuked entirely. > Why? And what's "anachronistic" about that code? What's anachronistic about that code (meaning the ispell-highlight-spelling-error-generic function) is that it uses a kludge that made it possible in pre-version-21 emacs to get some text displayed in inverse video on a tty even though emacs could not display faces on ttys. But since Emacs 21, on any tty that has a termcap "so" capability, you can get inverse-video simply by using an inverse-video face. So I don't think ispell-highlight-spelling-error-generic currently provides any functionality that isn't more conveniently and maintainably provided by ispell-highlight-spelling-error-overlay, with the additional benefit that the user can, if he wants, customize ispell-highlight-face to something other than inverse-video. (Making the default isearch face (and therefore the default ispell-highlight-face) be blue-on-magenta on color terminals but inverse-video on monochrome terminals is already handled automatically.) --0000000000009729f805fe2544cd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

I apologize= if I'm misunderstanding things.=C2=A0 I'm certainly not
suggest= ing removing any functionality that is useful on old monochrome
ttys.=C2= =A0 The reason I became aware of this bug is that I am using a
monochrom= e tty.

> > Still, this anachronistic kludge s= hould really be nuked entirely.

> Why?=C2=A0 And what's "= ;anachronistic" about that code?

What's anachronistic about= that code (meaning the
ispell-highlight-spelling-error-generic function= ) is that it uses a
kludge that made it possible in pre-version-21 emacs= to get some text
displayed in inverse video on a tty even though emacs = could not
display faces on ttys.=C2=A0 But since Emacs 21, on any tty th= at has a
termcap "so" capability, you can get inverse-video si= mply by using an
inverse-video face.

So I don't think ispell-= highlight-spelling-error-generic currently
provides any functionality th= at isn't more conveniently and
maintainably provided by ispell-highl= ight-spelling-error-overlay, with
the additional benefit that the user c= an, if he wants, customize
ispell-highlight-face to something other than= inverse-video.

(Making the default= isearch face (and therefore the default
ispell-highlight-face) be blue-= on-magenta on color terminals but
inverse-video on monochrome terminals = is already handled
automatically.)
=C2=A0
--0000000000009729f805fe2544cd-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 03:48:41 2023 Received: (at 64075) by debbugs.gnu.org; 15 Jun 2023 07:48:41 +0000 Received: from localhost ([127.0.0.1]:46066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9hij-0001QW-4K for submit@debbugs.gnu.org; Thu, 15 Jun 2023 03:48:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9hih-0001Q6-C7 for 64075@debbugs.gnu.org; Thu, 15 Jun 2023 03:48:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9hib-0006Wp-Kt; Thu, 15 Jun 2023 03:48:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ajEcmnGkMbuFLObGZ+WbbSMG/YfCw4BFlc/Eu+VcylE=; b=ZICGYAPqHshm RPrCrUOD0jh/XuHRVis7cHA3LUYL0zkqU4GZLzSvU7xT4kObsqtQypXoZb1icqbw/UZQ16hWuEL2r yeREKo+3YPK8KDcsWCrsp1o6P8wHxz7pKXiL1b8/8pSgtXoCM89stGZbRt5c1uPTry2qfTyskmIae xjiJHcLsa30LNmBLOYRIHO29mibxteyByHHKkIeqxIWdzXZbDo9IpDnx5nFeX/DWDImSLMdznECqO pBLaPVhmCj8XJom/2N46aCQb54dPcfwX7+9K8GrTghoHUj44gJ47tBIvQMQFK8xQVDTWaRKiE/1xu Oc2EuVeUSAetQJM6uxfeCA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9hib-0000rc-5I; Thu, 15 Jun 2023 03:48:33 -0400 Date: Thu, 15 Jun 2023 10:48:56 +0300 Message-Id: <83r0qdtbbr.fsf@gnu.org> From: Eli Zaretskii To: Al Petrofsky In-Reply-To: (message from Al Petrofsky on Thu, 15 Jun 2023 02:34:48 -0400) Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals References: <42ff58c7e8e4095a1f34@heytings.org> <835y7puw0z.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org, gregory@heytings.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Al Petrofsky > Date: Thu, 15 Jun 2023 02:34:48 -0400 > Cc: gregory@heytings.org, 64075@debbugs.gnu.org > > What's anachronistic about that code (meaning the > ispell-highlight-spelling-error-generic function) is that it uses a > kludge that made it possible in pre-version-21 emacs to get some text > displayed in inverse video on a tty even though emacs could not > display faces on ttys. But since Emacs 21, on any tty that has a > termcap "so" capability, you can get inverse-video simply by using an > inverse-video face. That this was written before Emacs 21 doesn't yet make it not useful now. > So I don't think ispell-highlight-spelling-error-generic currently > provides any functionality that isn't more conveniently and > maintainably provided by ispell-highlight-spelling-error-overlay, with > the additional benefit that the user can, if he wants, customize > ispell-highlight-face to something other than inverse-video. It's a working code whose replacement (basically, a cleanup) will mean extra work for us, and all that for quite rare situations. Based on my long experience with Emacs, it also means some subtle bugs in some even rarer use cases, which will take years to find and fix. No, thanks. > (Making the default isearch face (and therefore the default > ispell-highlight-face) be blue-on-magenta on color terminals but > inverse-video on monochrome terminals is already handled > automatically.) You've ignored what I wrote about that possibility: when faces are customized by users, they are usually customized in simplistic ways, and are thus unlikely to work for all the cases. IOW, once you allow for face customizations, it is very hard to make sure this face will still be distinct on a colorless terminal. If you or someone wants to present a patch that will make more terminals use ispell-highlight-spelling-error-overlay, and includes in that patch a suitable change to the ispell-highlight-face, then I'll gladly review it. Otherwise, I see this issue as closed by that last-year bugfix. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 15 19:19:44 2023 Received: (at 64075) by debbugs.gnu.org; 15 Jun 2023 23:19:44 +0000 Received: from localhost ([127.0.0.1]:48198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9wFj-0005an-DO for submit@debbugs.gnu.org; Thu, 15 Jun 2023 19:19:43 -0400 Received: from mail-pf1-f177.google.com ([209.85.210.177]:40197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q9wFh-0005aX-0n for 64075@debbugs.gnu.org; Thu, 15 Jun 2023 19:19:41 -0400 Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-657c4bcad0bso63976b3a.1 for <64075@debbugs.gnu.org>; Thu, 15 Jun 2023 16:19:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686871175; x=1689463175; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=EL6nC5qrLRpTJmJtLKdGJWDxr3GOJGdM1jLbH/XJT6s=; b=E95A9RicSR1ukDWu7bU/uOdTvYiB9icMCIdJ9ceqJEaMh+0MFiJSTES69yiMr8S09G Pen3zj/tot4wDItxkzZIcVrOCSctRSYfrIbRtPWRrlZ9XvfL7aDhrw+3pVslIccNTOw0 ruVH0lJTDvw0t2c3QZNSntr84vGqKkkYOMXX8DOBi6KaeDwI5yfmr8b2Imc0D/r0YexD Ck/2IBWMKpq8SH1Hq+yS+HowuwuORkGp8vGJHvqSfD4dmgJXAXN6MochFl+29vCyKviq 1QzuWvwJm7EbaWezT9/3qTDflP1CBm9MlzrCtp/561lXXXZwgBNea9+QredpX/2g7sBp RwAQ== X-Gm-Message-State: AC+VfDx+geKlp1GWwBNLhBJg0iKUu+4Qbjbym+WQ8XZqTN4RBsy/lhXY oe/iYIdqRC2hNeEHkEmAEE1Cnjv7IWKYzCzE725fIQ4ghAk= X-Google-Smtp-Source: ACHHUZ6hVeLCJeuczb8KCSCZcHkPxBf31vi0qJVUrXS9uOtxiR48Jv6ATLZ687Tnfzr2IYhaAjjYrUjO04LR+BoIjHs= X-Received: by 2002:a17:90b:3a8a:b0:25b:e2e1:e252 with SMTP id om10-20020a17090b3a8a00b0025be2e1e252mr527125pjb.3.1686871175205; Thu, 15 Jun 2023 16:19:35 -0700 (PDT) MIME-Version: 1.0 References: <42ff58c7e8e4095a1f34@heytings.org> <835y7puw0z.fsf@gnu.org> <83r0qdtbbr.fsf@gnu.org> In-Reply-To: <83r0qdtbbr.fsf@gnu.org> From: Al Petrofsky Date: Thu, 15 Jun 2023 19:19:23 -0400 Message-ID: Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals To: Eli Zaretskii Content-Type: multipart/alternative; boundary="0000000000002e187605fe334db8" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org, gregory@heytings.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000002e187605fe334db8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable [Resending because I mistakenly used reply rather than reply-all. Sorry] This ispell code is still broken in emacs-29.0.91. New recipe: emacs-29.0.91 -Q -nw --color=3Dno C-x b x RET M-x enriched-mode RET M-o b stonks M-$ SPC At this point, "stonks" should have been unchanged by the M-$ SPC, and therefore should still be bold, but instead only the "s" is bold and the "tonks" has the default face. Less importantly, while the ispell choices were displayed, "stonks" should have been in inverse-video, but it was not. The same results are obtained in an xterm version 372 or in a M-x term inside emacs-29.0.91. As was the case for the original recipe, changing "(display-color-p)" to "t" in ispell-highlight-spelling-error fixes the bugs. On Thu, Jun 15, 2023 at 3:48=E2=80=AFAM Eli Zaretskii wrote: > It's a working code whose replacement (basically, a cleanup) will mean > extra work for us, and all that for quite rare situations. Based on > my long experience with Emacs, it also means some subtle bugs in some > even rarer use cases, which will take years to find and fix. As you said in bug #56219, it's code that hasn't worked in any release in the last 15 years (now 16 years). What I'm saying is it's also code for a special case that hasn't existed for 22 years (that the terminal has an "so" capability but the display code can't render inverse-video faces on it), and that's why it makes more sense to me to simply eliminate this code and let monochrome terminals be handled by ispell-highlight-spelling-error-overlay (which is working code), rather than go in and try to fix the logic in a function that is a self-labeled "kludge" that depends on details of the low-level redisplay engine, and hope no new subtle bug has been introduced. > You've ignored what I wrote about that possibility: when faces are > customized by users, they are usually customized in simplistic ways, > and are thus unlikely to work for all the cases. IOW, once you allow > for face customizations, it is very hard to make sure this face will > still be distinct on a colorless terminal. Fortunately, the face doesn't really need to be distinct, because the location is also indicated by the cursor (which we all found to be a sufficient interface for isearch and ispell in Emacs's first decade or two). So this is a much lesser concern than the bugs at issue. But I think I do see what you mean. Starting with an empty HOME directory, I started emacs on a color terminal, used M-x customize to change the colors of the isearch face and save the changes, then restarted emacs on a monochrome terminal, and now the isearch face is rendered the same as the default face. I can easily use the defaults, or easily change the face to suit my preferences on whatever type of terminal I use most, but to get support for different types of terminals in a custom manner takes more work. Is this situation so bad that it would be preferable for isearch to be hard-coded to always use inverse video on monochrome displays? Is that your position? I think I prefer it as is, and would prefer that ispell worked the same way. I do wonder if it would make sense to make :inverse-video t in all the defaults for the isearch face, and swap all the default :background and :foreground properties. That would result in no change to the default appearances, with the benefit that after a simple customization of the colors during an emacs session on a color terminal, emacs sessions on monochrome terminals would still use inverse-video for isearch (and ispell). --0000000000002e187605fe334db8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
[Resending because I mistakenly used reply rather tha= n reply-all. Sorry]

This i= spell code is still broken in emacs-29.0.91.=C2=A0 New recipe:

=C2= =A0 =C2=A0emacs-29.0.91 -Q -nw --color=3Dno
=C2=A0 =C2=A0C-x b x RET
= =C2=A0 =C2=A0M-x enriched-mode RET
=C2=A0 =C2=A0M-o b stonks M-$ SPC
=
At this point, "stonks" should have been unchanged by the M-$= SPC, and
therefore should still be bold, but instead only the "s&q= uot; is bold and
the "tonks" has the default face.=C2=A0 Less = importantly, while the ispell
choices were displayed, "stonks"= should have been in inverse-video,
but it was not.

The same resu= lts are obtained in an xterm version 372 or in a M-x term
inside emacs-2= 9.0.91.

As was the case for the original recipe, changing "(dis= play-color-p)"
to "t" in ispell-highlight-spelling-error = fixes the bugs.
On Thu, Jun 15, 2023 at 3:48=E2=80=AFAM Eli Zaretskii <eliz@gnu.org> wrote:

> = It's a working code whose replacement (basically, a cleanup) will mean<= br>> extra work for us, and all that for quite rare situations.=C2=A0 Ba= sed on
> my long experience with Emacs, it also means some subtle bug= s in some
> even rarer use cases, which will take years to find and f= ix.

As you said in bug #56219, it's code that hasn't = worked in any release
in the last 15 years (now 16 years).=C2=A0 What I&= #39;m saying is it's also
code for a special case that hasn't ex= isted for 22 years (that the
terminal has an "so" capability b= ut the display code can't render
inverse-video faces on it), and tha= t's why it makes more sense to me
to simply eliminate this code and = let monochrome terminals be handled
by ispell-highlight-spelling-error-o= verlay (which is working code),
rather than go in and try to fix the log= ic in a function that is a
self-labeled "kludge" that depends = on details of the low-level
redisplay engine, and hope no new subtle bug= has been introduced.=

> You've ignored what I wrote about that possibility: when f= aces are
> customized by users, they are usually customized in simpli= stic ways,
> and are thus unlikely to work for all the cases.=C2=A0 I= OW, once you allow
> for face customizations, it is very hard to make= sure this face will
> still be distinct on a colorless terminal.
=
Fortunately, the face doesn't really need to be distinct, be= cause the
location is also indicated by the cursor (which we all found t= o be a
sufficient interface for isearch and ispell in Emacs's first = decade or
two).=C2=A0 So this is a much lesser concern than the bugs at = issue.

But I think I do see what you mean.=C2=A0 Starting with an em= pty HOME
directory, I started emacs on a color terminal, used M-x custom= ize to
change the colors of the isearch face and save the changes, then<= br>restarted emacs on a monochrome terminal, and now the isearch face isrendered the same as the default face.

I can easily use the default= s, or easily change the face to suit my
preferences on whatever type of = terminal I use most, but to get
support for different types of terminals= in a custom manner takes more
work.

Is this situation so bad tha= t it would be preferable for isearch to be
hard-coded to always use inve= rse video on monochrome displays?=C2=A0 Is
that your position?=C2=A0 I t= hink I prefer it as is, and would prefer that
ispell worked the same way= .

I do wonder if it would make sense to make :inverse-video t in all= the
defaults for the isearch face, and swap all the default :background=
and :foreground properties.=C2=A0 That would result in no change to the=
default appearances, with the benefit that after a simple
customizat= ion of the colors during an emacs session on a color
terminal, emacs ses= sions on monochrome terminals would still use
inverse-video for isearch = (and ispell).

--0000000000002e187605fe334db8-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 16 02:27:16 2023 Received: (at 64075) by debbugs.gnu.org; 16 Jun 2023 06:27:16 +0000 Received: from localhost ([127.0.0.1]:48508 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qA2vT-0007at-ED for submit@debbugs.gnu.org; Fri, 16 Jun 2023 02:27:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qA2vQ-0007af-Nq for 64075@debbugs.gnu.org; Fri, 16 Jun 2023 02:27:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qA2vK-0006hv-Pm; Fri, 16 Jun 2023 02:27:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=l+UHUoex74rj5xwg0aPsm9y/sUt6ImaMQoIdMcWe9kQ=; b=OoIPfGq7OCTd HFnCU3s4pri8L9VCv1Fe11uw71ARg1UGADk4BUQy0tLIZw4IOWGh1ztqJfA2cEZGpbKVa1mfO37zj AauPrgIDBOiCd3od3fRQmHDd2JTySRlUF5/irIbb9CFtpzlxMDz9X31oOOMxwcRmhlnBawzbpkTAw OtufgQQ64Rr15m+NjRaRheHmL6cgB+41WnHTJ4Y7HPQCvO/aHt91c2qCuSWK0C25UiW0T2v6LOUEP QSLaAmRj2JV+aHJED3mVz5e9IXdQrDstcOHWWC/JINSwF9n7OprLIIDb2ECDxyL5phN2rxlD+yuKU rE59u/AM8hbwKYZ4A4031Q==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qA2vK-0003nq-6R; Fri, 16 Jun 2023 02:27:06 -0400 Date: Fri, 16 Jun 2023 09:27:29 +0300 Message-Id: <835y7nudke.fsf@gnu.org> From: Eli Zaretskii To: Al Petrofsky In-Reply-To: (message from Al Petrofsky on Thu, 15 Jun 2023 19:19:23 -0400) Subject: Re: bug#64075: 28.2; ispell broken on uncolored terminals References: <42ff58c7e8e4095a1f34@heytings.org> <835y7puw0z.fsf@gnu.org> <83r0qdtbbr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 64075 Cc: 64075@debbugs.gnu.org, gregory@heytings.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Al Petrofsky > Date: Thu, 15 Jun 2023 19:19:23 -0400 > Cc: gregory@heytings.org, 64075@debbugs.gnu.org > > emacs-29.0.91 -Q -nw --color=no > C-x b x RET > M-x enriched-mode RET > M-o b stonks M-$ SPC > > At this point, "stonks" should have been unchanged by the M-$ SPC, and > therefore should still be bold, but instead only the "s" is bold and > the "tonks" has the default face. Less importantly, while the ispell > choices were displayed, "stonks" should have been in inverse-video, > but it was not. Your expectations are wrong: no one said pasting arbitrary text in Enriched mode over a word should necessarily retain the face information from the original miss-spelled word. > As was the case for the original recipe, changing "(display-color-p)" > to "t" in ispell-highlight-spelling-error fixes the bugs. Because that uses overlays, so it doesn't interfere with faces. But you haven't tested it with any other feature that uses overlays with face information. So your testing is not balanced: it is designed to emphasize the disadvantages of only one method, and disregards the disadvantages of the other. > > It's a working code whose replacement (basically, a cleanup) will mean > > extra work for us, and all that for quite rare situations. Based on > > my long experience with Emacs, it also means some subtle bugs in some > > even rarer use cases, which will take years to find and fix. > > As you said in bug #56219, it's code that hasn't worked in any release > in the last 15 years (now 16 years). That's not what I said in that bug. > What I'm saying is it's also > code for a special case that hasn't existed for 22 years (that the > terminal has an "so" capability but the display code can't render > inverse-video faces on it), and that's why it makes more sense to me > to simply eliminate this code and let monochrome terminals be handled > by ispell-highlight-spelling-error-overlay (which is working code), > rather than go in and try to fix the logic in a function that is a > self-labeled "kludge" that depends on details of the low-level > redisplay engine, and hope no new subtle bug has been introduced. I've considered your proposal and decided against removing this code. Please don't keep pushing for it, as I won't change my mind just because you are reiterating the same arguments. > I can easily use the defaults, or easily change the face to suit my > preferences on whatever type of terminal I use most, but to get > support for different types of terminals in a custom manner takes more > work. That was exactly my point. So if we want to make ispell.el work better in these cases, we need more complex setting of the faces used in this case, and in particular to depend less on (possibly customized) other faces. > Is this situation so bad that it would be preferable for isearch to be > hard-coded to always use inverse video on monochrome displays? Is > that your position? I think I prefer it as is, and would prefer that > ispell worked the same way. My position is as I already explained it. let me reiterate it: . I'm okay with adding more conditions to use the overlay code, by testing terminal capabilities other that display-color-p . Each such capability should have a distinct face to go with it, and that face should use the corresponding display capabilities without inheriting from other, more general faces It is possible that, if we support enough display capabilities in the above way, the set of terminals that use ispell-highlight-spelling-error-generic will become much smaller, or even empty. But the difference is that we will have a comprehensive and sound solution based on specific terminal capabilities instead of a hack that works only in some situations. > I do wonder if it would make sense to make :inverse-video t in all the > defaults for the isearch face, and swap all the default :background > and :foreground properties. That would result in no change to the > default appearances, with the benefit that after a simple > customization of the colors during an emacs session on a color > terminal, emacs sessions on monochrome terminals would still use > inverse-video for isearch (and ispell). Sorry, we will not change the defaults for a face as general and widely-used as 'isearch', because such a change will cause annoyance from many users. Definitely not due to marginal use cases such as this one. (You can, of course, make such face customizations locally.) This problem should be solved where it happens: in ispell.el, not by changing a much wider used face.