hob...@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