From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Riley Subject: Re: Org-mode + flyspell = too much (programming code is screened) Date: Tue, 28 Jul 2009 13:08:29 +0200 Message-ID: <4a6edc2e.0c58560a.7de6.ffffefc8@mx.google.com> References: <878wi9b1mc.fsf@mundaneum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MVkXp-0002WW-HY for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 07:08:33 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MVkXp-0002WK-2U for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 07:08:33 -0400 Received: from [199.232.76.173] (port=40521 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MVkXo-0002WH-Rv for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 07:08:32 -0400 Received: from fg-out-1718.google.com ([72.14.220.157]:21126) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MVkXo-0006F1-BI for emacs-orgmode@gnu.org; Tue, 28 Jul 2009 07:08:32 -0400 Received: by fg-out-1718.google.com with SMTP id l27so632327fgb.7 for ; Tue, 28 Jul 2009 04:08:31 -0700 (PDT) In-Reply-To: <878wi9b1mc.fsf@mundaneum.com> (=?iso-8859-1?Q?=22S=E9bastien?= Vauban"'s message of "Tue, 28 Jul 2009 11:25:31 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: =?iso-8859-1?Q?S=E9bastien?= Vauban Cc: emacs-orgmode@gnu.org S=E9bastien Vauban writes: > Hello, > > I've sent this message to Emacs group one month ago. Never got any reply. > Maybe I'll have more chance here... > > I'd want to have flyspell reporting me spelling mistakes in Org-mode. > > I did update my `.emacs' this way: > > > > ;; turn on `flyspell' when changing a buffer which was unmodified > (defvar my-flyspell-major-mode-list > '(html-mode > latex-mode > message-mode > muse-mode > nxml-mode > org-mode ; FIXME If uncommented, flyspell gets crazy!? > text-mode)) > > (add-hook 'first-change-hook > (lambda () > (when (and (memq major-mode my-flyspell-major-mode-list) > (not flyspell-mode)) > (my-turn-on-flyspell-french)))) > > (defun my-turn-on-flyspell-french () > "Unconditionally turn on flyspell-mode (in French) and call > `flyspell-buffer'." > (interactive) > (flyspell-mode 1) > (ispell-change-dictionary "francais") > (flyspell-buffer)) > > > > When doing so, Org-mode buffers get spelled, but my `.emacs' as well. I m= ean, > not only the comments and the strings, but also the code itself... Don't > understand at all this impact... > > Commenting the `org-mode' line returns me with the correct spelling > (prog-aware, I should say) of my Emacs configuration file, but -- then --= my > Org-mode buffers aren't still not spelled anymore... > > FYI, I am using: > > /usr/share/emacs/site-lisp/dictionaries-common/flyspell.el > > from a fresh Ubuntu 9.04 installation, that is version: > > "FSF emacs CVS20090116(r1.141) + Debian `dictionaries-common' changes = (like > xemacs compatibility)" > > BTW, I don't understand that neither in that version, neither in: > > http://www-sop.inria.fr/members/Manuel.Serrano/flyspell/flyspell-1.7o= .el > > the variable `flyspell-prog-mode-hook' is referenced but does not exist. > > Is this anything here someone can help about? > > Many thanks in advance... > > Best regards, > Seb I can only tell you it works fine for with Debian (Ubuntu's Dad ..) with the following set up: ,---- | (setq=20 | ispell-use-framepop-p t | ispell-dictionary "british" | ispell-local-dictionary "british" | ispell-silently-savep t | ispell-parser 'tex | flyspell-sort-corrections nil | ) |=20 | (setq-default ispell-program-name "aspell") |=20 | (add-hook 'text-mode-hook (lambda()(interactive)(flyspell-mode t))) |=20 | (define-key flyspell-mode-map (kbd "C-+") 'flyspell-check-previous-highli= ghted-word) | (define-key flyspell-mode-map (kbd "C-#") 'flyspell-auto-correct-previous= -word) | (define-key flyspell-mode-map (kbd "S-") 'ispell-word) | (define-key flyspell-mode-map (kbd "") 'flyspell-auto-correct-word) `---- and then ,---- | (add-hook 'org-mode-hook | (lambda () | ;; yasnippet | (make-variable-buffer-local 'yas/trigger-key) | (setq yas/trigger-key [tab]) | (define-key yas/keymap [tab] 'yas/next-field-group) | ;; flyspell mode to spell check everywhere | (flyspell-mode 1))) `---- regards r. =20