From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McLean Subject: Re: using %(sexp) in capture templates Date: Fri, 11 Oct 2013 21:55:38 -0400 Message-ID: <5CA12BD7-331F-42C0-9F2E-59B7E381B286@pobox.com> References: Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_62C0FB1F-82C1-46F1-A3E3-F852390CD016" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUoQx-0005CD-4v for emacs-orgmode@gnu.org; Fri, 11 Oct 2013 21:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUoQo-0006qs-5e for emacs-orgmode@gnu.org; Fri, 11 Oct 2013 21:55:59 -0400 Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:42016 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUoQn-0006qF-Vx for emacs-orgmode@gnu.org; Fri, 11 Oct 2013 21:55:50 -0400 In-Reply-To: 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: Manish Cc: Org-Mode --Apple-Mail=_62C0FB1F-82C1-46F1-A3E3-F852390CD016 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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. Mike --Apple-Mail=_62C0FB1F-82C1-46F1-A3E3-F852390CD016 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 mailtomanish.sharma@gmail.co= m> 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.

Mike


= --Apple-Mail=_62C0FB1F-82C1-46F1-A3E3-F852390CD016--