emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug?: 7.02/7.3 - Unable to set `org-capture-templates' in a
@ 2010-11-06 17:05 Anupam Sengupta
  2010-11-07  5:52 ` Bug?: 7.02/7.3 - Unable to set `org-capture-templates'in a Anupam Sengupta
  0 siblings, 1 reply; 3+ messages in thread
From: Anupam Sengupta @ 2010-11-06 17:05 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-14 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-06 17:05 Bug?: 7.02/7.3 - Unable to set `org-capture-templates' in a Anupam Sengupta
2010-11-07  5:52 ` Bug?: 7.02/7.3 - Unable to set `org-capture-templates'in a Anupam Sengupta
2010-11-14 18:03   ` David Maus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).