[Request] org-mode compatibility
thomas-louvigne opened this issue · 2 comments
Hi,
first thank you for your plug-in. It is really amazing.
In org-mod, file start with #+ and stuff...
By exemple :
+TITLE: MySuperTitle
+AUTHOR: JohnDo
+EMAIL: John@do.net
+LANGUAGE: fr
+OPTIONS: H:5
+OPTIONS: toc:3
How can i make a rule to don't correct it ?
(Sorry for my bad english)
I just revisited languagetool/lantool.el after a year long break and managed to get everything going.
My solution is bit of a hack, but it is better than nothing.
Languagetool now uses spellcheckers to look for misspelled words. In emacs and org mode it makes more sense to let flyspell do the spellchecking and disable the corresponding languagetool rules.
You can see the names of the matching rules after you have enabled debugging M-x langtool-toggle-debug
and ran M-x langtool-check
on your sample text. The output is in buffer *LanguageTool Debug*
.
I write in American and British English, so I added Morphologic rules for both languages to my disabled rule list:
(setq langtool-disabled-rules '("WHITESPACE_RULE"
"EN_UNPAIRED_BRACKETS"
"COMMA_PARENTHESIS_WHITESPACE"
"EN_QUOTES"
"MORFOLOGIK_RULE_EN_GB"
"MORFOLOGIK_RULE_US"))
You seem to be writing in French. A quick test showed that the most commonly triggered rules are HUNSPELL_NO_SUGGEST_RULE and FRENCH_WHITESPACE. If you use the org option toc:nil
, you might also want to disable the rule NIL. The message claims that it is an Anglicism :). Add the rules that you find to be superfluous to variable langtool-disabled-rules and you should be fine.
Sorry to answer you very late.