emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Manish <mailtomanish.sharma@gmail.com>
To: Mike McLean <mike.mclean@pobox.com>
Cc: Org-Mode <emacs-orgmode@gnu.org>
Subject: Re: using %(sexp) in capture templates
Date: Sat, 12 Oct 2013 02:03:28 -0400	[thread overview]
Message-ID: <CAHuUovWgJHc_zgtCuO-FPChcqtqgYTK2pT0E8AY0mUPqadzDfA@mail.gmail.com> (raw)
In-Reply-To: <5CA12BD7-331F-42C0-9F2E-59B7E381B286@pobox.com>

[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2442 bytes --]

  reply	other threads:[~2013-10-12  6:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-11  1:51 using %(sexp) in capture templates Manish
2013-10-12  1:55 ` Mike McLean
2013-10-12  6:03   ` Manish [this message]
2013-10-12 11:24     ` Mike McLean
2013-10-12 21:54       ` Manish
2013-10-13 14:16         ` Mike McLean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHuUovWgJHc_zgtCuO-FPChcqtqgYTK2pT0E8AY0mUPqadzDfA@mail.gmail.com \
    --to=mailtomanish.sharma@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mike.mclean@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).