all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Cc: "R. Diez" <rdiezmail-emacs@yahoo.de>
Subject: Re: Flyspell difficult to configure, documentation not honest
Date: Thu, 12 Jul 2018 19:26:17 +0300	[thread overview]
Message-ID: <83va9ke7yu.fsf@gnu.org> (raw)
In-Reply-To: <974173872.5393015.1531407541695@mail.yahoo.com> (rdiezmail-emacs@yahoo.de)

> Date: Thu, 12 Jul 2018 14:59:01 +0000 (UTC)
> From: "R. Diez" <rdiezmail-emacs@yahoo.de>
> 
> I have been trying to use Flyspell, and I found it difficult to configure.

I hear you, but FWIW I find Flyspell very easy to use.

> You have to search the Internet in order to find good tips. After some time, I found this page, which summarises Flyspell's shortcomings:
> 
> http://ergoemacs.org/emacs/emacs_spell_checker_problems.html

It is outdated and partially incorrect (e.g., right mouse click does
work on Flyspell).

> If the documentation were honest, it would mention those shortcomings itself, maybe as part of a CAVEATS section. Otherwise, you are lead to believe that Flyspell is fine and dandy, which clearly is not the case. After all, we are all used to 'proper' spell checkers all around us (for example, in LibreOffice).

I added a few sentences to the Emacs manual to that effect.

> I am using Emacs 26.1. The source code comments are outdated. For example:
> 
> 
> ;; Some user variables control the behavior of flyspell.  They are
> ;; those defined under the `User variables' comment.
> 
> However, I found no "user variables" comment anywhere on that file.
> 
> Furthermore, this comment does not mention anything about literal strings being checked too (more on that further below):

I fixed both of those.  However, I must say that

  M-x customize-group RET flyspell RET

would have brought you faster to the stuff you need than reading the
comments.  My suggestion is to use the built-in documentation (the doc
strings, the manual, and the customizable options) first, and only if
they don't provide enough info, to read the code.

> The first big gotcha was trying to set up automatic language detection, which should arguably be part of Flyspell.

This is a general issue in Emacs: we don't yet have any notion of
language of the text.  In a plain-text editor such as Emacs that is
capable of mixing any number of different languages and scripts in the
same buffer, this is not an easy job.  For now, you must change
dictionaries whenever you need to spell-check text in a different
language, unless you are using Hunspell, which can load more than one
dictionary at the same time.

> I have a big text file with all my assorted notes (I haven't learnt Org Mode yet). I cannot spell-check all of it, that would turn up too many spurious errors.

I usually find the Ispell facilities to accept "misspelled" words
either temporarily or permanently, quite adequate.  Type SPC or 'a' to
do any of those, when spell-checking a region or the whole buffer.
(Flyspell is not the right feature for this job; use ispell-region
instead.  Flyspell is mainly meant to check what you type on the fly.)

> I tried flyspell-region, and that is one of the biggest surprises: the spell check is performed just once, and is not updated as I type inside that region.

Like everything else in Flyspell, misspelled words are re-checked when
you move across them or modify them.  That's a feature.  If you don't
like that, I suggest to use ispell-region instead.

> Well, I can manually recheck, however inconvenient. But the biggest surprise is trying to remove the spelling marks at the end.

If the word is still a misspelling, why should the mark be removed?

> I nevertheless tried to push forwards with Flyspell, because alternatives like Wcheck Mode or Speck did not seem quite ready yet. Next step was flyspell-prog-mode . And here I found the next big drawback: it checks literal strings too, even the filenames inside C's #include <blah/blah-h> preprocessor directives, littering too much source code with error marks.

They are strings, aren't they?  How should Flyspell know that some
string is a file name?

> Trying to limit spell checking to just source-code comments is hard. I found this page that explains how to do it:
> 
> http://blog.binchen.org/posts/effective-spell-check-in-emacs.html
> 
> But I haven't quite understood it yet (I am no Lisp expert). How about adding a simple customizable variable to turn literal string checking on and off?

I suggest to submit a feature request for that, using
report-emacs-bug.

> To top it all, there is one little surprise in store: disabling flyspell-persistent-highlight renders flyspell-region useless.

Disabling flyspell-persistent-highlight turns off highlight once point
moves off the misspelled word.  I've now added that to the doc string.

> The whole experience reminds me of the expression "death by a thousand paper cuts".

Sorry to hear that.



  reply	other threads:[~2018-07-12 16:26 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <974173872.5393015.1531407541695.ref@mail.yahoo.com>
2018-07-12 14:59 ` Flyspell difficult to configure, documentation not honest R. Diez
2018-07-12 16:26   ` Eli Zaretskii [this message]
     [not found] ` <mailman.3464.1531407559.1292.help-gnu-emacs@gnu.org>
2018-07-12 17:30   ` Emanuel Berg
2018-07-12 21:01     ` Brett Gilio
2018-07-13  7:15       ` Eli Zaretskii
2018-07-13 11:31       ` Gregor Zattler
2018-07-13 12:50         ` Devin Prater
2018-07-13 13:35         ` Teemu Likonen
     [not found]         ` <mailman.3518.1531488931.1292.help-gnu-emacs@gnu.org>
2018-07-13 14:42           ` Emanuel Berg
2018-07-13  7:41     ` Eric S Fraga
2018-07-13 17:08       ` Bob Newell
2018-07-14  8:58         ` Eric S Fraga
2018-07-14  9:15           ` tomas
2018-07-14 17:47           ` Bob Newell
2018-07-14 18:59             ` Devin Prater
2018-07-15  1:45           ` Brett Gilio
2018-07-15  2:42             ` Eli Zaretskii
     [not found]     ` <mailman.3502.1531467702.1292.help-gnu-emacs@gnu.org>
2018-07-13 10:22       ` Emanuel Berg
2018-07-13 17:04         ` Eric S Fraga
2018-07-13 19:02           ` Brett Gilio
2018-07-14  9:01             ` Eric S Fraga
     [not found]         ` <mailman.3536.1531501486.1292.help-gnu-emacs@gnu.org>
2018-07-13 18:41           ` Emanuel Berg
2018-07-13 19:06             ` Brett Gilio
2018-07-14  9:03               ` Eric S Fraga
2018-07-14  9:02             ` Eric S Fraga
     [not found] <1186940967.5630978.1531432200575.ref@mail.yahoo.com>
2018-07-12 21:50 ` R. Diez
2018-07-13  6:35   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83va9ke7yu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    --cc=rdiezmail-emacs@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.