emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] org-mode-hook not called when entering org files


From: Nick Dokos
Subject: Re: [O] org-mode-hook not called when entering org files
Date: Fri, 12 Sep 2014 14:15:56 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

address@hidden (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






reply via email to

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