From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: [OT] Deactivate flyspell on a file by file basis Date: Fri, 03 Jun 2011 12:14:45 -0400 Message-ID: <9395.1307117685@alphaville.dokosmarshall.org> References: <8261.1307114334@alphaville.dokosmarshall.org> <87fwnqudgl.fsf@praet.org> <878vtidiaf.fsf@praet.org> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSX1Z-0007VV-35 for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 12:15:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QSX1X-0000uv-DC for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 12:15:00 -0400 Received: from vms173009pub.verizon.net ([206.46.173.9]:34759) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QSX1X-0000ub-0e for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 12:14:59 -0400 Received: from alphaville.dokosmarshall.org ([unknown] [173.76.32.106]) by vms173009.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0LM80098B2GM4I20@vms173009.mailsrvcs.net> for emacs-orgmode@gnu.org; Fri, 03 Jun 2011 11:14:47 -0500 (CDT) In-reply-to: Message from Pieter Praet of "Fri, 03 Jun 2011 17:52:08 +0200." <878vtidiaf.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: Pieter Praet Cc: nicholas.dokos@hp.com, Org Mode , Marcelo de Moraes Serpa Pieter Praet wrote: > 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. > You can save the eval setting in your custom file by saying ! to the nag question the first time it is asked. As long as you load the custom file, it won't nag you again. Nick > 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)))) > >