GNU bug report logs -
#26125
ispell fails to detect certain typos
Previous Next
Reported by: Leon Meier <Leon.Meier <at> yandex.ru>
Date: Thu, 16 Mar 2017 12:31:02 UTC
Severity: normal
Done: Arash Esbati <arash <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26125 in the body.
You can then email your comments to 26125 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 12:31:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leon Meier <Leon.Meier <at> yandex.ru>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Thu, 16 Mar 2017 12:31:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Used packages:
- auctex 11.90.0,
- emacs 24.3.1 (24.3-22.1 on OpenSuse),
- ispell 3.3.02 (3.3.02-113.1 on OpenSuse),
- ispell-american (american.aff v 1.23, 3.3.02-113.1 on OpenSuse)
Bug description:
Create the file q.tex with the following contents (without the square
brackets):
[
\(\sigma\) contradition
%%% Local Variables:
%%% ispell-local-dictionary: "american"
%%% End:
]
Then, open q.tex with emacs when auctex is loaded. Issue
M-x ispell-buffer <RET>
Observe that the typo in the word "contradition" remains unnoticed.
With auctex 11.87-11.42, taken from opensuse leap 42.2 by default, the
bug is not present: the typo "contradition" is correctly reported.
Any bugfix?
Thx in advance,
Leon
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 14:23:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 26125 <at> debbugs.gnu.org (full text, mbox):
Leon Meier <Leon.Meier <at> yandex.ru> writes:
> Used packages:
> - auctex 11.90.0,
> - emacs 24.3.1 (24.3-22.1 on OpenSuse),
> - ispell 3.3.02 (3.3.02-113.1 on OpenSuse),
> - ispell-american (american.aff v 1.23, 3.3.02-113.1 on OpenSuse)
>
> Bug description:
>
> Create the file q.tex with the following contents (without the square
> brackets):
> [
> \(\sigma\) contradition
>
> %%% Local Variables:
> %%% ispell-local-dictionary: "american"
> %%% End:
> ]
>
> Then, open q.tex with emacs when auctex is loaded. Issue
> M-x ispell-buffer <RET>
>
> Observe that the typo in the word "contradition" remains unnoticed.
>
> With auctex 11.87-11.42, taken from opensuse leap 42.2 by default, the
> bug is not present: the typo "contradition" is correctly reported.
AUCTeX 11.90 does some additions to `ispell-tex-skip-alists' in order to
skip more macro arguments and environments; they are all in
tex-ispell.el. The scenario you describe is strange, and I can't tell
why it happens.
> Any bugfix?
I'm not on OpenSuse and don't use ispell (I use Hunspell), but I can
offer some possibilities you can try:
1) Try $\sigma$ contradition -- it has the same effect within LaTeX
2) Try \( \sigma \) contradition -- note the spaces around \sigma; same
effect, but ugly
3) Eval the form in verbatim environment below and run ispell again:
--8<---------------cut here---------------start------------->8---
\documentclass{article}
\begin{document}
\begin{verbatim}
(TeX-ispell-skip-setcar
'(("\\\\(" . "\\\\)")))
\end{verbatim}
\(\sigma\) contradition
$\sigma$ contradition
\end{document}
--8<---------------cut here---------------end--------------->8---
If it works, I can add it to tex-ispell.el.
4) Disable the new feature by setting `TeX-ispell-extend-skip-list' to
nil.
HTH.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 14:40:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 26125 <at> debbugs.gnu.org (full text, mbox):
> 1) Try $\sigma$ contradition -- it has the same effect within LaTeX
Then ispell complains, which is its correct behavior.
>
> 2) Try \( \sigma \) contradition -- note the spaces around \sigma; same
> effect, but ugly
Then ispell also complains, which is also its correct behavior.
>
> 3) Eval the form in verbatim environment below and run ispell again:
>
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
>
> \begin{document}
>
> \begin{verbatim}
> (TeX-ispell-skip-setcar
> '(("\\\\(" . "\\\\)")))
> \end{verbatim}
>
> \(\sigma\) contradition
>
> $\sigma$ contradition
>
> \end{document}
> --8<---------------cut here---------------end--------------->8---
I'm not quite sure what you mean. I did
M-x eval-expression <RET>
and pasted
(TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)")))
into the minibuffer.
After that, ispell complained correctly.
>
> If it works, I can add it to tex-ispell.el.
>
> 4) Disable the new feature by setting `TeX-ispell-extend-skip-list' to
> nil.
After appending
(setq TeX-ispell-extend-skip-list nil)
to .emacs , ispell complained correctly.
Thank you, that helped.
The options 1) and 2) are out of question in the long run for legacy
latex code with \( and \) you wouldn't like to change. I wouldn't like
to run eval-expression each time I start emacs, so 3) is out of question
for me now. I guess, 4) could be a current workaround for me.
Note that if you replace \sigma by x (or some other Latin letter),
ispell also complains correctly, so, per se, \( \) poses a problem only
under certain special circumstances.
Best,
Leon
>
> HTH.
>
> Best, Arash
>
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 15:04:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 26125 <at> debbugs.gnu.org (full text, mbox):
Leon Meier <Leon.Meier <at> yandex.ru> writes:
>> 1) Try $\sigma$ contradition -- it has the same effect within LaTeX
> Then ispell complains, which is its correct behavior.
>
>>
>> 2) Try \( \sigma \) contradition -- note the spaces around \sigma; same
>> effect, but ugly
> Then ispell also complains, which is also its correct behavior.
>
>>
>> 3) Eval the form in verbatim environment below and run ispell again:
>>
>> --8<---------------cut here---------------start------------->8---
>> \documentclass{article}
>>
>> \begin{document}
>>
>> \begin{verbatim}
>> (TeX-ispell-skip-setcar
>> '(("\\\\(" . "\\\\)")))
>> \end{verbatim}
>>
>> \(\sigma\) contradition
>>
>> $\sigma$ contradition
>>
>> \end{document}
>> --8<---------------cut here---------------end--------------->8---
> I'm not quite sure what you mean. I did
> M-x eval-expression <RET>
> and pasted
> (TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)")))
> into the minibuffer.
> After that, ispell complained correctly.
Yes, that is correct. You also could have put the cursor after the last
) and hit `C-x C-e'.
>> 4) Disable the new feature by setting `TeX-ispell-extend-skip-list' to
>> nil.
> After appending
>
> (setq TeX-ispell-extend-skip-list nil)
>
> to .emacs , ispell complained correctly.
>
> Thank you, that helped.
>
> The options 1) and 2) are out of question in the long run for legacy
> latex code with \( and \) you wouldn't like to change. I wouldn't like
> to run eval-expression each time I start emacs, so 3) is out of
> question for me now.
You can put something like this in your .emacs; then Emacs does it
automatically for you:
(with-eval-after-load "tex-ispell"
(TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)"))))
> I guess, 4) could be a current workaround for me.
>
> Note that if you replace \sigma by x (or some other Latin letter),
> ispell also complains correctly, so, per se, \( \) poses a problem
> only under certain special circumstances.
Many thanks for testing. Indeed, this seems to be an interesting case.
At any rate, I will add the solution to tex-ispell.el. You can use the
code above until then, and remove it once you have installed the next
version.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 15:13:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 26125 <at> debbugs.gnu.org (full text, mbox):
Dear Arash:
> You can put something like this in your .emacs; then Emacs does it
> automatically for you:
>
> (with-eval-after-load "tex-ispell"
> (TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)"))))
These lines in .emacs result in
[
Warning (initialization): An error occurred while loading
`/home/malkis/.emacs':
Symbol's function definition is void: with-eval-after-load
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file. Start Emacs with
the `--debug-init' option to view a complete error backtrace.
]
Feel free to tell me to do more testing for you with the current auctex.
(For production purposes I'm going to switch back to the old version
shipped with Opensuse 42.2 anyway.)
Best,
Leon
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 15:29:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 26125 <at> debbugs.gnu.org (full text, mbox):
Leon Meier <Leon.Meier <at> yandex.ru> writes:
>> You can put something like this in your .emacs; then Emacs does it
>> automatically for you:
>>
>> (with-eval-after-load "tex-ispell"
>> (TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)"))))
>
> These lines in .emacs result in
>
> [
> Warning (initialization): An error occurred while loading
> `/home/malkis/.emacs':
>
> Symbol's function definition is void: with-eval-after-load
>
> To ensure normal operation, you should investigate and remove the
> cause of the error in your initialization file. Start Emacs with
> the `--debug-init' option to view a complete error backtrace.
> ]
Sigh, sorry, my bad! `with-eval-after-load' was introduced in Emacs
24.4. Please use the snippet below, it should do the trick:
(eval-after-load "tex-ispell"
'(TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)"))))
> Feel free to tell me to do more testing for you with the current
> auctex. (For production purposes I'm going to switch back to the old
> version shipped with Opensuse 42.2 anyway.)
Thanks for your offer, I really appreciate it! It would be great if you
would stick with AUCTeX 11.90 and report any other problems you
encounter. 11.87 was released 2012. AUCTeX went through some
development since then and has some cool new features. And the parts I
haven't touched are bug-free, i.e. 99.99% :-)
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 15:39:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 26125 <at> debbugs.gnu.org (full text, mbox):
Hi Leon,
2017-03-16 13:29 GMT+01:00 Leon Meier <Leon.Meier <at> yandex.ru>:
> Used packages:
> - auctex 11.90.0,
> - emacs 24.3.1 (24.3-22.1 on OpenSuse),
> - ispell 3.3.02 (3.3.02-113.1 on OpenSuse),
> - ispell-american (american.aff v 1.23, 3.3.02-113.1 on OpenSuse)
>
> Bug description:
>
> Create the file q.tex with the following contents (without the square
> brackets):
> [
> \(\sigma\) contradition
>
> %%% Local Variables:
> %%% ispell-local-dictionary: "american"
> %%% End:
> ]
>
> Then, open q.tex with emacs when auctex is loaded. Issue
> M-x ispell-buffer <RET>
>
> Observe that the typo in the word "contradition" remains unnoticed.
For the record, I cannot reproduce this on my machine (Debian
testing). I have "aspell" as `ispell-program-name', not sure if this
is relevant.
Bye,
Mosè
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 15:51:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 26125 <at> debbugs.gnu.org (full text, mbox):
> For the record, I cannot reproduce this on my machine (Debian
> testing). I have "aspell" as `ispell-program-name', not sure if this
> is relevant.
Thank you, Mosè!
On the machine on which the bugs occurs, the value of the variable is
ispell.
Best, Leon
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 16:07:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 26125 <at> debbugs.gnu.org (full text, mbox):
On 03/16/2017 04:28 PM, Arash Esbati wrote:
> (eval-after-load "tex-ispell"
> '(TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)"))))
Dear Arash:
I appended this to ~/.gnu-emacs-custom, and made one line out of it
(which is a cosmetic change). After restarting emacs on the file in
question, ispell-buffer started complaining as it should. Thank you!
I could stay with the newer AUCTeX version and test it further, as you
suggested. But only if you promise to inform me explicitly via an
important-flagged personal e-mail directly to my e-mail address when an
AUCTeX update is issued by writing "AUCTeX: adapt your init file" in the
subject of your e-mail. Otherwise (e.g., if such an AUCTeX update notice
goes down in a stream of dozens of e-mails I am getting daily), I am
100% sure to forget it, and I wouldn't like to risk it. (I'm sorry, I
simply cannot rely on my memory that much.)
Thank you in advance,
Leon
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#26125
; Package
auctex
.
(Thu, 16 Mar 2017 16:08:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 26125 <at> debbugs.gnu.org (full text, mbox):
I feel I have to be more precise: testing whatever you tell me
explicitly to test is still ok.
Reply sent
to
Arash Esbati <arash <at> gnu.org>
:
You have taken responsibility.
(Thu, 16 Mar 2017 20:09:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Leon Meier <Leon.Meier <at> yandex.ru>
:
bug acknowledged by developer.
(Thu, 16 Mar 2017 20:09:02 GMT)
Full text and
rfc822 format available.
Message #37 received at 26125-done <at> debbugs.gnu.org (full text, mbox):
Leon Meier <Leon.Meier <at> yandex.ru> writes:
> On 03/16/2017 04:28 PM, Arash Esbati wrote:
>> (eval-after-load "tex-ispell"
>> '(TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)"))))
>
> I appended this to ~/.gnu-emacs-custom, and made one line out of it
> (which is a cosmetic change). After restarting emacs on the file in
> question, ispell-buffer started complaining as it should. Thank you!
Hi Leon,
you're welcome, I'm glad that we have it sorted out.
> I could stay with the newer AUCTeX version and test it further, as you
> suggested. But only if you promise to inform me explicitly via an
> important-flagged personal e-mail directly to my e-mail address when
> an AUCTeX update is issued by writing "AUCTeX: adapt your init file"
> in the subject of your e-mail. Otherwise (e.g., if such an AUCTeX
> update notice goes down in a stream of dozens of e-mails I am getting
> daily), I am 100% sure to forget it, and I wouldn't like to risk
> it. (I'm sorry, I simply cannot rely on my memory that much.)
There are also good news: It doesn't matter if we both forget about that
snippet in your .emacs; that piece of code will not break anything when
you update your AUCTeX (hopefully from ELPA) with the next release. If
you don't want to have that snippet in you .emacs, you can put something
like this in your .tex file:
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% ispell-local-dictionary: "american"
%%% eval: (TeX-ispell-skip-setcar '(("\\\\(" . "\\\\)")))
%%% End:
And you'll get a reminder every time you open the file :-)
Please keep on using the latest version and report anything suspicious;
this is the best way to fix bugs.
For now, I'm closing this report.
Best, Arash
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 14 Apr 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 125 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.