From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#32142: WG: 26.1; Problems with flyspell-region Date: Fri, 13 Jul 2018 22:43:48 +0300 Message-ID: <83zhyuc45n.fsf@gnu.org> References: <745366070.6138533.1531494673065.ref@mail.yahoo.com> <745366070.6138533.1531494673065@mail.yahoo.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1531510929 21609 195.159.176.226 (13 Jul 2018 19:42:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2018 19:42:09 +0000 (UTC) Cc: 32142@debbugs.gnu.org To: "R. Diez" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 13 21:42:05 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fe3x6-0005UV-0o for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jul 2018 21:42:04 +0200 Original-Received: from localhost ([::1]:38955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fe3zC-00030r-Sa for geb-bug-gnu-emacs@m.gmane.org; Fri, 13 Jul 2018 15:44:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fe3z5-00030f-Pf for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2018 15:44:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fe3z2-0006Hc-M0 for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2018 15:44:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:51368) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fe3z2-0006HS-H3 for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2018 15:44:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fe3z0-0004pB-53 for bug-gnu-emacs@gnu.org; Fri, 13 Jul 2018 15:44:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 13 Jul 2018 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32142 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 32142-submit@debbugs.gnu.org id=B32142.153151103618527 (code B ref 32142); Fri, 13 Jul 2018 19:44:02 +0000 Original-Received: (at 32142) by debbugs.gnu.org; 13 Jul 2018 19:43:56 +0000 Original-Received: from localhost ([127.0.0.1]:59265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fe3yu-0004ol-Iv for submit@debbugs.gnu.org; Fri, 13 Jul 2018 15:43:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:40195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fe3yt-0004oY-3h for 32142@debbugs.gnu.org; Fri, 13 Jul 2018 15:43:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fe3yk-0005h2-Pq for 32142@debbugs.gnu.org; Fri, 13 Jul 2018 15:43:49 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54751) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fe3yk-0005gg-Kb; Fri, 13 Jul 2018 15:43:46 -0400 Original-Received: from [176.228.60.248] (port=4158 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1fe3yk-00022X-2V; Fri, 13 Jul 2018 15:43:46 -0400 In-reply-to: <745366070.6138533.1531494673065@mail.yahoo.com> (rdiezmail-emacs@yahoo.de) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:148503 Archived-At: > Date: Fri, 13 Jul 2018 15:11:13 +0000 (UTC) > From: "R. Diez" > > > I mentioned some problems with flyspell-region on the help-gnu-emacs mailing list here: > > https://lists.gnu.org/archive/html/help-gnu-emacs/2018-07/msg00100.html And I replied to some of them. > Issue 1) The spell check is performed just once, and is not updated as I type inside that region. This is what I wrote on the mailing list: > > > "If I mark a region (click on the beginning, hold shift, move to the end), and then run flyspell-region, the region gets spell-checked, and all the dictionary misses are underlined in red, as expected. But then, if I fix the words, the spelling marking (the red underlining) is not removed. It looks like Flyspell is not 'live' anymore within that region. The "overlay" is left behind as static font faces." You need to turn on flyspell-mode if you want the misspelled words to be unhighlighted when you fix them. > I do not want to activate Flyspell for the whole buffer, because that would lead to too much red underlining. > > If I just wanted a single-shot, I would use ispell-region instead. We don't have a spell-checking feature that watches correction of misspelled words without turning on flyspell-mode. You could manually turn on flyspell-mode when you correct the misspelled words, then turn it back off when you are done with correcting and want to continue to type new text. And yes, ispell-region is better suited to your workflow, if I understand it correctly. > Issue 2) There is no easy way to remove the red underlining (overlays) left behind by flyspell-region. See above. You can also toggle flyspell-mode. > Issue 3) Disabling flyspell-persistent-highlight renders flyspell-region useless. > > Contrary to some of the answers in the mailing list, that combination does not work at all. This is what I am seeing: > > "What I mean is that, if you turn flyspell-persistent-highlight off, then flyspell-region does nothing other than consume CPU cycles. The red underlining for dictionary misses does not show up at all." That description is inaccurate. The misspelled words _are_ highlighted, but then the highlight is removed when cursor moves to the next word, per the intended effect of flyspell-persistent-highlight being nil. > Again, I do not want to turn on Flyspell for the whole buffer. If flyspell-region is supposed to work only when the Flyspell Mode is active, it should check, and error if it is not active. But that kind of defeats the purpose of having a flyspell-region. The command flyspell-region is part of Flyspell mode, and is designed to work in a buffer where flyspell-mode is turned on. Its intended use is to spell-check a region that you didn't type, as if you did type it. If you want to spell-check a region without turning on flyspell-mode, I suggest to use ispell-region instead.