From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Weissmann Subject: Re: Feature request: custom link handlers Date: Fri, 30 Nov 2007 13:50:55 +0000 (UTC) Message-ID: References: <87wsrzkiim.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Iy6Gx-0002iF-Mr for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 08:51:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Iy6Gv-0002hm-FQ for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 08:51:14 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Iy6Gv-0002hh-7W for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 08:51:13 -0500 Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Iy6Gt-0003YV-Uz for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 08:51:12 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Iy6Gp-0003YI-NU for emacs-orgmode@gnu.org; Fri, 30 Nov 2007 13:51:07 +0000 Received: from mail2.siscog.pt ([195.22.30.41]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Nov 2007 13:51:07 +0000 Received: from trmsw by mail2.siscog.pt with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 30 Nov 2007 13:51:07 +0000 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 Bastien altern.org> writes: > 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? No. Here's an example. I sometimes create links to Emacs bookmarks, eg "bmk:org-mode-tweaks" The bmk abbreviation is expanded to a link Org mode understands, by this function: (defun org-link-abbrev-bookmark (bookmark) "Opens a bookmark in another window" (bookmark-jump-other-window bookmark)) - which happens to return nil, NOT a link that Org mode understands, so even though it opens the bookmark I still get an error - essentially because I'm using a function that expands an abbreviation simply for its side effects. If possible I would like Org mode to display a message like "Opening bookmark org-mode-tweaks" instead of "if: Wrong type argument: stringp, nil", which is why I suggested the multiple return value. On the other hand I could return an elisp link and set `org-confirm-elisp-link-function' to nil, to avoid having to confirm every time I clicked one of these links --- The other suggestion I realise doesn't make sense because when you create a link with C-c C-l, the only minibuffer completion is of the link type (file, new, mailto, etc.), not what follows. It would be very cool to do C-c C-l, entry "bmk:" as the bookmark type, and then have minibuffer completion of all the existing bookmarks, but `org-store-link' works fine :)