[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Hooks and publishing
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] Hooks and publishing |
Date: |
Thu, 27 Aug 2009 14:39:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Carsten Dominik <address@hidden> writes:
> 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
It does :)
Thanks,
Sebastian