* org-agenda-files: using variables
@ 2023-01-17 15:10 Loris Bennett
2023-01-17 16:08 ` Nick Dokos
0 siblings, 1 reply; 3+ messages in thread
From: Loris Bennett @ 2023-01-17 15:10 UTC (permalink / raw)
To: Org Mode Mailing List
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?
Cheers,
Loris
--
This signature is currently under constuction.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-agenda-files: using variables
2023-01-17 15:10 org-agenda-files: using variables Loris Bennett
@ 2023-01-17 16:08 ` Nick Dokos
2023-01-18 6:55 ` Loris Bennett
0 siblings, 1 reply; 3+ messages in thread
From: Nick Dokos @ 2023-01-17 16:08 UTC (permalink / raw)
To: emacs-orgmode
"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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: org-agenda-files: using variables
2023-01-17 16:08 ` Nick Dokos
@ 2023-01-18 6:55 ` Loris Bennett
0 siblings, 0 replies; 3+ messages in thread
From: Loris Bennett @ 2023-01-18 6:55 UTC (permalink / raw)
To: Org Mode Mailing List
Hi Nick,
Nick Dokos <ndokos@gmail.com> writes:
> "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")
Thanks, in particular also for the link to the relevant documentation.
Cheers,
Loris
--
This signature is currently under constuction.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-18 6:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 15:10 org-agenda-files: using variables Loris Bennett
2023-01-17 16:08 ` Nick Dokos
2023-01-18 6:55 ` Loris Bennett
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.