From mboxrd@z Thu Jan 1 00:00:00 1970 From: hobbes@poukram.net (=?utf-8?Q?R=C3=A9mi?= Letot) Subject: Re: org-mode-hook not called when entering org files Date: Sat, 13 Sep 2014 21:24:56 +0200 Message-ID: <87iokruxvb.fsf@poukram.net> References: <87y4tqkkmv.fsf@poukram.net> <87egvh4v54.fsf@gmail.com> <87r3zhktm2.fsf@poukram.net> <877g18291x.fsf@gmail.com> <87mwa4lred.fsf_-_@poukram.net> <87r3zgu2lf.fsf@alphaville.bos.redhat.com> 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]:39518) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSswa-0000OX-KO for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 15:25:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XSswV-0006Aa-Lx for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 15:25:12 -0400 Received: from plane.gmane.org ([80.91.229.3]:42355) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XSswV-0006AE-GH for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 15:25:07 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XSswU-0007WT-PW for emacs-orgmode@gnu.org; Sat, 13 Sep 2014 21:25:06 +0200 Received: from 87.66.210.128 ([87.66.210.128]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Sep 2014 21:25:06 +0200 Received: from hobbes by 87.66.210.128 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 13 Sep 2014 21:25:06 +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 Nick Dokos 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. Tried in another emacs -Q to set up a basic org-crypt using scratch: (require 'org-crypt) (org-crypt-use-before-save-magic) C-x C-e on both, then opened a test.org. org-mode-hook is as it should, but before-save-hook is nil. 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 ? Thanks, -- Rémi