On 2014-09-24 16:42, Steve Purcell <st...@sanityinc.com> writes:

> Alan Schmitt <alan.schm...@polytechnique.org> writes:
>> I just tested it with the current version and I'm not seeing this
>> problem. Is there something special about that email that breaks, or are
>> you seeing problems with every email?
>
> I see it with every mail. I'm on OS X 10.9.5, but the problem was also
> present on 10.9.4.

I'm also on 10.9.5. I was probably on 10.9.4 when I tweaked that code.

> The "substring" part of the removed code led to the trimming of the
> characters at each end, so it's not clear to me how it could ever have
> worked, unless the output is routinely wrapped in quotes on others'
> machines.

This was the case here: the string returned by the AppleScript had
quotes (and it still does).

For instance, with the message you mention, the call to
org-as-get-selected-mail returns this (doing a debug):

Result: "\"message://2.b2af716655bbac583727@NY-WEB01::split::Private beta 
invitation for Emacs Q&A site - Area 51 - Stack Exchange\""

> Mysterious indeed.
>
> In any case, there were a few blocks of identical-looking code dotted
> around the file: the block appears to have been wisely extracted into
> org-mac-paste-applescript-links, but the duplicate code hasn't been
> replaced with a call to that function. So this patch does so for the
> Mail case, and the same fix should also probably be made in
> org-mac-outlook-message-get-links.

It works well for grabbing a single message, but it breaks when grabbing
several. Here is one such broken result:

[[message://9670a832-d0b3-46a8-96bf-05c30d850...@gmail.com][Re: De passage ˆ 
San Jose"]]
[["message://4b980c40-db9a-47a7-95a7-17bb8cf81...@gmail.com][Re: De passage ˆ 
San Jose]]

The string returned by the AppleScript was this:

Result: "\"message://4b980c40-db9a-47a7-95a7-17bb8cf81...@gmail.com::split::Re: 
De passage \210 San 
Jose\nmessage://9670a832-d0b3-46a8-96bf-05c30d850...@gmail.com::split::Re: De 
passage \210 San Jose\""

Does it work on your machine with several messages selected?

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7

Attachment: signature.asc
Description: PGP signature

Reply via email to