From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Defining capture-templates: custom and init file Date: Mon, 7 Mar 2011 21:39:32 -0800 Message-ID: <20110307213932.4dbda28a@bhishma.homelinux.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=47561 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pwpe3-00078g-NE for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 00:39:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pwpe2-00088K-W2 for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 00:39:43 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:52728) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pwpe2-00088A-Ti for emacs-orgmode@gnu.org; Tue, 08 Mar 2011 00:39:42 -0500 Received: by yxt33 with SMTP id 33so2466686yxt.0 for ; Mon, 07 Mar 2011 21:39:41 -0800 (PST) In-Reply-To: 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: "Alan E. Davis" Cc: org-mode On Tue, 8 Mar 2011 12:17:58 +1000 "Alan E. Davis" wrote: > I would like to request advice, on how can I set up so most of my > capture templates are loaded from a file (~/org/capture-templates.el > in my case) and still retain the ability to define new capture > templates on the fly. I want the best of both worlds: Sorry, can't be done. The customize interface stores the (custom-set-variables ... ) block in the init file. Having more than one such code block might lead to unpredictable Emacs behaviour. Your only two choices are: 1. Use customize. Then your capture templates are stored with your other emacs customisations in your init file (e.g. ~/.emacs, ~/.emacs.d/init.el or whatever). 2. Use setq to define your templates outside of customize. If you choose this, you lose the ability to define templates using customize and save it. You can still however save a template temporarily `C-c C-c'. I hope this answers your query. -- Suvayu Open source is the future. It sets us free.