Hi Alan,

Thanks for the patch. It looks OK to me - can you please go ahead and apply it to the file? Also, feel free to add your name to the contributor list at the top of the file.

Thanks!

  -Anthony



On Wed, Jun 4, 2014 at 6:15 AM, Alan Schmitt <alan.schmitt@polytechnique.org> wrote:
Hello,

Please find attached a small patch to org-mac-link.el for the functions
creating links to messages in Mail.app.

The problem was that calling the org-mac-message-insert-selected would
always add a spurious first link with empty url and an escaped quote as
text. It would also leave another escaped quote at the end of the text
of the real link.

The patch makes sure that no extra empty line is created during the
AppleScript call, and removes the escaped quotes around the whole value
returned from AppleScript. I have left the code that removes additional
quotes around individual links if they are there, but I don't think it's
needed (I don't see how they could occur there).

Best,

Alan