* emacs ispell / flyspell
@ 2007-12-29 4:24 Martin Jørgensen
2007-12-29 10:33 ` Eli Zaretskii
2008-01-01 12:06 ` Martin Jørgensen
0 siblings, 2 replies; 10+ messages in thread
From: Martin Jørgensen @ 2007-12-29 4:24 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
I installed ispell under cygwin with practically no problems. Ispell now
works when I type "M-x ispell". But there are 2 problems:
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.
Regards,
Martin
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2007-12-29 4:24 emacs ispell / flyspell Martin Jørgensen
@ 2007-12-29 10:33 ` Eli Zaretskii
2008-01-01 12:06 ` Martin Jørgensen
1 sibling, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2007-12-29 10:33 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Sat, 29 Dec 2007 05:24:17 +0100
> From: =?ISO-8859-1?Q?Martin_J=F8rgensen?= <megafedt@hotmail.com>
>
> 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.
The following advice is from the commentary of ispell.el:
;; Region skipping:
;; Place new regular expression definitions of regions you prefer not to
;; spell check in `ispell-skip-region-alist'. Mode-dependent features can
;; be added to latex by modifying `ispell-tex-skip-alists'.
;; `ispell-message' contains some custom skipping code for e-mail messages.
Does this advice help you?
> 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.
You should enable flyspell from tex-mode-hook:
(add-hook 'tex-mode-hook 'flyspell-mode)
Place the above line in your ~/.emacs.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2007-12-29 4:24 emacs ispell / flyspell Martin Jørgensen
2007-12-29 10:33 ` Eli Zaretskii
@ 2008-01-01 12:06 ` Martin Jørgensen
2008-01-01 13:53 ` Peter Dyballa
` (3 more replies)
1 sibling, 4 replies; 10+ messages in thread
From: Martin Jørgensen @ 2008-01-01 12:06 UTC (permalink / raw)
To: help-gnu-emacs
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.
hmmm. No answer.
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-01 12:06 ` Martin Jørgensen
@ 2008-01-01 13:53 ` Peter Dyballa
2008-01-01 20:08 ` Eli Zaretskii
2008-01-01 17:51 ` Marc Schwartz
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Peter Dyballa @ 2008-01-01 13:53 UTC (permalink / raw)
To: Martin Jørgensen; +Cc: help-gnu-emacs
Am 01.01.2008 um 13:06 schrieb Martin Jørgensen:
> Aren't there many people here using emacs for making latex-documents?
Does it work to configure ispell to be aware of TeX? I.e.:
(setq ispell-program-name "ispell")
; (setq ispell-program-name "aspell")
;
; Für Französisch:
; (require 'ispell)
; (defun ispell-get-otherchars ()
; (replace-regexp-in-string "-" "" (ispell-get-decoded-string
3)))
;
(if (string= "aspell" ispell-program-name)
(progn
; (setq ispell-extra-args "--norm-form=comp --norm-required --
run-together")
; (setq ispell-dictionary "en_GB-ise-w_accents")
(setq ispell-dictionary "deutsch")
(set-default 'ispell-local-dictionary ispell-
dictionary);"deutsch"
(add-hook 'TeX-language-en-hook (function (lambda ()
(ispell-change-dictionary "british"))))
(add-hook 'TeX-language-de-hook (function (lambda ()
(ispell-change-dictionary ispell-dictionary))));"deutsch"
(message "Alles für «a»spell")
)
(setq ispell-dictionary "german8")
(add-hook 'TeX-language-en-hook (function (lambda ()
(ispell-change-dictionary "british"))))
(add-hook 'TeX-language-de-hook (function (lambda ()
(ispell-change-dictionary "deutsch8"))))
(message "Alles für »i«spell")
)
(add-hook 'LaTeX-mode-hook (function (lambda () (setq ispell-
extra-args '("-t")))))
There is also the variable ispell-skip-region-alist ... it looks
promising!
--
Greetings
Pete
Wasting time is an important part of living.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-01 12:06 ` Martin Jørgensen
2008-01-01 13:53 ` Peter Dyballa
@ 2008-01-01 17:51 ` Marc Schwartz
2008-01-01 20:00 ` Lennart Borgman (gmail)
2008-01-01 20:07 ` Eli Zaretskii
2008-01-02 17:08 ` Alan Ristow
3 siblings, 1 reply; 10+ messages in thread
From: Marc Schwartz @ 2008-01-01 17:51 UTC (permalink / raw)
To: help-gnu-emacs
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.
>
> hmmm. No answer.
>
> 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:
;; =============================================================
;; LOAD FLYSPELL ===============================================
;; =============================================================
;; Set flyspell mode on
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(add-hook 'tex-mode-hook 'flyspell-mode)
(add-hook 'text-mode-hook 'flyspell-mode)
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
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-01 17:51 ` Marc Schwartz
@ 2008-01-01 20:00 ` Lennart Borgman (gmail)
0 siblings, 0 replies; 10+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-01 20:00 UTC (permalink / raw)
To: Marc Schwartz; +Cc: help-gnu-emacs
Marc Schwartz wrote:
> 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.
There is a tip here at spell checking:
http://www.emacswiki.org/cgi-bin/wiki/NxmlMode
It says that you should do
(add-to-list 'flyspell-prog-text-faces 'nxml-text-face)
Maybe something similar is possible in your case?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-01 12:06 ` Martin Jørgensen
2008-01-01 13:53 ` Peter Dyballa
2008-01-01 17:51 ` Marc Schwartz
@ 2008-01-01 20:07 ` Eli Zaretskii
2008-01-02 17:08 ` Alan Ristow
3 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-01-01 20:07 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Tue, 01 Jan 2008 13:06:07 +0100
> From: =?ISO-8859-1?Q?Martin_J=F8rgensen?= <megafedt@hotmail.com>
>
> hmmm. No answer.
??? I replied on Dec 29th. Don't you see my response in the news
group?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-01 13:53 ` Peter Dyballa
@ 2008-01-01 20:08 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2008-01-01 20:08 UTC (permalink / raw)
To: help-gnu-emacs
> From: Peter Dyballa <Peter_Dyballa@Web.DE>
> Date: Tue, 1 Jan 2008 14:53:56 +0100
> Cc: help-gnu-emacs@gnu.org
>
> Does it work to configure ispell to be aware of TeX?
ispell already is aware of TeX out of the box.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-01 12:06 ` Martin Jørgensen
` (2 preceding siblings ...)
2008-01-01 20:07 ` Eli Zaretskii
@ 2008-01-02 17:08 ` Alan Ristow
2008-01-05 8:08 ` Martin Jørgensen
3 siblings, 1 reply; 10+ messages in thread
From: Alan Ristow @ 2008-01-02 17:08 UTC (permalink / raw)
To: help-gnu-emacs
Martin Jørgensen wrote:
> 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.
>
> hmmm. No answer.
I use Aspell, so I can't help with the first question, but here's what's
in my .emacs to activate flyspell:
;; Setup Aspell and turn on flyspell mode
(setq-default ispell-program-name "aspell")
(setq-default ispell-extra-args '("--mode=tex"))
(setq-default ispell-extra-args '("--personal=custom_dict.rws"))
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
> 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?
You can access an auctex newgroup via gmane -- see gmane.org.
Alan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: emacs ispell / flyspell
2008-01-02 17:08 ` Alan Ristow
@ 2008-01-05 8:08 ` Martin Jørgensen
0 siblings, 0 replies; 10+ messages in thread
From: Martin Jørgensen @ 2008-01-05 8:08 UTC (permalink / raw)
To: help-gnu-emacs
Alan Ristow wrote:
> Martin Jørgensen wrote:
-snip-
> I use Aspell, so I can't help with the first question, but here's what's
> in my .emacs to activate flyspell:
>
> ;; Setup Aspell and turn on flyspell mode
> (setq-default ispell-program-name "aspell")
> (setq-default ispell-extra-args '("--mode=tex"))
> (setq-default ispell-extra-args '("--personal=custom_dict.rws"))
> (add-hook 'LaTeX-mode-hook 'flyspell-mode)
>
>> 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?
>
> You can access an auctex newgroup via gmane -- see gmane.org.
Ok, thanks to both of you... My linux doesn't boot right now, but I
suppose I can get it to work now, however I think it's pretty ugly to
add all these "non-english" words to the dictionary.
Really really ugly, IMO...
If there are spelling problems in the environments, latex labels (I cant
add all of these as there is an infinity of them that changes each time
I make a new document), commands etc, I know Latex and every other
compiler will stop and let me know about the spelling error...
Regards,
Martin
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-01-05 8:08 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-29 4:24 emacs ispell / flyspell Martin Jørgensen
2007-12-29 10:33 ` Eli Zaretskii
2008-01-01 12:06 ` Martin Jørgensen
2008-01-01 13:53 ` Peter Dyballa
2008-01-01 20:08 ` Eli Zaretskii
2008-01-01 17:51 ` Marc Schwartz
2008-01-01 20:00 ` Lennart Borgman (gmail)
2008-01-01 20:07 ` Eli Zaretskii
2008-01-02 17:08 ` Alan Ristow
2008-01-05 8:08 ` Martin Jørgensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).