Giter VIP home page Giter VIP logo

org-mac-ical's Introduction

org-mac-iCal

Imports events from iCal.app to the Emacs diary.

This repository is a “fork” of org-mac-iCal.el which is described in the Worg. I say “fork” because the original file doesn’t appear to be available in a repository anywhere.

I created this repository to publish my changes and keep track of issues.

The original file is copyright © 2009-2014 by Christopher Suckling. I attempted to reach him at the email address published in the file but did not get a reply.

Changes in this fork

  • Added support for including Exchange calendars
  • Added org-mac-iCal-import-exchange go enable or disable Exchange calendars.

    In principle, Exchange calendars are supported, but there are clearly issues with time zones and the way Exchange handles repeating/duplicated/declined events.

    Sometimes the Exchange .ics file contains several events with the same UID. Sometimes they have different SEQUENCE numbers. It’s unclear how these are supposed to be handled. At present, they sometimes occur multiple times in the diary.

  • Updated the code that attempts to determine if a calendar is “checked” by reading the Info.plist so that it handles a missing plist file correctly.
  • The sw_vers regex has been updated so that it will accept versions of MacOS after 10.8.
  • Added org-mac-iCal-calendar-names. If the names list isn’t nil, then calendars with those names (titles) are included, ignoring the Checked flag. The Checked flag doesn’t seem to be reliable in MacOS 10.14.

org-mac-ical's People

Contributors

ndw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

org-mac-ical's Issues

Calendar folder permission

Do you enable SIP on your Mac? I have to enable SIP to make it work. Otherwise, it will report error because it can not open Calendar folder, even though I give 777 permissions to all Calendar files (when SIP is disabled). Is this normal? It seems Calendar folder is not under the protection of SIP.

Errors when the diary file does not exist

On my first try using this, I got an error because I did not have a diary file.

I fixed this by modifying the top of org-mac-iCal as follows:

(defun org-mac-iCal ()
  "Selects checked calendars in iCal.app and imports them into
the the Emacs diary"
  (interactive)

  ;; kill diary buffers then empty diary files to avoid duplicates
  (setq currentBuffer (buffer-name))
  (setq openBuffers (mapcar (function buffer-name) (buffer-list)))
  (omi-kill-diary-buffer openBuffers)
  (with-temp-buffer
    (when (file-exists-p diary-file) ; <------ added this check
     (insert-file-contents diary-file))
    (delete-region (point-min) (point-max))
    (write-region (point-min) (point-max) diary-file))

Hope that's helpful. Seemed too trivial to bother with a full clone and pull request...

Calendar "Titles" for 10.14 or change info.plist "Checked" to "Enabled"?

I am on 10.14.6 and note the comment about the "Checked" flag in info.plist.

As a work around I have changed in omi-checked
(checked (car (cddr (lax-plist-get keys '(key nil "Checked")))))
to

(checked (car (cddr (lax-plist-get keys '(key nil "Enabled")))))

and included Exchange calendars too. I believe the variables all-calendars or usedCalendarFiles etc hold the correct lists, etc, and read & write iCal files ok. But the diary file output is always empty.

As a work around, I tried to customize org-mac-iCal-calendar-names, but am unsure what you mean by "Title"? Is it the title I see in the Calendar App, do I need to give its type (On My Mac / Work or iCloud Work), or caldav like 8949A8EB-4FF7-43D4-982E-1F116CD21C8F.caldav or the calendar title within the caldav 320B3CAD-E2F7-414D-BE89-118CA4C648CB.calendar? I tested possible combinations but still have empty diary.

I'd appreciate one caldav and one exchange example. I will also experiment on 10.13 to see how this works there. Thanks for the help, I don't know much about the Calendar formats on Mac, hope what I am asking makes sense.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.