From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-mode-hook not called when entering org files Date: Fri, 12 Sep 2014 14:15:56 -0400 Message-ID: <87r3zgu2lf.fsf@alphaville.bos.redhat.com> References: <87y4tqkkmv.fsf@poukram.net> <87egvh4v54.fsf@gmail.com> <87r3zhktm2.fsf@poukram.net> <877g18291x.fsf@gmail.com> <87mwa4lred.fsf_-_@poukram.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSVON-0006eI-Le for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 14:16:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSVOI-0006jW-3v for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 14:16:19 -0400 Received: from plane.gmane.org ([80.91.229.3]:42647) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSVOH-0006jP-Tk for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 14:16:14 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XSVOE-0002NT-UJ for emacs-orgmode@gnu.org; Fri, 12 Sep 2014 20:16:10 +0200 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Sep 2014 20:16:10 +0200 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 12 Sep 2014 20:16:10 +0200 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: emacs-orgmode@gnu.org hobbes@poukram.net (RĂ©mi Letot) writes: > org-crypt-use-before-save-magic just populates org-mode-hook with a > before-save-hook, which is correctly done in my case. The trick is that > org-mode-hook doesn't seem to fire when I open an org file... > > confirmed: I had a look at the other variables that it should change, > and they do not appear to be modified when I open an org file. > > all org seems to work fine, but for some reason org-mode-hook is not > called when I open an org file... > That's very unlikely: the hook is run using a general emacs mechanism, so if it were broken, a *lot* of things would be broken. You can check with (setq org-mode-hook nil) (add-hook 'org-mode-hook (function (lambda () (message "RL - my org-mode-hook ran this")))) perhaps in a minimal .emacs, and then opening a foo.org file (assuming your auto-mode-alist is set up correctly). I'd be really surprised if this does not work as expected. And if it does, your problem is probably a bit deeper than "emacs does not run the org-mode-hook": perhaps cleaning out your org-mode-hook, restarting emacs and then adding things back in one at a time would help to figure out the problem. HTH, Nick