[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Use default value if a variable is not defined
From: |
Nathan Neff |
Subject: |
[O] Use default value if a variable is not defined |
Date: |
Thu, 11 Oct 2012 11:04:42 -0500 |
Hello,
I'm trying to create a function that will tell org-capture
dynamically where to put the captured item.
I have it almost working -- where I'm getting hung up on is
with basic Emacs lisp. I want to basically implement this
pseudo code:
IF I have defined a variable called njn/current-q-file then
(find-file njn/current-q-file)
ELSE
(find-file ("questions.org")))
However, if I do not define my njn/current-q-file then
I get a "Symbol's value as variable is void" error when Emacs starts up.
How do I test for the existence (and non-nil ness of a variable in Emacs)
Thanks,
--Nate
- [O] Use default value if a variable is not defined,
Nathan Neff <=