From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo de Moraes Serpa Subject: Re: [OT] Deactivate flyspell on a file by file basis Date: Thu, 30 Jun 2011 10:56:48 -0500 Message-ID: References: <8261.1307114334@alphaville.dokosmarshall.org> <87fwnqudgl.fsf@praet.org> <878vtidiaf.fsf@praet.org> <9395.1307117685@alphaville.dokosmarshall.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=00032555e47edacd7d04a6eff29a Return-path: Received: from eggs.gnu.org ([140.186.70.92]:47775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcJbq-0000TO-Nz for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 11:56:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcJbo-0008Q7-AL for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 11:56:54 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:51407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcJbn-0008Pu-Qo for emacs-orgmode@gnu.org; Thu, 30 Jun 2011 11:56:52 -0400 Received: by bwd14 with SMTP id 14so2575826bwd.0 for ; Thu, 30 Jun 2011 08:56:49 -0700 (PDT) In-Reply-To: <9395.1307117685@alphaville.dokosmarshall.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: nicholas.dokos@hp.com Cc: Org Mode , Pieter Praet --00032555e47edacd7d04a6eff29a Content-Type: text/plain; charset=ISO-8859-1 Thank you all for the replies. @Nick,@Peter: Both approaches work great! :) Cheers, Marcelo. On Fri, Jun 3, 2011 at 11:14 AM, Nick Dokos wrote: > 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)))) > > > > --00032555e47edacd7d04a6eff29a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thank you all for the replies.

@Nick,@Peter: Both approa= ches work great! :)

Cheers,

Marcelo.

On Fri, Jun 3, 2011 at= 11:14 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
Pieter Praet <pieter@praet.org> wrote:

> On Fri, 03 Jun 2011 17:44:26 +0200, Pieter Praet <pieter@praet.org> wrote:
> > On Fri, 03 Jun 2011 11:18:54 -0400, Nick Dokos <nicholas.dokos@hp.com> wrote:
> > > Marcelo de Moraes Serpa <celoserpa@gmail.com> 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 cod= e. See the emacs
> > > manual for details, but it would look something like this (u= ntested 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<= br> nag question the first time it is asked. As long as you load the custom fil= e,
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
> > =A0 =A0 =A0 =A0 =A0 (lambda ()
> > =A0 =A0 =A0 =A0 =A0 =A0 (or (member (buffer-file-name)
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 '("/path= /to/some/file"
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "/path/t= o/other/file"))
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 (flyspell-mode 1))))
> >

--00032555e47edacd7d04a6eff29a--