emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: org-agenda-files: using variables


From: Nick Dokos
Subject: Re: org-agenda-files: using variables
Date: Tue, 17 Jan 2023 11:08:58 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

"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 via email to

[Prev in Thread] Current Thread [Next in Thread]