all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problems with flyspell and accents
@ 2022-10-20  5:20 Sébastien Gendre
  2022-10-20  6:34 ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Sébastien Gendre @ 2022-10-20  5:20 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

In french texts shown in an Emacs buffer, I got a problem with flyspell and accents.

Every words with an accent is seen as wrong before or after the char
with an accent.

Exemple, the word "résumer". The last part "sumer" is underlined in red.
And if I look at the flyspell suggestions, it offer a substitution to the
word "sumer".

I got this problem since the update to Emacs 28.1. But I don't know if
it's a bug or a config problem. I want to find why before open a bug for
nothing.


Best regards
-------
Gendre Sébastien




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  5:20 Problems with flyspell and accents Sébastien Gendre
@ 2022-10-20  6:34 ` Eli Zaretskii
  2022-10-20  7:13   ` Sébastien Gendre
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2022-10-20  6:34 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sébastien Gendre <seb@k-7.ch>
> Date: Thu, 20 Oct 2022 07:20:21 +0200
> 
> In french texts shown in an Emacs buffer, I got a problem with flyspell and accents.
> 
> Every words with an accent is seen as wrong before or after the char
> with an accent.
> 
> Exemple, the word "résumer". The last part "sumer" is underlined in red.
> And if I look at the flyspell suggestions, it offer a substitution to the
> word "sumer".

Sounds like the speller was set up for the English language, not for
French.  Or maybe the encoding of the non-ASCII characters sent to the
speller is wrong.

Does this happen in "emacs -Q"?  Which speller are you using, and did
you perhaps upgrade the speller as well when you switched to Emacs 28?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  6:34 ` Eli Zaretskii
@ 2022-10-20  7:13   ` Sébastien Gendre
  2022-10-20  7:37     ` tomas
  2022-10-20  8:10     ` Eli Zaretskii
  0 siblings, 2 replies; 8+ messages in thread
From: Sébastien Gendre @ 2022-10-20  7:13 UTC (permalink / raw)
  To: help-gnu-emacs


As the word suggested by ispell where in french, I think the default
dictionary is set to French language (like my system).

But if, after called `flyspell-mode`, I set the dictionary to fr_FR with
`ispell-change-dictionary`, the problem is gone.

It's strange, because before Emacs 28.1, I didn't need to tell ispell to
speak french. It was by default.

But now, I know I need to set the default language in my init.el file:
```
(ispell-change-dictionary "fr_FR")
```

But how I need to set the dictionary at Emacs start now ?

How can I find what is the default dictionary if I not set it ?

How can I find the speller used ?

Eli Zaretskii <eliz@gnu.org> writes:
> you perhaps upgrade the speller as well when you switched to Emacs 28?

Probably, it was after an upgrade of Fedora to a new major version.









Eli Zaretskii <eliz@gnu.org> writes:

>> From: Sébastien Gendre <seb@k-7.ch>
>> Date: Thu, 20 Oct 2022 07:20:21 +0200
>> 
>> In french texts shown in an Emacs buffer, I got a problem with flyspell and accents.
>> 
>> Every words with an accent is seen as wrong before or after the char
>> with an accent.
>> 
>> Exemple, the word "résumer". The last part "sumer" is underlined in red.
>> And if I look at the flyspell suggestions, it offer a substitution to the
>> word "sumer".
>
> Sounds like the speller was set up for the English language, not for
> French.  Or maybe the encoding of the non-ASCII characters sent to the
> speller is wrong.
>
> Does this happen in "emacs -Q"?  Which speller are you using, and did
> you perhaps upgrade the speller as well when you switched to Emacs 28?




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  7:13   ` Sébastien Gendre
@ 2022-10-20  7:37     ` tomas
  2022-10-20  8:10     ` Eli Zaretskii
  1 sibling, 0 replies; 8+ messages in thread
From: tomas @ 2022-10-20  7:37 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 621 bytes --]

On Thu, Oct 20, 2022 at 09:13:09AM +0200, Sébastien Gendre wrote:
> 
> As the word suggested by ispell where in french, I think the default
> dictionary is set to French language (like my system).
> 
> But if, after called `flyspell-mode`, I set the dictionary to fr_FR with

I don't have even a shallow knowledge of ispell, so take my advice
with care...

To me, it looks that whatever is deciding "what is a word" to wrap
it up and send it to the spell checker doesn't consider accented
characters to be word characters.

I would first look at what your current mode "sees as a word".

Cheers
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  7:13   ` Sébastien Gendre
  2022-10-20  7:37     ` tomas
@ 2022-10-20  8:10     ` Eli Zaretskii
  2022-10-20  8:22       ` tomas
  2022-10-20  9:59       ` Sébastien Gendre
  1 sibling, 2 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-10-20  8:10 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sébastien Gendre <seb@k-7.ch>
> Date: Thu, 20 Oct 2022 09:13:09 +0200
> 
> 
> As the word suggested by ispell where in french, I think the default
> dictionary is set to French language (like my system).
> 
> But if, after called `flyspell-mode`, I set the dictionary to fr_FR with
> `ispell-change-dictionary`, the problem is gone.

So the default dictionary is not for French, or so it seems.

> It's strange, because before Emacs 28.1, I didn't need to tell ispell to
> speak french. It was by default.
> 
> But now, I know I need to set the default language in my init.el file:
> ```
> (ispell-change-dictionary "fr_FR")
> ```
> 
> But how I need to set the dictionary at Emacs start now ?
> 
> How can I find what is the default dictionary if I not set it ?
> 
> How can I find the speller used ?

Let's start with the latter: after you turn on flyspell-mode, type
"M-x list-processes RET", and see what speller are you running.  I
think the issue of setting up the default dictionary might depend on
that.

Is that in "emacs -Q", btw?  If not, please try in "emacs -Q" first.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  8:10     ` Eli Zaretskii
@ 2022-10-20  8:22       ` tomas
  2022-10-20  9:59       ` Sébastien Gendre
  1 sibling, 0 replies; 8+ messages in thread
From: tomas @ 2022-10-20  8:22 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 448 bytes --]

On Thu, Oct 20, 2022 at 11:10:24AM +0300, Eli Zaretskii wrote:
> > From: Sébastien Gendre <seb@k-7.ch>
> > Date: Thu, 20 Oct 2022 09:13:09 +0200

[...]

> > But if, after called `flyspell-mode`, I set the dictionary to fr_FR with
> > `ispell-change-dictionary`, the problem is gone.
> 
> So the default dictionary is not for French, or so it seems.

Oh, I didn't see that. Then, I'd agree with you, Eli.

Sorry for the noise
-- 
t

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  8:10     ` Eli Zaretskii
  2022-10-20  8:22       ` tomas
@ 2022-10-20  9:59       ` Sébastien Gendre
  2022-10-20 10:41         ` Eli Zaretskii
  1 sibling, 1 reply; 8+ messages in thread
From: Sébastien Gendre @ 2022-10-20  9:59 UTC (permalink / raw)
  To: help-gnu-emacs


Eli Zaretskii <eliz@gnu.org> writes:
> Let's start with the latter: after you turn on flyspell-mode, type
> "M-x list-processes RET", and see what speller are you running.

Based on list-processes, the command run for ispell is:
/usr/bin/enchant-2 -a -m -B

> Is that in "emacs -Q", btw?  If not, please try in "emacs -Q" first.

Yep, I used `emacs -q`.

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Sébastien Gendre <seb@k-7.ch>
>> Date: Thu, 20 Oct 2022 09:13:09 +0200
>> 
>> 
>> As the word suggested by ispell where in french, I think the default
>> dictionary is set to French language (like my system).
>> 
>> But if, after called `flyspell-mode`, I set the dictionary to fr_FR with
>> `ispell-change-dictionary`, the problem is gone.
>
> So the default dictionary is not for French, or so it seems.
>
>> It's strange, because before Emacs 28.1, I didn't need to tell ispell to
>> speak french. It was by default.
>> 
>> But now, I know I need to set the default language in my init.el file:
>> ```
>> (ispell-change-dictionary "fr_FR")
>> ```
>> 
>> But how I need to set the dictionary at Emacs start now ?
>> 
>> How can I find what is the default dictionary if I not set it ?
>> 
>> How can I find the speller used ?
>
> Let's start with the latter: after you turn on flyspell-mode, type
> "M-x list-processes RET", and see what speller are you running.  I
> think the issue of setting up the default dictionary might depend on
> that.
>
> Is that in "emacs -Q", btw?  If not, please try in "emacs -Q" first.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Problems with flyspell and accents
  2022-10-20  9:59       ` Sébastien Gendre
@ 2022-10-20 10:41         ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-10-20 10:41 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Sébastien Gendre <seb@k-7.ch>
> Date: Thu, 20 Oct 2022 11:59:40 +0200
> 
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> > Let's start with the latter: after you turn on flyspell-mode, type
> > "M-x list-processes RET", and see what speller are you running.
> 
> Based on list-processes, the command run for ispell is:
> /usr/bin/enchant-2 -a -m -B

If it's Enchant, it is also important to understand whether it runs
Aspell or Hunspell as its back-end.

If it's Hunspell, then either your locale is not set to something
French, or the default Hunspell dictionary is not a French dictionary.
If it's Aspell, I don't know (I don't use it).



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-10-20 10:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-20  5:20 Problems with flyspell and accents Sébastien Gendre
2022-10-20  6:34 ` Eli Zaretskii
2022-10-20  7:13   ` Sébastien Gendre
2022-10-20  7:37     ` tomas
2022-10-20  8:10     ` Eli Zaretskii
2022-10-20  8:22       ` tomas
2022-10-20  9:59       ` Sébastien Gendre
2022-10-20 10:41         ` Eli Zaretskii

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.