emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-mode-hook not called when entering org files
Date: Fri, 12 Sep 2014 14:15:56 -0400	[thread overview]
Message-ID: <87r3zgu2lf.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: 87mwa4lred.fsf_-_@poukram.net

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

  reply	other threads:[~2014-09-12 18:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 19:44 org-crypt doesn't automatically encrypt on save Rémi Letot
2014-09-11 23:03 ` Darlan Cavalcante Moreira
2014-09-12 10:42   ` Rémi Letot
2014-09-12 14:23     ` Darlan Cavalcante Moreira
2014-09-12 16:44       ` org-mode-hook not called when entering org files (Was: Re: org-crypt doesn't automatically encrypt on save) Rémi Letot
2014-09-12 18:15         ` Nick Dokos [this message]
2014-09-13 19:24           ` org-mode-hook not called when entering org files Rémi Letot
2014-09-15 21:33             ` Nick Dokos
2014-09-16  8:27               ` Rémi Letot
2014-09-16 14:27                 ` Nick Dokos
2014-09-15 21:45             ` Nick Dokos
2014-09-12 14:42   ` org-crypt doesn't automatically encrypt on save Jorge A. Alfaro-Murillo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3zgu2lf.fsf@alphaville.bos.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).