emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: "djcb@djcbsoftware.nl" <djcb@djcbsoftware.nl>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Links to tomboy notes in org files
Date: Sun, 10 May 2009 13:01:54 -0400	[thread overview]
Message-ID: <21519.1241974914@gamaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Carsten Dominik <carsten.dominik@gmail.com> of "Sun, 10 May 2009 12:53:17 -0000." <5FA5CAD3-A890-47AB-B63F-91221FD1D622@gmail.com>

Carsten Dominik <carsten.dominik@gmail.com> wrote:

> 
> On May 10, 2009, at 2:33 PM, djcb.bulk@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

      reply	other threads:[~2009-05-10 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 22:15 Links to tomboy notes in org files Marcelo de Moraes Serpa
2009-05-09  6:59 ` Carsten Dominik
2009-05-10 12:33   ` djcb.bulk
2009-05-10 12:53     ` Carsten Dominik
2009-05-10 17:01       ` Nick Dokos [this message]

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=21519.1241974914@gamaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=carsten.dominik@gmail.com \
    --cc=djcb@djcbsoftware.nl \
    --cc=emacs-orgmode@gnu.org \
    /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).