emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] using %(sexp) in capture templates


From: Manish
Subject: Re: [O] using %(sexp) in capture templates
Date: Sat, 12 Oct 2013 02:03:28 -0400

 >> 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 <msgid>" 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]