Org-mode mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Nick Dokos <ndokos@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: add linked files to agenda files
Date: Tue, 17 Nov 2020 08:52:37 +0100
Message-ID: <87mtzgxvwa.fsf@m4x.org> (raw)
In-Reply-To: <87r1otasx9.fsf@alphaville.usersys.redhat.com>

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

Hello Nick,

On 2020-11-16 16:33, Nick Dokos <ndokos@gmail.com> writes:

> Just guessing at this point, I would imagine you'd want something like
> this:
>
> --8<---------------cut here---------------start------------->8---
> (defun path-from-link (link)
>    (org-element-property :path link))
>
> (setq org-agenda-files (with-current-buffer
>                          (find-file-noselect "master.org")
>                          (org-element-map (org-element-parse-buffer)
>                                           '(link)
>                                           #'path-from-link)))
> --8<---------------cut here---------------end--------------->8---

Thanks a lot, this is most useful! I did not think it could be this
simple.

Best,

Alan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 528 bytes --]

      reply	other threads:[~2020-11-17  7:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14  9:33 Alan Schmitt
2020-11-16 21:33 ` Nick Dokos
2020-11-17  7:52   ` Alan Schmitt [this message]

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://orgmode.org

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

  git send-email \
    --in-reply-to=87mtzgxvwa.fsf@m4x.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@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

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git