From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aaron Ecay Subject: Re: [PATCH] ox-icalendar: fix handling of timestamps Date: Sat, 10 Aug 2013 22:13:54 -0400 Message-ID: <87ob95dlel.fsf@gmail.com> References: <20130811020358.GA30350@kenny.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39606) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8LAT-0007vQ-4F for emacs-orgmode@gnu.org; Sat, 10 Aug 2013 22:14:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8LAK-0004Ts-Lj for emacs-orgmode@gnu.org; Sat, 10 Aug 2013 22:14:05 -0400 Received: from mail-qc0-x235.google.com ([2607:f8b0:400d:c01::235]:60925) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8LAK-0004Tg-IJ for emacs-orgmode@gnu.org; Sat, 10 Aug 2013 22:13:56 -0400 Received: by mail-qc0-f181.google.com with SMTP id k15so2832686qcv.12 for ; Sat, 10 Aug 2013 19:13:55 -0700 (PDT) Received: from localhost (vagvlan506.041.wlan.law.upenn.edu. [165.123.104.42]) by mx.google.com with ESMTPSA id m5sm10525898qaa.13.2013.08.10.19.13.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 10 Aug 2013 19:13:55 -0700 (PDT) In-Reply-To: <20130811020358.GA30350@kenny.local> 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: emacs-orgmode@gnu.org Hi Viktor, Thanks for this patch; I had also noticed this problem. 2013ko abuztuak 10an, Viktor Rosenfeld-ek idatzi zuen: >=20 > * ox-icalendar.el (org-icalendar-entry): Honor setting of > `org-icalendar-with-timestamps' for timestamps on headlines > and checkboxes. >=20 > 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. >=20 > TINYCHANGE > --- > lisp/ox-icalendar.el | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) >=20 > diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el > index c6ab295..8f15124 100644 > --- a/lisp/ox-icalendar.el > +++ b/lisp/ox-icalendar.el > @@ -580,15 +580,24 @@ inlinetask within the section." > ;; When collecting plain timestamps from a headline and > ;; its title, skip inlinetasks since collection will > ;; happen once ENTRY is one of them. > - (let ((counter 0)) > + (let ((counter 0) > + (with-timestamps (plist-get info :with-timestamps))) > (mapconcat > 'identity > (org-element-map (cons (org-element-property :title entry) > (org-element-contents inside)) > 'timestamp > (lambda (ts) > - (let ((uid (format "TS%d-%s" (incf counter) uid))) > - (org-icalendar--vevent entry ts uid summary loc desc cat))) > + (let ((type (org-element-property :type ts)) > + (uid (format "TS%d-%s" (incf counter) uid))) > + (when (or (eq with-timestamps 'all) Here, I think you want to compare with t, not 'all (check the defcustom for =E2=80=98org-icalendar-with-timestamps=E2=80=99). > + (and (eq with-timestamps 'active) > + (or (eq type 'active) > + (eq type 'active-range))) This is only a cosmetic comment, so feel free to disregard it, but: might the =E2=80=98(or ...)=E2=80=99 be cleaner as =E2=80=98(memq type '(ac= tive active-range))=E2=80=99? --=20 Aaron Ecay