Pieter Praet <
address@hidden> wrote:
> On Fri, 03 Jun 2011 17:44:26 +0200, Pieter Praet <
address@hidden> wrote:
> > On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos <
address@hidden> wrote:
> > > Marcelo de Moraes Serpa <
address@hidden> 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
> 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))))
> >