emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Bug?: 7.02/7.3 - Unable to set `org-capture-templates'in a


From: Anupam Sengupta
Subject: [Orgmode] Re: Bug?: 7.02/7.3 - Unable to set `org-capture-templates'in a
Date: Sun, 7 Nov 2010 05:52:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Anupam Sengupta <anupamsg <at> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]