From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Customizable link types Date: Tue, 26 Sep 2006 07:48:18 +0200 Message-ID: <71e2e5b4f2a0542057fc5f03e8781c5d@science.uva.nl> References: Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GS6ht-0003iW-Kn for emacs-orgmode@gnu.org; Tue, 26 Sep 2006 02:46:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GS6hs-0003hy-2P for emacs-orgmode@gnu.org; Tue, 26 Sep 2006 02:46:17 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GS6hr-0003ho-R1 for emacs-orgmode@gnu.org; Tue, 26 Sep 2006 02:46:15 -0400 Received: from [146.50.4.51] (helo=imap.science.uva.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GS6mR-0007Vy-A0 for emacs-orgmode@gnu.org; Tue, 26 Sep 2006 02:50:59 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dale Smith Cc: emacs-orgmode@gnu.org 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 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