From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anupam Sengupta Subject: Re: Bug?: 7.02/7.3 - Unable to set `org-capture-templates'in a Date: Sun, 7 Nov 2010 05:52:23 +0000 (UTC) Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=32778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PEyBD-00085A-TG for emacs-orgmode@gnu.org; Sun, 07 Nov 2010 01:52:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PEyBC-0006sD-8a for emacs-orgmode@gnu.org; Sun, 07 Nov 2010 01:52:39 -0400 Received: from lo.gmane.org ([80.91.229.12]:54656) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PEyBB-0006s6-RI for emacs-orgmode@gnu.org; Sun, 07 Nov 2010 01:52:38 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PEyB8-0004Ee-4Z for emacs-orgmode@gnu.org; Sun, 07 Nov 2010 06:52:34 +0100 Received: from 117.192.13.221 ([117.192.13.221]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Nov 2010 06:52:34 +0100 Received: from anupamsg by 117.192.13.221 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Nov 2010 06:52:34 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Anupam Sengupta gmail.com> writes: > I use a _separate_ file for saving the settings using the Custom > interface. This includes all org-mode settings and templates, and have > been working well till 7.01h. > > *However*, after upgrading to 7.02, I found that the capture templates > are *not* getting set from the custom-file, which does contain the > correct template (info "(Emacs) Saving Customizations"). > > The basic problem is that the `org-capture-templates' variable is set as > `nil' on load, and `describe-variable' returns a 'nil' as well. > ... Found a solution to the problem. This has to do with order of setting the custom-file and loading it (needs to be done *after* the org-install). I.e., the order in init.el needs to be: ... (require 'org-install) (setq org-default-notes-file "~/test.org") (define-key global-map "\C-ca" 'org-agenda) (define-key global-map "\C-cc" 'org-capture) ... ;; Needs to be done after org-mode is loaded (setq custom-file (concat my-customizations-dir "emacs-custom.el")) (load custom-file) This allows the `org-capture-templates' saved in the separate emacs-custom.el file to be correctly loaded. Note that this behavior is from 7.02/7.3, and probably has to do with the custom-autoload definition of this variable in org-install.el. Hope this explanation helps. Regards, -- Anupam Sengupta