From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pieter Praet Subject: Re: [OT] Deactivate flyspell on a file by file basis Date: Fri, 03 Jun 2011 17:52:08 +0200 Message-ID: <878vtidiaf.fsf@praet.org> References: <8261.1307114334@alphaville.dokosmarshall.org> <87fwnqudgl.fsf@praet.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSWfX-00021o-AU for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 11:52:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSWfV-0005Pr-N6 for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 11:52:15 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:48172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSWfV-0005Pj-AT for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 11:52:13 -0400 Received: by wwb39 with SMTP id 39so1518020wwb.30 for ; Fri, 03 Jun 2011 08:52:12 -0700 (PDT) In-Reply-To: <87fwnqudgl.fsf@praet.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcelo de Moraes Serpa Cc: nicholas.dokos@hp.com, Org Mode On Fri, 03 Jun 2011 17:44:26 +0200, Pieter Praet wrote: > On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos wrote: > > Marcelo de Moraes Serpa wrote: > > > > > > > I use flyspell-mode for writing articles, but I don't need it for my gtd.org file. Is there a way to > > > exclude it (flyspell) from acting based on the filename of the buffer? > > > > > > > You can use file local variables for things like this. There is an > > ``eval'' pseudo-variable to allow you to execute code. See the emacs > > manual for details, but it would look something like this (untested and > > you have to put it at the end of the file): > > > > ... > > # Local Variables: > > # eval: (flyspell-mode 0) > > # End: > > Although this can get rather annoying due to > enable-local-variables related popups. s/enable-local-variables/enable-local-eval ... though enable-local-variables applies as well. Sorry for the noise. > > I use something similar to this: > > (add-hook 'find-file-hook > (lambda () > (or (member (buffer-file-name) > '("/path/to/some/file" > "/path/to/other/file")) > (flyspell-mode 1)))) > > > Nick > > > > Peace > > -- > Pieter Peace -- Pieter