From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Exclude some files from Date: Tue, 04 Oct 2011 11:53:42 -0400 Message-ID: <24332.1317743622@alphaville.dokosmarshall.org> References: Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB7JS-0004J4-4z for emacs-orgmode@gnu.org; Tue, 04 Oct 2011 11:53:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RB7JQ-0006NB-UC for emacs-orgmode@gnu.org; Tue, 04 Oct 2011 11:53:46 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:18637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RB7JQ-0006N3-Ky for emacs-orgmode@gnu.org; Tue, 04 Oct 2011 11:53:44 -0400 In-Reply-To: Message from Marcelo de Moraes Serpa of "Tue, 04 Oct 2011 10:13:50 CDT." List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcelo de Moraes Serpa Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org Marcelo de Moraes Serpa 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 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 org-agenda-files returns. All you have to do is massage that list a bit: (defun mdm/org-export-icalendar-combine-agenda-files-with-exclusions () (interactive) (apply 'org-export-icalendar t (mdm/exclude '("~/org/foo.org" "~/org/bar.org") (org-agenda-files t)))) (defun mdm/exclude (items lst) (if (null lst) lst (if (member (car lst) items) (mdm/exclude items (cdr lst)) (cons (car lst) (mdm/exclude items (cdr lst)))))) Mostly untested. Nick