From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Creekmore Subject: [PATCH] Detect Mac OS X in iCal import Date: Tue, 30 Mar 2010 16:03:08 -0500 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwias-0001bL-4T for emacs-orgmode@gnu.org; Tue, 30 Mar 2010 17:03:26 -0400 Received: from [140.186.70.92] (port=55393 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwiao-0001YE-3H for emacs-orgmode@gnu.org; Tue, 30 Mar 2010 17:03:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwiaf-0008CD-Gi for emacs-orgmode@gnu.org; Tue, 30 Mar 2010 17:03:14 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:37852) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwiaf-0008C8-Cf for emacs-orgmode@gnu.org; Tue, 30 Mar 2010 17:03:13 -0400 Received: by vws4 with SMTP id 4so1427527vws.0 for ; Tue, 30 Mar 2010 14:03:12 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This patch modifies the Mac OS X detection code to check for both Leopard and Snow Leopard, since they both store iCal events in separate files for Spotlight searching purposes. Jonathan --8<---------------cut here---------------start------------->8--- diff --git a/contrib/lisp/org-mac-iCal.el b/contrib/lisp/org-mac-iCal.el index 0d0b4f8..2510aa7 100644 --- a/contrib/lisp/org-mac-iCal.el +++ b/contrib/lisp/org-mac-iCal.el @@ -98,8 +98,8 @@ the the Emacs diary" ;; for each calendar, concatenate individual events into a single ics file (with-temp-buffer - (shell-command "sw_vers" " *temp*") - (when (re-search-backward "10.5" nil t) + (shell-command "sw_vers" (current-buffer)) + (when (re-search-backward "10\\.[56]" nil t) (omi-concat-leopard-ics all-calendars))) ;; move all caldav ics files to the same place as local ics files --8<---------------cut here---------------start------------->8---