From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Opening an Org file slowed down Date: Sun, 24 Nov 2013 17:25:56 +0100 Message-ID: <87wqjxlqaz.fsf@gmail.com> References: <87r4a7tmo2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkcVH-0000Dy-Q2 for emacs-orgmode@gnu.org; Sun, 24 Nov 2013 11:25:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VkcV9-0004s8-DE for emacs-orgmode@gnu.org; Sun, 24 Nov 2013 11:25:47 -0500 Received: from mail-ea0-x22e.google.com ([2a00:1450:4013:c01::22e]:58960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VkcV9-0004rw-57 for emacs-orgmode@gnu.org; Sun, 24 Nov 2013 11:25:39 -0500 Received: by mail-ea0-f174.google.com with SMTP id b10so1815805eae.33 for ; Sun, 24 Nov 2013 08:25:37 -0800 (PST) In-Reply-To: (Michael Brand's message of "Sun, 24 Nov 2013 14:49:50 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: Org Mode Hello, Michael Brand writes: > First, I have an understanding question: > > I tried to find where org-mode-hook is called within the function > org-mode but could not see something similar to the expected > "(run-hooks 'org-mode-hook)". So I added 'backtrace to the > org-mode-hook but don't understand it either: > > (backtrace) > backtrace() > run-hooks(change-major-mode-after-body-hook text-mode-hook > outline-mode-hook org-mode-hook) > apply(run-hooks (change-major-mode-after-body-hook > text-mode-hook outline-mode-hook org-mode-hook)) > run-mode-hooks(org-mode-hook) > org-mode() > [...] > > I see the expected "run-mode-hooks(org-mode-hook)" in this backtrace > but where is the corresponding form in the function org-mode? It is implied by `define-derived-mode'. > Second, I guess it is not necessary to implement something like > org-mode-early-hook but I could not find yet an existing hook. Which > hook would you recommend for inserting the leading stars? I didn't look at your code, but can't you `defadvice' `org-mode'? Regards, -- Nicolas Goaziou