emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: hobbes@poukram.net (Rémi Letot)
To: emacs-orgmode@gnu.org
Subject: Re: org-mode-hook not called when entering org files
Date: Tue, 16 Sep 2014 10:27:48 +0200	[thread overview]
Message-ID: <8761govukb.fsf@poukram.net> (raw)
In-Reply-To: 87fvfs4li6.fsf@alphaville.bos.redhat.com

Nick Dokos <ndokos@gmail.com> writes:

> hobbes@poukram.net (Rémi Letot) writes:
>
>> Nick Dokos <ndokos@gmail.com> writes:
>>
>>> hobbes@poukram.net (Rémi Letot) writes:
>>>
>>>> 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"))))
>>
>> emacs -Q, copied your instructions in scratch buffer and C-x C-e them
>> both, then opened my test.org file, and nothing happened.
>>
>
> Not sure where you get your org-mode, but unless you are using the
> org-mode that was bundled with your emacs, this may not be enough:
> you might have to do some org-mode initialization (hence the suggestion
> for a minimal .emacs file below).

That's the org-mode bundled with my emacs:
Org-mode version 8.2.6 (release_8.2.6-1 @ /usr/share/emacs/24.4.50/lisp/org/)
GNU Emacs 24.4.50.1 (x86_64-pc-linux-gnu, GTK+ Version 3.12.2) of 2014-08-23 on gkar, modified by Debian

it seems that emacs -Q is enough to get org-mode working since opening
an org file does trigger the error below :-)

...

> My advice would be to leave org-crypt to one side until you can get the
> simpler test above to pass.

ok

>> Now I noticed a message that I have received for some times when I open
>> an org file:
>>
>> File mode specification error: (error "`recenter'ing a window that does
>> not display current-buffer.")
>>
>> I didn't notice it before since it has happened for quite some times and
>> didn't appear to cause any problem, but could it be the cause of this
>> problem ?
>>
>>>
>>> perhaps in a minimal .emacs, and then opening a foo.org file (assuming
>>> your auto-mode-alist is set up correctly).
>>
>> auto-mode-alist does include org-mode for org files.
>>
>> Any idea ? is the error message that I receive a possible cause ?
>>
>
> Yes, it might: Eric Fraga reported a problem where an error that's
> caught causes buffer initialization to not run the hook:
>
>     http://thread.gmane.org/gmane.emacs.orgmode/90711
>
> That *might* happen with your error too, although I cannot find the error
> message either in current org-mode or current-emacs. Maybe I'm looking
> in the wrong place, but which version of org-mode and which version of
> emacs are you running?

See above, that's org currently bundled with emacs. I could be coerced
to try trunk if it has a chance to solve the problem and the test is
of some use to you, but then i have some docs to read first :-)

Thanks,
--
Rémi

  reply	other threads:[~2014-09-16  8:28 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         ` org-mode-hook not called when entering org files Nick Dokos
2014-09-13 19:24           ` Rémi Letot
2014-09-15 21:33             ` Nick Dokos
2014-09-16  8:27               ` Rémi Letot [this message]
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=8761govukb.fsf@poukram.net \
    --to=hobbes@poukram.net \
    --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).