emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anupam Sengupta <anupamsg@gmail.com>
To: emacs-orgmode@gnu.org
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)	[thread overview]
Message-ID: <loom.20101107T064611-764@post.gmane.org> (raw)
In-Reply-To: m2y696bcxl.fsf@gmail.com

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

Hope this explanation helps.

Anupam Sengupta

  reply	other threads:[~2010-11-07  5:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Anupam Sengupta [this message]
2010-11-14 18:03   ` Re: Bug?: 7.02/7.3 - Unable to set `org-capture-templates'in a David Maus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20101107T064611-764@post.gmane.org \
    --to=anupamsg@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).