From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: thunk2@arcor.de (Thomas Plass) Newsgroups: gmane.emacs.bugs Subject: bug#34315: [PATCH] icalendar.el: DURATION fix + more robust timezone handling Date: Thu, 1 Oct 2020 21:53:55 +0300 Message-ID: <24438.9667.925336.969882@AGAME7.local> References: <23640.9851.562972.730234@AGAME7.local> <875ztog7hx.fsf@panama> <87wom1otsw.fsf@panama> <87zh7267sy.fsf@gnus.org> <87pn7yo54t.fsf@panama> <83o8ni4fhu.fsf@gnu.org> <24369.32256.954408.774614@AGAME7.local> <87y2mlxx8r.fsf@gnus.org> <87d03x43kz.fsf@panama> <24371.59842.984273.402129@AGAME7.local> <87y2mkknyc.fsf@gnus.org> <24371.61149.995030.284670@AGAME7.local> <87364rq4yl.fsf@panama> <87imcwf404.fsf@panama> <24400.43911.666145.400179@AGAME7.local> <874kof2aui.fsf@panama> <24435.1743.473339.944597@AGAME7.local> <874knewwfc.fsf@gnus.org> <24437.56299.111042.412318@AGAME7.local> <87d021vrzi.fsf@panama> <877ds9rk4j.fsf@gnus.org> <878scpvqcf.fsf@panama> <24438.9378.994810.275603@AGAME7.local> Reply-To: Thomas Plass Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16775"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Lars Ingebrigtsen , 34315@debbugs.gnu.org, Jan Tatarik To: thunk2@arcor.de (Thomas Plass) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 01 20:55:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kO3jR-0004Du-Qe for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Oct 2020 20:55:09 +0200 Original-Received: from localhost ([::1]:53022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kO3jQ-0007Yp-S5 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 01 Oct 2020 14:55:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kO3jK-0007YV-SM for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2020 14:55:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kO3jK-0007Cw-Ix for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2020 14:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kO3jK-00026x-Gn for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2020 14:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: thunk2@arcor.de (Thomas Plass) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 01 Oct 2020 18:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 34315 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 34315-submit@debbugs.gnu.org id=B34315.16015784618065 (code B ref 34315); Thu, 01 Oct 2020 18:55:02 +0000 Original-Received: (at 34315) by debbugs.gnu.org; 1 Oct 2020 18:54:21 +0000 Original-Received: from localhost ([127.0.0.1]:38321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO3ie-000261-VK for submit@debbugs.gnu.org; Thu, 01 Oct 2020 14:54:21 -0400 Original-Received: from mx009.vodafonemail.xion.oxcs.net ([153.92.174.39]:14416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kO3id-00025o-MM for 34315@debbugs.gnu.org; Thu, 01 Oct 2020 14:54:20 -0400 Original-Received: from vsmx002.vodafonemail.xion.oxcs.net (unknown [192.168.75.192]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTP id 1739F605707; Thu, 1 Oct 2020 18:54:14 +0000 (UTC) Original-Received: from agame7.arcor.de (unknown [2.200.173.137]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 6DDFF605453; Thu, 1 Oct 2020 18:54:01 +0000 (UTC) In-Reply-To: Your message of Thursday, October 1 2020 21:49:06 (ID: <24438.9378.994810.275603@AGAME7.local>). X-VADE-STATUS: LEGIT X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:189561 Archived-At: Cleaned up version: (defun icalendar-tests--get-ical-from-file (ics-file &optional component) "Return iCalendar data structures from ICS-FILE. Optional symbol COMPONENT names a top-level component like 'VTIMEZONE." (let (ical) (if (file-exists-p ics-file) (save-excursion (with-temp-buffer (insert-file-contents ics-file) (goto-char (point-min)) (setq ical (car (icalendar--read-element nil nil))) (if component (car (icalendar--get-children ical component)) ical))) (error "Can't find ICS file %s" ics-file)))) Thomas Plass wrote at 21:49 on October 1, 2020: : : - extend icalendar-tests.el with the following: : : (defvar icalendar-resources-directory "icalendar-resources" : "Name of directory containing ICS files. : This directory is relative to icalendar-tests.el.") : : (defun icalendar-tests--get-ical-from-file (ics-file &optional component) : "Return iCalendar data structures from ICS-FILE. : Optional symbol COMPONENT names a top-level component like 'VTIMEZONE." : (let (ical) : (if (file-exists-p ics-file) : (save-excursion : (with-temp-buffer : (insert-file-contents ics-file) : (goto-char (point-min)) : (setq ical (car (icalendar--read-element nil nil))) : (if component : (setq res (car (icalendar--get-children ical component))) : (setq res ical)))) : (error "Can't find ICS file %s" ics-file))))