From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Icalendar / exclude events older than 2 months Date: Fri, 27 Apr 2018 01:34:57 +0200 Message-ID: <87h8nxk0da.fsf@bzg.fr> References: <04646305-5630-4DF9-89AF-4309D5CE73F6@yahoo.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBqPl-0008HK-Ea for emacs-orgmode@gnu.org; Thu, 26 Apr 2018 19:35:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBqPj-0001dX-JG for emacs-orgmode@gnu.org; Thu, 26 Apr 2018 19:35:01 -0400 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" To: Jota Pin Cc: emacs-orgmode@gnu.org Hi Jota, Jota Pin writes: > I would like to set a hook that excludes events older than 2 months > from exporting using org-icalendar-combine-agenda-files. > > I do not know enough lisp for that, thanks for any help , Here is an idea on how to achieve this manually. 0. Set a dedicated tag in `org-icalendar-exclude-tags' 1. Create an agenda custom command listing events olders than two months: ("@" tags-todo "+SCHEDULED<=\"<-2m>\"") 2. In such an agenda view, select all items in the region and hit ":" (org-agenda-set-tags) to add your dedicated tag Then export the calendar should exclude these events. I've not tested, but you get the idea. HTH, -- Bastien