emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcelo de Moraes Serpa <celoserpa@gmail.com>
To: nicholas.dokos@hp.com
Cc: emacs-orgmode@gnu.org
Subject: Re: Exclude some files from
Date: Tue, 4 Oct 2011 11:16:41 -0500	[thread overview]
Message-ID: <CACHMzOE5UcBOBM_ioxaU7Jf_tzhuOKEyhyPBEw=KE+Lg-tqq+g@mail.gmail.com> (raw)
In-Reply-To: <24332.1317743622@alphaville.dokosmarshall.org>

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

Thank Nick. I'll test it out.

On Tue, Oct 4, 2011 at 10:53 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:

> Marcelo de Moraes Serpa <celoserpa@gmail.com> 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 <
> celoserpa@gmail.com> 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
>

[-- Attachment #2: Type: text/html, Size: 2357 bytes --]

      reply	other threads:[~2011-10-04 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-03 18:48 Exclude some files from Marcelo de Moraes Serpa
2011-10-04 15:13 ` Marcelo de Moraes Serpa
2011-10-04 15:53   ` Nick Dokos
2011-10-04 16:16     ` Marcelo de Moraes Serpa [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://www.orgmode.org/

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

  git send-email \
    --in-reply-to='CACHMzOE5UcBOBM_ioxaU7Jf_tzhuOKEyhyPBEw=KE+Lg-tqq+g@mail.gmail.com' \
    --to=celoserpa@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=nicholas.dokos@hp.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).