Carsten Dominik <carsten.domi...@gmail.com> wrote: > > On May 10, 2009, at 2:33 PM, djcb.b...@gmail.com wrote: > > >>> What I would like to do is create a link to a tomboy note. I'm > >>> sure it would be possible somehow, but I have no idea how > >>> though. Something like: > >>> > >>> * Check out Blog post draft [[tomboy:"my draft"]] > >>> > >>> And C-u C-o on it would open this tomboy note in tomboy. > >>> > > > > $ tomboy --open-note 'MyNote' > > Something like the following (untested...) > > (require 'org) > (org-add-link-type "tomboy" 'org-tomboy-open) > > (defun org-tomboy-open (note) > (let ((outbuf (get-buffer-create "*Org Shell Output*")) > (cmd (concat "tomboy --open-note " (shell-quote-argument note) " &"))) > (with-current-buffer outbuf (erase-buffer)) > (shell-command cmd outbuf outbuf))) >
I ran a very simple test and this worked very nicely. The only caution for the original poster is that if the title of the note contains spaces, the link has to look like this: [[tomboy:my%20draft][draft]] not like this: > >>> ... [[tomboy:"my draft"]] C-c C-l will encode spaces properly, but don't enter quotes (unless your tomboy note really includes quotes in the title). HTH, Nick _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode