[Top][All Lists]

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

Re: [O] Exclude some files from

From: Nick Dokos
Subject: Re: [O] Exclude some files from
Date: Tue, 04 Oct 2011 11:53:42 -0400

Marcelo de Moraes Serpa <address@hidden> wrote:

> *bump* ... I am being too stupid :) I could not find it in the documentation.
> Thanks,
> - M
> On Mon, Oct 3, 2011 at 1:48 PM, Marcelo de Moraes Serpa <address@hidden> 
> wrote:
>     Hey guys,
>     I'm using org-export-icalendar-combine-agenda-files to export the agenda 
> files into one .ics
>     file. However, I'd like to exclude a particular org file from this 
> export. How could I do it?

Can't do it with org-export-icalendar-combine-agenda-files as it stands, but
if you look at the code, all it does is:

| (defun org-export-icalendar-combine-agenda-files ()
|   "Export all files in `org-agenda-files' to a single combined iCalendar file.
| The file is stored under the name `org-combined-agenda-icalendar-file'."
|   (interactive)
|   (apply 'org-export-icalendar t (org-agenda-files t)))

so it just applies org-export-icalendar to the list of file that 
returns. All you have to do is massage that list a bit:

(defun mdm/org-export-icalendar-combine-agenda-files-with-exclusions ()
       (apply 'org-export-icalendar t
              (mdm/exclude '("~/org/foo.org" "~/org/bar.org") (org-agenda-files 

(defun mdm/exclude (items lst)
  (if (null lst)
    (if (member (car lst) items)
        (mdm/exclude items (cdr lst))
      (cons (car lst) (mdm/exclude items (cdr lst))))))

Mostly untested.


reply via email to

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