all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: org-agenda-files: using variables
Date: Tue, 17 Jan 2023 11:08:58 -0500	[thread overview]
Message-ID: <87ilh5qh2d.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: 87ilh52o4p.fsf@debian-BULLSEYE-live-builder-AMD64

"Loris Bennett" <loris.bennett@fu-berlin.de> writes:

> Hi,
>
> I have
>
>   (setq lb/org-directory "~/org/"))
>   (setq lb/gtd-file (expand-file-name "gtd.org" lb/org-directory))
>   (setq lb/refile-file (expand-file-name "refile.org" lb/org-directory))
>   (setq org-agenda-files '(lb/gtd-file lb/refile-file))
>
> But generating the agenda fails with
>
>   Wrong type argument: stringp, lb/gtd-file  
>
> What is the correct syntax to use the variables in the list?
>

Quoting quotes everything including symbols, so you either do not
quote or use backquote:

  (setq org-agenda-files (list lb/gtd-file lb/refile-file))
  (setq org-agenda-files `(,lb/gtd-file ,lb/refile-file))

In this case, I'd prefer the first form, but the second form is often
useful - see

  (info "(elisp)Backquote")

-- 
Nick



  reply	other threads:[~2023-01-17 16:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 15:10 org-agenda-files: using variables Loris Bennett
2023-01-17 16:08 ` Nick Dokos [this message]
2023-01-18  6:55   ` Loris Bennett

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

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

  git send-email \
    --in-reply-to=87ilh5qh2d.fsf@alphaville.usersys.redhat.com \
    --to=ndokos@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.