From mboxrd@z Thu Jan 1 00:00:00 1970 From: Viktor Rosenfeld Subject: Re: [PATCH] ox-icalendar: fix handling of timestamps Date: Sun, 11 Aug 2013 14:42:14 +0200 Message-ID: <20130811124214.GA69042@kenny.local> References: <20130811020358.GA30350@kenny.local> <87mwooznuk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8UyZ-00058j-5O for emacs-orgmode@gnu.org; Sun, 11 Aug 2013 08:42:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8UyQ-0008K2-Nf for emacs-orgmode@gnu.org; Sun, 11 Aug 2013 08:42:27 -0400 Received: from mail-ee0-x22a.google.com ([2a00:1450:4013:c00::22a]:48177) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8UyQ-0008Jy-HS for emacs-orgmode@gnu.org; Sun, 11 Aug 2013 08:42:18 -0400 Received: by mail-ee0-f42.google.com with SMTP id b45so2980085eek.29 for ; Sun, 11 Aug 2013 05:42:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87mwooznuk.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Hi Nicolas, Nicolas Goaziou wrote: > Hello, > > Viktor Rosenfeld writes: > > > * ox-icalendar.el (org-icalendar-entry): Honor setting of > > `org-icalendar-with-timestamps' for timestamps on headlines > > and checkboxes. > > > > The setting `org-icalendar-with-timestamps' was only applied > > to timestamps which do not appear on a heading or on a > > checkbox. E.g., with `org-icalendar-with-timestamps' set to > > 'active, an heading containing an inactive timestamp on would > > be exported. This patch fixes this. > > This would make icalendar back-end inconsistent with other back-ends, > see `org-export-with-timestamps' docstring. > > If inconsistency is desirable in this case, `org-icalendar-with-timestamps' > docstring should clearly state it. The docstring of `org-icalendar-with-timestamps' already states: This variable has precedence over `org-export-with-timestamps'. It can also be set with the #+OPTIONS line, e.g. "<:t". I believe that inconsistency is desirable here. Consider the following use case with three headlines: * TODO An appointment in the future <2013-08-12 So 09:00> * DONE A note about an appointment in the past [2013-08-10 Fr 09:00] * WAIT A reminder how long I've been waiting for something [2013-08-10 Fr] The previous behavior, with `org-icalendar-with-timestamps' set to 'active, was that the first and the last headlines were picked up (even though the timestamp in the last headline is inactive). This was unexpected because the two inactive timestamps are handled differently. My expectation was that only the first headline should have been exported. This is what my patch achieves. (Putting timestamps on the heading is useful to me because then I can see them in the agenda. Also, I often put timestamps on lines with checkboxes. However, I do not want to see any of those in my calendar when I export only active timestamps.) Cheers, Viktor > > > Regards, > > -- > Nicolas Goaziou >