emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Pieter Praet <pieter@praet.org>
Cc: nicholas.dokos@hp.com, Org Mode <emacs-orgmode@gnu.org>,
	Marcelo de Moraes Serpa <celoserpa@gmail.com>
Subject: Re: [OT] Deactivate flyspell on a file by file basis
Date: Fri, 03 Jun 2011 12:14:45 -0400	[thread overview]
Message-ID: <9395.1307117685@alphaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Pieter Praet <pieter@praet.org> of "Fri, 03 Jun 2011 17:52:08 +0200." <878vtidiaf.fsf@praet.org>

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

  reply	other threads:[~2011-06-03 16:15 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 [this message]
2011-06-30 15:56         ` Marcelo de Moraes Serpa

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=9395.1307117685@alphaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --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).