From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: How to set org-make-link-description-function Date: Fri, 13 Apr 2018 16:58:19 -0700 Message-ID: <87o9imr750.fsf@ericabrahamsen.net> References: <87bmeo53ji.fsf@ericabrahamsen.net> <87bmenu4lv.fsf@ericabrahamsen.net> <877epbt3yv.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f78aO-00065b-7E for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 19:58:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f78aJ-0006aO-D8 for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 19:58:32 -0400 Received: from [195.159.176.226] (port=43155 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f78aJ-0006Zb-6q for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 19:58:27 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f78YA-0000Od-Ho for emacs-orgmode@gnu.org; Sat, 14 Apr 2018 01:56:14 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org John Kitchin writes: > Here is a globally defined version that would let you define a function for any other kind of link I think. There are probably many > variations on this theme, like storing functions in some variable as an alist, etc. Something like that is what would happen if this was > defined in the link parameters. I do think putting this in the link parameters is the way to go. I'm impressed you got a working solution together so quickly, but that's way more than package authors should have to deal with! Actually, it could be something as simple as: if the :complete function returns a cons cell, use the `car' as the link and the `cdr' as the description default. Surely that would be enough? Eric