emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Customizable link types
@ 2006-09-22 21:57 Dale Smith
  2006-09-25  7:01 ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Dale Smith @ 2006-09-22 21:57 UTC (permalink / raw)
  To: emacs-orgmode

I've been trying out org-mode instead of planner-el for a few weeks now.  I like
it.  However, there are a few things I miss.  One is how easy it was to ad my own
hyperlink types.  This was all I needed to add Bugzilla::<number> links:

(setq muse-wiki-interwiki-alist
      '(("Bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=")))

So what do you think about some way of adding customizable hyperlinks?

-Dale

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Customizable link types
  2006-09-22 21:57 Customizable link types Dale Smith
@ 2006-09-25  7:01 ` Carsten Dominik
  2006-09-25 17:55   ` Dale Smith
  0 siblings, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2006-09-25  7:01 UTC (permalink / raw)
  To: Dale Smith; +Cc: emacs-orgmode

I am not using planner.el, so I can only guess how this feature is 
supposed to work.  Would you care to expand?

- Carsten

On Sep 22, 2006, at 23:57, Dale Smith wrote:

> I've been trying out org-mode instead of planner-el for a few weeks 
> now.  I like
> it.  However, there are a few things I miss.  One is how easy it was 
> to ad my own
> hyperlink types.  This was all I needed to add Bugzilla::<number> 
> links:
>
> (setq muse-wiki-interwiki-alist
>       '(("Bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=")))
>
> So what do you think about some way of adding customizable hyperlinks?
>
> -Dale
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Customizable link types
  2006-09-25  7:01 ` Carsten Dominik
@ 2006-09-25 17:55   ` Dale Smith
  2006-09-25 18:29     ` Dale Smith
  2006-09-25 18:48     ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Dale Smith @ 2006-09-25 17:55 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <dominik@science.uva.nl> writes:

> I am not using planner.el, so I can only guess how this feature is
> supposed to work.  Would you care to expand?

Sure.  I'm acually abusing interwiki links.  In my planner files, I
can quicky use "Bugzilla::1234" as a link to bug number 1234.  Planner
sees that as an interwiki link (the ::) .  Pressing return over the
link while in planner or following the link in the published html
actually goes to http://10.1.2.9/bugzilla/show_bug.cgi?id=1234

I *could* use something like
[[http://10.1.2.9/bugzilla/show_bug.cgi?id=1234][Bug# 1234]], but
that's a lot to type in.  Hmm.  It wouldn't be too hard to whip up
some elist that generates a link like that.

What I'm really asking is a way to extend the current list of link
types (gnus:, file:, vm:, etc.) with some user-defined types.


> On Sep 22, 2006, at 23:57, Dale Smith wrote:
>
>> I've been trying out org-mode instead of planner-el for a few weeks
>> now.  I like it.  However, there are a few things I miss.  One is
>> how easy it was to ad my own hyperlink types.  This was all I
>> needed to add Bugzilla::<number> links:
>>
>> (setq muse-wiki-interwiki-alist
>>       '(("Bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=")))

-Dale

-- 
Dale P. Smith
dales@vxitech.com
216-447-4059
216-447-8951 FAX

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Customizable link types
  2006-09-25 17:55   ` Dale Smith
@ 2006-09-25 18:29     ` Dale Smith
  2006-09-26  5:48       ` Carsten Dominik
  2006-09-25 18:48     ` Carsten Dominik
  1 sibling, 1 reply; 6+ messages in thread
From: Dale Smith @ 2006-09-25 18:29 UTC (permalink / raw)
  To: emacs-orgmode

Dale Smith <dales@vxitech.com> writes:

> What I'm really asking is a way to extend the current list of link
> types (gnus:, file:, vm:, etc.) with some user-defined types.

How about an alist of (type . replacement), with string as simple
string replacement, and maybe a function to call for a more complicated
transformation?

(defun bar-converter (arg)
  (concat "http://some.site/" arg "/?key=yadda"))

(setq org-userlink-alist
      '((foo . "http://some.foo.org/")
        (bar . bar-converter)))

So then links like:
  foo:something -> http://some.foo.org/something.
  bar:123  ->  http://some.site/123/?key=yadda

Just and idea..

  -Dale

-- 
Dale P. Smith
dales@vxitech.com
216-447-4059
216-447-8951 FAX

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Customizable link types
  2006-09-25 17:55   ` Dale Smith
  2006-09-25 18:29     ` Dale Smith
@ 2006-09-25 18:48     ` Carsten Dominik
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2006-09-25 18:48 UTC (permalink / raw)
  To: emacs-orgmode

Hi Dale,

thanks for the extra information.

Seems to me that there are really two issues here.  One is the idea you 
point out with the bugzilla example.  I would like to call this "link 
abbreviations".  I like the idea and think it could be used in many 
ways.  It might also be useful to allow
setting such abbreviations on a per-file base with lines like

#+LINKABBREV: Bugzilla "http://10.1.2.9/bugzilla/show_bug.cgi?id="


The second issue you are mentioning is an extensible link system like 
muse has it,
where new link types like gnus, vm and other can be defined and hooked 
into the the system.  The muse system is of an admirable generality, 
but so far I have chosen not to follow the same road, because (at least 
in planner, I don't know about muse itself) the generality forces you 
to put a long list of require statements into .emacs before the system 
will function properly even for the standard cases most people need.  A 
system which just has all important types built-in and active seems 
more user-frienly (though less hacker-friendly) to me.

- Carsten

On Sep 25, 2006, at 19:55, Dale Smith wrote:

> Carsten Dominik <dominik@science.uva.nl> writes:
>
>> I am not using planner.el, so I can only guess how this feature is
>> supposed to work.  Would you care to expand?
>
> Sure.  I'm acually abusing interwiki links.  In my planner files, I
> can quicky use "Bugzilla::1234" as a link to bug number 1234.  Planner
> sees that as an interwiki link (the ::) .  Pressing return over the
> link while in planner or following the link in the published html
> actually goes to http://10.1.2.9/bugzilla/show_bug.cgi?id=1234
>
> I *could* use something like
> [[http://10.1.2.9/bugzilla/show_bug.cgi?id=1234][Bug# 1234]], but
> that's a lot to type in.  Hmm.  It wouldn't be too hard to whip up
> some elist that generates a link like that.
>
> What I'm really asking is a way to extend the current list of link
> types (gnus:, file:, vm:, etc.) with some user-defined types.
>
>
>> On Sep 22, 2006, at 23:57, Dale Smith wrote:
>>
>>> I've been trying out org-mode instead of planner-el for a few weeks
>>> now.  I like it.  However, there are a few things I miss.  One is
>>> how easy it was to ad my own hyperlink types.  This was all I
>>> needed to add Bugzilla::<number> links:
>>>
>>> (setq muse-wiki-interwiki-alist
>>>       '(("Bugzilla" . "http://10.1.2.9/bugzilla/show_bug.cgi?id=")))
>
> -Dale
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Customizable link types
  2006-09-25 18:29     ` Dale Smith
@ 2006-09-26  5:48       ` Carsten Dominik
  0 siblings, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2006-09-26  5:48 UTC (permalink / raw)
  To: Dale Smith; +Cc: emacs-orgmode

Looks good, except that I will also allow printf formats so that your 
bar
example can be written more easily as


(setq org-userlink-alist
   '((foo . "http://some.foo.org/")
     (bar . "http://some.site/%s/?key=yadda")))

Thanks.

- Carsten

On Sep 25, 2006, at 20:29, Dale Smith wrote:

> Dale Smith <dales@vxitech.com> writes:
>
>> What I'm really asking is a way to extend the current list of link
>> types (gnus:, file:, vm:, etc.) with some user-defined types.
>
> How about an alist of (type . replacement), with string as simple
> string replacement, and maybe a function to call for a more complicated
> transformation?
>
> (defun bar-converter (arg)
>   (concat "http://some.site/" arg "/?key=yadda"))
>
> (setq org-userlink-alist
>       '((foo . "http://some.foo.org/")
>         (bar . bar-converter)))
>
> So then links like:
>   foo:something -> http://some.foo.org/something.
>   bar:123  ->  http://some.site/123/?key=yadda
>
> Just and idea..
>
>   -Dale
>
> -- 
> Dale P. Smith
> dales@vxitech.com
> 216-447-4059
> 216-447-8951 FAX
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-26  6:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 21:57 Customizable link types Dale Smith
2006-09-25  7:01 ` Carsten Dominik
2006-09-25 17:55   ` Dale Smith
2006-09-25 18:29     ` Dale Smith
2006-09-26  5:48       ` Carsten Dominik
2006-09-25 18:48     ` Carsten Dominik

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