From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: Hooks and publishing Date: Thu, 27 Aug 2009 14:39:25 +0200 Message-ID: <878wh58m82.fsf@gmx.de> References: <87fxbe9p7v.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgeGN-0001e5-8j for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 08:39:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgeGI-0001cT-0p for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 08:39:34 -0400 Received: from [199.232.76.173] (port=34527 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgeGG-0001cG-M1 for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 08:39:29 -0400 Received: from mail.gmx.net ([213.165.64.20]:44535) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MgeGG-00037h-4W for emacs-orgmode@gnu.org; Thu, 27 Aug 2009 08:39:28 -0400 In-Reply-To: (Carsten Dominik's message of "Thu, 27 Aug 2009 07:46:46 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Emacs-orgmode mailing list Carsten Dominik 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