From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: PATCH: Fix malformed "message" links produced by org-mac-link.el Date: Wed, 24 Sep 2014 21:01:08 +0200 Message-ID: References: <35ACE9A2-E7B9-41DC-A748-13022BC1FABC@sanityinc.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWrp0-0006cP-DV for emacs-orgmode@gnu.org; Wed, 24 Sep 2014 15:02:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWroq-0004Yc-MA for emacs-orgmode@gnu.org; Wed, 24 Sep 2014 15:01:50 -0400 Received: from mx1.polytechnique.org ([129.104.30.34]:48801) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWroq-0004YB-Cb for emacs-orgmode@gnu.org; Wed, 24 Sep 2014 15:01:40 -0400 In-Reply-To: (Steve Purcell's message of "Wed, 24 Sep 2014 16:42:18 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Steve Purcell Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2014-09-24 16:42, Steve Purcell writes: > Alan Schmitt 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 i= nvitation 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-05C30D85085D@gmail.com][Re: De passage = =88 San Jose"]] [["message://4B980C40-DB9A-47A7-95A7-17BB8CF8167F@gmail.com][Re: De passage= =88 San Jose]] The string returned by the AppleScript was this: Result: "\"message://4B980C40-DB9A-47A7-95A7-17BB8CF8167F@gmail.com::split:= :Re: De passage \210 San Jose\nmessage://9670A832-D0B3-46A8-96BF-05C30D8508= 5D@gmail.com::split::Re: De passage \210 San Jose\"" Does it work on your machine with several messages selected? Best, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iQEcBAEBCgAGBQJUIxULAAoJEAQNCjtO0uXHLgIH/jbM0vhzNsHtcQbPH8XPADaq 51b5nwUbWc59ltkaVDIvfsWFFHDP/Hb5ilkUsWxO9L3Ad9s+8FtAm1gnalzQtgEQ YsLXQMIeHiT3nesPqTdQ0uwLDn4k00IfN9yUNTgzcCH2tfdamqVs3AJfMQIo1quz O02LcZWePkCsQj9yUFgiZyEM80tGFYNyW+GeVrciu+unnBdmlQAyNrneVqxHgVSb 8ZgjMv8Dzk3nLsIRvtBqEymdoTqbSMR1Fq6PWbuGmZeWj883LA8mPnrKj5AkFdpp NdgRHf1gRz0J6HRYbml6HgXlrjCh5UpJYu+fGp/C+55tPr3XRd2RHkxoPYj1tjU= =q6cH -----END PGP SIGNATURE----- --=-=-=--