From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Automatic flyspell Date: Mon, 23 Feb 2015 00:24:47 +0100 Organization: Aioe.org NNTP Server Message-ID: <87egphttq8.fsf@debian.uxu> References: <87twyg5y5e.fsf@engels.histomat.net> <87zj86n53i.fsf@debian.uxu> <87ioeuwa5v.fsf@engels.histomat.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1424647525 1358 80.91.229.3 (22 Feb 2015 23:25:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 22 Feb 2015 23:25:25 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 23 00:25:21 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YPfto-0001fx-9D for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Feb 2015 00:25:20 +0100 Original-Received: from localhost ([::1]:41548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPftn-0006Md-MH for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Feb 2015 18:25:19 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 69 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:hqXRce4NUIRqJvNeiEuD4TdfnZM= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:210558 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102834 Archived-At: Haines Brown writes: > I see no difference off hand from when I open that > file without the extension in the Fundamental Fly > Fill modes or with it in the Text mode. This raises > a question, why should I set default to Text mode? If you don't want it as the default mode, you shouldn't, of course. But now I don't understand your problem anymore (if I ever did). > However, for LaTeX emacs uses a different init file > with the lines: > > (defun turn-on-flyspell () (flyspell-mode 1)) > (add-hook 'find-file-hooks 'turn-on-flyspell) That doesn't seem to carry anything LaTeX specific, which would look along the lines of: (setq latex-mode-hook (lambda () (flyspell-mode 1) ; other modes and options )) > When the emacs session I initially mentioned opens a > .tex file, it opens in the LaTeX Fly Fill modes and > knows not to mark commands or environments such as > \subsection{} as misspellings. OK? I never did Fly in LaTeX, but I did do `ispell-buffer' and that catches most text areas. Sometimes there can be problems in certain constructs, e.g.: \def\hierarchicalscheduler{A hierarchical scheduler is a scheduler that consists of several schedulers that are organized hierarchically, in a tree structure. ... } Perhaps because of the braces `ispell-buffer' doesn't catch mistakes in between, so I use `ispell-region' for those. But for common usage, including \subsection{sphelling}, it works fine. > When I open a .java file I'm in the Java/1 Fly > Abbrev Fill modes. When I open a .c file, I'm in the > C/1 Fly Abbrev Fill modes. In these cases commands > are marked as misspellings. If I did any serious > programming I'd have to tailor Flyspell for those > modes. Serious programming is typically not about spelling :) If you have tons of text in your programs, consider moving them to textfiles and the like (perhaps XML if it involves advanced interaction, e.g. a RPG with dialog trees etc.). For but a few error messages and the like in a C program you might be helped by `ispell-comments-and-strings'. And for Gnus messages: `ispell-message'. None of this is on the Fly but I thought I'd mention it. Check out some more work on this: http://user.it.uu.se/~embe8573/conf/emacs-init/spell.el -- underground experts united