From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Feature request: custom link handlers Date: Fri, 30 Nov 2007 12:46:57 +0000 Message-ID: <87wsrzkiim.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iy5Gs-0004H5-I1 for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 07:47:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iy5Gq-0004G9-BY for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 07:47:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iy5Gq-0004G6-50 for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 07:47:04 -0500 Received: from ug-out-1314.google.com ([66.249.92.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Iy5Gp-0007jm-K0 for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 07:47:03 -0500 Received: by ug-out-1314.google.com with SMTP id a2so2120185ugf for ; Fri, 30 Nov 2007 04:47:02 -0800 (PST) In-Reply-To: (Tom Weissmann's message of "Fri, 30 Nov 2007 10:25:38 +0000 (UTC)") 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: emacs-orgmode@gnu.org Tom Weissmann writes: > This is basically a request to be able to create custom link handlers. > > For example, my `org-link-abbrev-alist' is this: > > `(("wiki" . org-link-abbrev-wiki) > ("bmk" . org-link-abbrev-bookmark) > ("POA" . org-link-abbrev-poa)) > > > Only one of these actually returns a link that Org mode can use: wiki returns a > url. "bmk" opens a bookmark and "POA" opens another application; neither return > anything, so using them raises an error message. I'm not sure to understand. For now `org-link-abbrev-alist' looks like: '(("google" . "http://www.google.com/search?q=%s")) where the cdr of each cell is a formatting string in which %s stand for the text after "::" (or ":"). So for example : [[google::orgmode]] is the abbreviated form of [[http://www.google.com/search?q=orgmode]] Are you suggesting to replace "http://www.google.com/search?q=%s" by a function that would handle the text after "::" in a different way than `format' is currently doing? I think a step by step example would be useful here. -- Bastien