help-gnu-emacs
[Top][All Lists]

## Re: emacs ispell / flyspell

 From: Marc Schwartz Subject: Re: emacs ispell / flyspell Date: Tue, 01 Jan 2008 11:51:58 -0600 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Martin Jørgensen <megafedt@hotmail.com> writes:

> Martin Jørgensen wrote:
>> Q1) Is it possible to avoid ispell entering latex environments,
>> thereby avoiding errors such as on the word "subfigure" and similar
>> latex-commands (there are *many errors* from these "special words")?
>> Is it also possible to avoid getting spelling errors for instance
>> inside \ref{THIS_IS_ON_PURPOSE_SPELLED_WRONG} or
>> \label{something_here_too}?
>>
>> If yes: Please tell me how.
>>
>>
>> Q2) This is perhaps trivial, but whenever I write latex-documents, I
>> would like to enable flyspell mode from the beginning without having
>> to type M-x flyspell. I googled for a solution and found a reply
>> from 1999:
>>
>> ----------
>> Try M-x ispell-minor-mode RET'.  This will automatically spell each
>> word as soon as you type SPC or RET.
>>
>> Another possibility is the flyspell package (M-x flyspell RET', I
>> think).  I don't know if it works with XEmacs.
>> -----------
>>
>> But how do I put that into my .emacs, in relation to question 2?
>>
>> This post is X-posted to comp.text.tex and gnu.emacs.help.
>
>
> Where else can I post these 2 questions? I sometimes saw David Kastrup
> in here answering something clever on this kind of problems.
>
> Is there an auctex user group, developers forum or similar place where
> I can ask whether or not I just have to live with this behaviour?
>
>
> Aren't there many people here using emacs for making latex-documents?
>
> To those people: What do you do, if you want to check for spelling
> errors (must say, that I've never been a big fan of spell checks
> anyway but I would like to have the opportunity of doing it elegantly
> from within emacs).
>
>
> Regards,
> Martin

In my .emacs file I have the following to load flyspell for tex/text
documents at startup:

;; =============================================================
;; =============================================================

;; Set flyspell mode on
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)

I don't disable flyspell for certain types of documents, including here
in GNUS. I am using emacs 23 built from cvs.

If language specific keywords show up as errors, I slowly add them to
the dictionary so that they can be checked and flagged if I have
typos. It helps with debugging code when subtle typos may not be noticed.

If I am entering character/string constants in code, I want those to be
checked as well.

I am generally coding in R with ESS. I use Sweave which enables me to
create documents that combine R and LaTeX code in a single file. In many
cases, I am "computing on the language", so I want keywords to be
checked, since my R code will create and output LaTeX markup.

This does mean that there is a level of inconvenience in that I have to
take some time to add common words to the dictionary that are not
already present. But in time, that becomes less and less of an issue.

HTH,

Marc Schwartz