emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [OT] Deactivate flyspell on a file by file basis
@ 2011-06-03 15:04 Marcelo de Moraes Serpa
  2011-06-03 15:18 ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-06-03 15:04 UTC (permalink / raw)
  To: Org Mode

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

Hello list,

I use flyspell-mode for writing articles, but I don't need it for my
gtd.orgfile. Is there a way to exclude it (flyspell) from acting based
on the
filename of the buffer?

Regards,

Marcelo.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Deactivate flyspell on a file by file basis
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2011-06-03 15:18 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: nicholas.dokos, Org Mode

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:

Nick

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Deactivate flyspell on a file by file basis
  2011-06-03 15:18 ` Nick Dokos
@ 2011-06-03 15:44   ` Pieter Praet
  2011-06-03 15:52     ` Pieter Praet
  0 siblings, 1 reply; 6+ messages in thread
From: Pieter Praet @ 2011-06-03 15:44 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: nicholas.dokos, Org Mode

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.


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

> Nick
> 

Peace

-- 
Pieter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Deactivate flyspell on a file by file basis
  2011-06-03 15:44   ` Pieter Praet
@ 2011-06-03 15:52     ` Pieter Praet
  2011-06-03 16:14       ` Nick Dokos
  0 siblings, 1 reply; 6+ messages in thread
From: Pieter Praet @ 2011-06-03 15:52 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: nicholas.dokos, Org Mode

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.

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))))
> 
> > Nick
> > 
> 
> Peace
> 
> -- 
> Pieter

Peace

-- 
Pieter

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Deactivate flyspell on a file by file basis
  2011-06-03 15:52     ` Pieter Praet
@ 2011-06-03 16:14       ` Nick Dokos
  2011-06-30 15:56         ` Marcelo de Moraes Serpa
  0 siblings, 1 reply; 6+ messages in thread
From: Nick Dokos @ 2011-06-03 16:14 UTC (permalink / raw)
  To: Pieter Praet; +Cc: nicholas.dokos, Org Mode, Marcelo de Moraes Serpa

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [OT] Deactivate flyspell on a file by file basis
  2011-06-03 16:14       ` Nick Dokos
@ 2011-06-30 15:56         ` Marcelo de Moraes Serpa
  0 siblings, 0 replies; 6+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-06-30 15:56 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: Org Mode, Pieter Praet

[-- 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 --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-30 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this 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).