From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/83676 Path: news.gmane.org!not-for-mail From: Jan Tatarik Newsgroups: gmane.emacs.gnus.general Subject: Re: iCalendar support: reply to invitations, sync to org Date: Tue, 06 Aug 2013 22:32:31 +0200 Message-ID: <5n5x2r38qmef1c.fsf@nb-jtatarik2.xing.hh> References: <5n5x2r38v8y3nk.fsf@nb-jtatarik2.xing.hh> <87d2ub63e0.fsf@randomsample.de> <87obbjtgls.fsf@lifelogs.com> <87k3m7i2v5.fsf@randomsample.de> <8738svt9ih.fsf@lifelogs.com> <87fvwvhzw4.fsf@randomsample.de> <87d2rzrtmb.fsf@lifelogs.com> <5n5x2rtxlbgdom.fsf@nb-jtatarik2.xing.hh> <5n5x2r8v0lfdu5.fsf@nb-jtatarik2.xing.hh> <5n5x2rtxj9dpyy.fsf@nb-jtatarik2.xing.hh> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1375821189 30445 80.91.229.3 (6 Aug 2013 20:33:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 6 Aug 2013 20:33:09 +0000 (UTC) Cc: ding@gnus.org To: Lars Magne Ingebrigtsen Original-X-From: ding-owner+M31932@lists.math.uh.edu Tue Aug 06 22:33:10 2013 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V6nwL-0005Mf-Hv for ding-account@gmane.org; Tue, 06 Aug 2013 22:33:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1V6nvy-0001YL-Bp; Tue, 06 Aug 2013 15:32:46 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1V6nvw-0001Y4-JP for ding@lists.math.uh.edu; Tue, 06 Aug 2013 15:32:44 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1V6nvu-0003nc-TQ for ding@lists.math.uh.edu; Tue, 06 Aug 2013 15:32:44 -0500 Original-Received: from mail-ee0-f52.google.com ([74.125.83.52]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1V6nvt-0003oi-De; Tue, 06 Aug 2013 22:32:41 +0200 Original-Received: by mail-ee0-f52.google.com with SMTP id c41so450822eek.11 for ; Tue, 06 Aug 2013 13:32:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=049PrSsImVHnOfUvq80DsU6dkiQ9ckqj4k96K3XYkdg=; b=alVW65kHicYreu1wEVrnHr3AvgEuoHT1JQPerIRVokGVlsqSSeIKIlHgBzyV19vXjW oboHV9hOuZazLo8n7RhCkJwP0d+Br6z0SyhpUOdBCB3Kk6QUZxaPmWBL1sHOeLRGVeIE t9y/KbLPG/o2mnZIki1x+14hi9Gpi6dxUoFkRWCWEiRJ4+hcad7jHDVqaSMnb5QBc3gY LnSYsgBvsqIg3mzqZwGfkvLd/yZr0qO4SqhEXnLXcj5eV6g7pLkV8H3I78gOiERsJwl8 SMMPFby/6Lc6BFfZg30zCO1YkNz6r0pmaRBnJWtZHVHZMF/4kAnAQd5gQJOwltBAPigG tWXg== X-Received: by 10.14.202.193 with SMTP id d41mr2714961eeo.83.1375821155824; Tue, 06 Aug 2013 13:32:35 -0700 (PDT) Original-Received: from nb-jtatarik2.xing.hh (e177248007.adsl.alicedsl.de. [85.177.248.7]) by mx.google.com with ESMTPSA id c3sm4590595eev.3.2013.08.06.13.32.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 06 Aug 2013 13:32:34 -0700 (PDT) In-Reply-To: (Lars Magne Ingebrigtsen's message of "Fri, 02 Aug 2013 01:10:30 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-Spam-Score: -3.0 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:83676 Archived-At: --=-=-= Content-Type: text/plain On Fri, Aug 02 2013, Lars Magne Ingebrigtsen wrote: > Jan Tatarik writes: >> Getting compilation errors from the buildbot. Is the pcase macro >> available in older versions? > I think it first became available in Emacs 24. But Emacs 24.1 didn't > support some expressions that it now supports, so using it for anything > other than Emacs 24.3 and up isn't very backward-compatible, > unfortunately. How about this, then? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=pcase-removal.patch Content-Description: replace pcase with cond diff --git a/lisp/gnus-icalendar.el b/lisp/gnus-icalendar.el index 0286fd5dd8908ad7839b1f541a5946d2814bea3d..3a9e743e8ed98a0b694a2a2f1d597a6e69ae3142 100644 --- a/lisp/gnus-icalendar.el +++ b/lisp/gnus-icalendar.el @@ -183,11 +183,11 @@ :end (gnus-icalendar-event--decode-datefield event 'DTEND zone-map) :rsvp (string= (plist-get (cadr attendee) 'RSVP) "TRUE"))) - (event-class (pcase method - ("REQUEST" 'gnus-icalendar-event-request) - ("CANCEL" 'gnus-icalendar-event-cancel) - ("REPLY" 'gnus-icalendar-event-reply) - (_ 'gnus-icalendar-event)))) + (event-class (cond + ((string= method "REQUEST") 'gnus-icalendar-event-request) + ((string= method "CANCEL") 'gnus-icalendar-event-cancel) + ((string= method "REPLY") 'gnus-icalendar-event-reply) + (t 'gnus-icalendar-event)))) (labels ((map-property (prop) (let ((value (icalendar--get-event-property event prop))) @@ -252,14 +252,15 @@ status will be retrieved from the first matching attendee record." ;; NOTE: not all of the below fields are mandatory, ;; but they are often present in other clients' ;; replies. Can be helpful for debugging, too. - (new-line (pcase key - ("ATTENDEE" (update-attendee-status line)) - ("SUMMARY" (update-summary line)) - ("DTSTAMP" (update-dtstamp)) - ((or "ORGANIZER" "DTSTART" "DTEND" - "LOCATION" "DURATION" "SEQUENCE" - "RECURRENCE-ID" "UID") line) - (_ nil)))) + (new-line + (cond + ((string= key "ATTENDEE") (update-attendee-status line)) + ((string= key "SUMMARY") (update-summary line)) + ((string= key "DTSTAMP") (update-dtstamp)) + ((find key '("ORGANIZER" "DTSTART" "DTEND" + "LOCATION" "DURATION" "SEQUENCE" + "RECURRENCE-ID" "UID")) line) + (t nil)))) (when new-line (push new-line reply-event-lines)))))) @@ -405,7 +406,8 @@ Return nil for non-recurring EVENT." (defun gnus-icalendar--deactivate-org-timestamp (ts) (replace-regexp-in-string "[<>]" - (lambda (m) (pcase m ("<" "[") (">" "]"))) + (lambda (m) (cond ((string= m "<") "[") + ((string= m ">") "]"))) ts)) (defun gnus-icalendar-find-org-event-file (event &optional org-file) --=-=-=--