From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anupam Sengupta Subject: Bug?: 7.02/7.3 - Unable to set `org-capture-templates' in a Date: Sat, 06 Nov 2010 22:35:10 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=50054 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PEmCo-0008Ly-AT for emacs-orgmode@gnu.org; Sat, 06 Nov 2010 13:05:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PEmCm-0000Sk-TQ for emacs-orgmode@gnu.org; Sat, 06 Nov 2010 13:05:30 -0400 Received: from mail-pw0-f41.google.com ([209.85.160.41]:42242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PEmCm-0000ST-OT for emacs-orgmode@gnu.org; Sat, 06 Nov 2010 13:05:28 -0400 Received: by pwi1 with SMTP id 1so1430536pwi.0 for ; Sat, 06 Nov 2010 10:05:27 -0700 (PDT) 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 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