emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exclude some files from
@ 2011-10-03 18:48 Marcelo de Moraes Serpa
  2011-10-04 15:13 ` Marcelo de Moraes Serpa
  0 siblings, 1 reply; 4+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-10-03 18:48 UTC (permalink / raw)
  To: emacs-orgmode

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

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?

Thanks,

- Marcelo.

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exclude some files from
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-10-04 15:13 UTC (permalink / raw)
  To: emacs-orgmode

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

*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?
>
> Thanks,
>
> - Marcelo.
>

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exclude some files from
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2011-10-04 15:53 UTC (permalink / raw)
  To: Marcelo de Moraes Serpa; +Cc: nicholas.dokos, emacs-orgmode

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Exclude some files from
  2011-10-04 15:53   ` Nick Dokos
@ 2011-10-04 16:16     ` Marcelo de Moraes Serpa
  0 siblings, 0 replies; 4+ messages in thread
From: Marcelo de Moraes Serpa @ 2011-10-04 16:16 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode

[-- 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 --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-04 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

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).