emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcelo de Moraes Serpa <celoserpa@gmail.com>
To: nicholas.dokos@hp.com
Cc: Org Mode <emacs-orgmode@gnu.org>, Pieter Praet <pieter@praet.org>
Subject: Re: [OT] Deactivate flyspell on a file by file basis
Date: Thu, 30 Jun 2011 10:56:48 -0500	[thread overview]
Message-ID: <BANLkTim9W5sRiw-M-DmA6ucg1P8x_4byfQ@mail.gmail.com> (raw)
In-Reply-To: <9395.1307117685@alphaville.dokosmarshall.org>

[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]

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 <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 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))))
> > >
>

[-- Attachment #2: Type: text/html, Size: 2880 bytes --]

      reply	other threads:[~2011-06-30 15:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-03 15:04 [OT] Deactivate flyspell on a file by file basis Marcelo de Moraes Serpa
2011-06-03 15:18 ` Nick Dokos
2011-06-03 15:44   ` Pieter Praet
2011-06-03 15:52     ` Pieter Praet
2011-06-03 16:14       ` Nick Dokos
2011-06-30 15:56         ` Marcelo de Moraes Serpa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTim9W5sRiw-M-DmA6ucg1P8x_4byfQ@mail.gmail.com \
    --to=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.com \
    --cc=pieter@praet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).