#1567 new
James Eagan

Fantastical bundle fails to fall back to Fantastical 1 if Fantastical 2 is not installed

Reported by James Eagan | November 4th, 2016 @ 04:31 PM

In r5299, the Fantastical bundle fails to properly fall back to Fantastical 1 when Fantastical 2 is not installed.

I have Fantastical 1, but not 2.

In the message viewer, when selecting text with a date (e.g. "Meet at 10am Monday"), no visible feedback occurs when using the menu item Command > Fantastical > Create Event. When running from the Terminal, no console output appears.

It appears that the AppleScript interpreter is unable to parse the create_event script when Fantastical 2 is not installed.

$ /Users/eaganj/Library/Application\ Support/MailMate/Managed/Bundles/Fantastical.mmbundle/Support/bin/create_event /Users/eaganj/Desktop/temp.txt
/Users/eaganj/Library/Application Support/MailMate/Managed/Bundles/Fantastical.mmbundle/Support/bin/create_event:431:439: script error: fin de ligne, etc. prévu(s) mais identificateur trouvé(s). (-2741)

(That script error says "end of line, etc., expected, but identifier found.")

I have been able to work around the problem by ripping out the Fantastical 2 attempt:

#!/usr/bin/osascript

-- Create a Fantastical calendar entry

on run argv
    set theFilename to item 1 of argv
    set theLines to every paragraph of (do shell script ("cat " & theFilename))
    set theSubject to item 1 of theLines
    set theMessage to item 2 of theLines
    set theSelection to item 3 of theLines

    tell application "Fantastical"
        activate
        parse sentence (theSubject & " " & theSelection) notes theMessage
    end tell
  
end run

I also moved the link back to the message into the notes field so as not to clutter up the main entry field.

There is also a bug in the add script that causes the messages to improperly link back into Mail.app. It is sufficient to add a %3c and %3e (< and >) around the message-Id :

  tmpfile.puts("message://%3c" + CGI::escape(ENV['MM_MESSAGE_ID']) + "%3e")

For what it's worth, I am running Mac OS 10.12.1.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages