Hi All,
I have been facing this problem since version 7.02/7.3. I am using GNU
Emacs 23.2.50 on OSX.
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.
On accessing the variable using `customize-variable', the custom
interface displays an empty value, and the message:
"Value Changed outside of Customize".
I have tested this behavior using org-7.02, using a bare-bone test setup
which just loads the org-mode, and an empty test.org file.
The init.el is given below:
,----
| ;;; Define some variables for use later
| (defvar my-emacs-dir "~/.emacs.d/")
| (defvar my-lisp-dir (concat my-emacs-dir "elisp/"))
| (defvar my-customizations-dir (concat my-emacs-dir "customizations/"))
| (setq custom-file (concat my-customizations-dir "emacs-custom.el"))
| (load custom-file)
|
| (message "Setting orgmode stuff")
| (setq load-path
| (cons (expand-file-name (concat my-lisp-dir "org-7.02/lisp")) load-path))
|
| (setq load-path
| (cons (expand-file-name (concat my-lisp-dir "org-7.02/contrib/lisp")) load-path))
|
| (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
|
| (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)
`----
The corresponding emacs-custom.el (comments elided) is:
,----
| (custom-set-variables
| '(org-capture-templates (quote (("n" "Next Action" entry
| (file+headline "~/org/test.org" "INBOX") "* TODO %^{Heading}")))))
`----
As noted above, even though the `org-capture-templates' has been set
correctly in the emacs-custom.el, this setting is *not loaded* and the
variable remains `nil'.
If the variable is set in the init.el file *itself*, then it *does* get
loaded correctly. E.g., in the init.el content, if the lines are
changed to:
,----
| (require 'org-install)
| (setq org-default-notes-file "~/test.org")
|
| (setq org-capture-templates
| (quote (("n" "Next Action" entry (file+headline
| "~/org/test.org" "INBOX") "* TODO %^{Heading}"))))
`----
Then `org-capture' is able to correctly access the templates.
I have currently reverted back to 7.01h, as I have quite a few
customized templates, and don't want to stop using the customization
mechanism to setup / modify the somewhat complex templates.
Any help is very much appreciated. Prior to this, I did not quite
realize how addicted I have become to the remember/capture method!
Regards,
--
Anupam Sengupta