emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Hooks and publishing


From: Carsten Dominik
Subject: Re: [Orgmode] Hooks and publishing
Date: Thu, 27 Aug 2009 07:46:46 +0200


On Aug 27, 2009, at 12:37 AM, Sebastian Rose wrote:

Hi,


I have this in one of my setup files:

  (add-hook 'text-mode-hook 'turn-on-flyspell)
  ;; (add-hook 'org-mode-hook 'turn-on-flyspell)
  (add-hook 'message-mode-hook 'turn-on-flyspell)

As you can see, the second line is already commented. But it seems,
org-mode runs text-mode-hook, too. This slows down export (especially,
if ispell is not yet installed on a new system...).


Is it possible (and does it make sense) to load all Org-files without
running any of the hooks?

Org-mode is derived from outline-mode, which is derived from text mode.
A derived mode runs all the hooks from the parent modes.

I don't know how to turn this off, but you can work around this
by changing the function you put into the text-mode-hook:

(defun my-turn-on-flyspell-not-in-org-though ()
   (or (eq major-mode 'org-mode) (turn-on-flyspell)))

HTH

- Carsten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]