emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Alan E. Davis" <lngndvs@gmail.com>
To: Suvayu Ali <fatkasuvayu+linux@gmail.com>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: Defining capture-templates: custom and init file
Date: Tue, 8 Mar 2011 16:13:34 +1000	[thread overview]
Message-ID: <AANLkTinwigXc6pid8Z4utu=S6UyTBm_o0_hsOvKVCVkJ@mail.gmail.com> (raw)
In-Reply-To: <20110307213932.4dbda28a@bhishma.homelinux.net>

[-- Attachment #1: Type: text/plain, Size: 1992 bytes --]

Hello: Suvayu:

I have set the variable custom-file outside of the init file to
~/org/custom-local.el or some such, so there wouldn't be a conflict within
the same file.  I can delay loading of that file until after the hand-made
capture templates have been loaded from ~/org/capture-templates.el .

Alternately, one could load the custom-file first, then the other.  What I
am thinking/hoping/dreaming is that one could add to the capture-templates
variable, in the same way one adds to, say "load-path" by saying

   (setq load-path (append load-path (list "/home/olaf/Emacs")))

I have noticed the message from within the customization interface that some
variable or another was set outside of customization, and there may be
unpredictable results.  Wonder what that really means, though.   It's still
a variable, isn't it?

Alan

On Tue, Mar 8, 2011 at 3:39 PM, Suvayu Ali <fatkasuvayu+linux@gmail.com>wrote:

> On Tue, 8 Mar 2011 12:17:58 +1000
> "Alan E. Davis" <lngndvs@gmail.com> 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.
>

[-- Attachment #2: Type: text/html, Size: 2629 bytes --]

  reply	other threads:[~2011-03-08  6:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-08  2:17 Defining capture-templates: custom and init file Alan E. Davis
2011-03-08  5:39 ` Suvayu Ali
2011-03-08  6:13   ` Alan E. Davis [this message]
2011-03-08  6:33     ` Suvayu Ali
2011-03-08 11:05       ` Alan E. Davis
  -- strict thread matches above, loose matches on Subject: below --
2011-03-08 11:19 Rustom Mody

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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='AANLkTinwigXc6pid8Z4utu=S6UyTBm_o0_hsOvKVCVkJ@mail.gmail.com' \
    --to=lngndvs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=fatkasuvayu+linux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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