From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manish Subject: Re: using %(sexp) in capture templates Date: Sat, 12 Oct 2013 02:03:28 -0400 Message-ID: References: <5CA12BD7-331F-42C0-9F2E-59B7E381B286@pobox.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0141a79c32e64604e885003e Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUsIy-0007He-Kf for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 02:04:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUsIx-0008Kx-Fy for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 02:04:00 -0400 Received: from mail-ob0-x233.google.com ([2607:f8b0:4003:c01::233]:39685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUsIx-0008Kt-9d for emacs-orgmode@gnu.org; Sat, 12 Oct 2013 02:03:59 -0400 Received: by mail-ob0-f179.google.com with SMTP id wp18so3382236obc.24 for ; Fri, 11 Oct 2013 23:03:58 -0700 (PDT) In-Reply-To: <5CA12BD7-331F-42C0-9F2E-59B7E381B286@pobox.com> 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: Mike McLean Cc: Org-Mode --089e0141a79c32e64604e885003e Content-Type: text/plain; charset=ISO-8859-1 >> On Fri, Oct 11, 2013 at 9:55 PM, Mike McLean wrote: >> >> > On Oct 10, 2013, at 9:51 PM, Manish wrote: >> > >> > i am trying to use %(org-mac-outlook-message-insert-selected) >> > in a capture template to create a todo entry from an email >> > selected in outlook on mac os x. i was expecting that the >> > function will get executed when the template is called and >> > enter a link to the email but seems to return nothing. the >> > function works when used outside of template. any ideas how i >> > can begin to debug this or if i should be doing anything >> > differently? >> > >> >> When I added the support for Outlook I matched the style and design >> of the existing Org mac message (for Mail). In particular >> org-mac-outlook-message-insert-selected does not return a value, it >> is designed to be called interactively and inserts a link at the >> current point in the current buffer. As such it would not work as a >> %() capture template. >> >> Now on the other hand all org-mac-outlook-message-insert-selected >> does is ~(insert (org-mac-outlook-message-get-links "s"))~. I >> presume (though I haven't tested) that you could use the inner form >> ~(org-mac-outlook-message-get-links "s")~ in a %() sexp in a >> capture template. >> thanks! it does work this way. i am not sure if it's directly related but there's a weird issue. once i have a link to an email, i can open it by c-c c-o only once. any following attempt just fails with a message: "org-mac-link: error could not find outlook message " where msgid is the id of the message. when i ran the mdfind command that i found in the source in the terminal, it again worked once only. any subsequent attempt opens a finder window. very very odd behavior since i am not even modifying the email in anyway (other than just opening it) that might change its message id or something. cheers! --manish --089e0141a79c32e64604e885003e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
=A0>> On Fri,= Oct 11, 2013 at 9:55 PM, Mike McLean wrote:
=A0 >>
=A0 >&g= t; =A0 > On Oct 10, 2013, at 9:51 PM, Manish wrote:
=A0 >> =A0 = >
=A0 >> =A0 > i am trying to use %(org-mac-outlook-message= -insert-selected)
=A0 >> =A0 > in a capture template to create a todo entry from an = email
=A0 >> =A0 > selected in outlook on mac os x. =A0i was ex= pecting that the
=A0 >> =A0 > function will get executed when t= he template is called and
=A0 >> =A0 > enter a link to the email but seems to return nothing= . =A0the
=A0 >> =A0 > function works when used outside of templ= ate. =A0any ideas how i
=A0 >> =A0 > can begin to debug this or= if i should be doing anything
=A0 >> =A0 > differently?
=A0 >> =A0 >
=A0 >>= ;
=A0 >> When I added the support for Outlook I matched the style= and design
=A0 >> of the existing Org mac message (for Mail). In = particular
=A0 >> org-mac-outlook-message-insert-selected does not return a valu= e, it
=A0 >> is designed to be called interactively and inserts a = link at the
=A0 >> current point in the current buffer. As such it= would not work as a
=A0 >> %() capture template.
=A0 >>
=A0 >> Now on = the other hand all org-mac-outlook-message-insert-selected
=A0 >> = does is ~(insert (org-mac-outlook-message-get-links "s"))~. I
= =A0 >> presume (though I haven't tested) that you could use the i= nner form
=A0 >> ~(org-mac-outlook-message-get-links "s")~ in a %() s= exp in a
=A0 >> capture template.
=A0 >>

thanks! = =A0it does work this way.

i am not sure if it's directly related= but there's a weird issue. =A0once
i have a link to an email, i can open it by c-c c-o only once. =A0any
fo= llowing attempt just fails with a message: "org-mac-link: error could<= br>not find outlook message <msgid>" where msgid is the id of th= e
message. when i ran the mdfind command that i found in the source in theterminal, it again worked once only. =A0any subsequent attempt opens a
= finder window. =A0very very odd behavior since i am not even modifying the<= br> email in anyway (other than just opening it) that might change its
messa= ge id or something.

cheers!
--manish

--089e0141a79c32e64604e885003e--