From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: How to set org-make-link-description-function Date: Thu, 12 Apr 2018 21:12:28 -0700 Message-ID: <87bmenu4lv.fsf@ericabrahamsen.net> References: <87bmeo53ji.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6q7F-0000rC-T8 for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 00:15:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6q7C-0002De-PT for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 00:15:13 -0400 Received: from [195.159.176.226] (port=35015 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6q7C-0002Cq-HB for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 00:15:10 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1f6q52-0002sJ-L1 for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 06:12:56 +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: > I don't know how to do that either. It does seem like you can set it globally. You can try something > like: > > #+BEGIN_SRC emacs-lisp > (setq org-make-link-description-function > (lambda (link desc) > (cond > ((s-starts-with? "ebdb:uuid/" link) > (replace-regexp-in-string "ebdb:uuid/" "" link)) > (t > desc)))) > #+END_SRC > > It doesn't seem too ideal, as it seems like something that should get > set in the link parameters Right, setting it globally doesn't seem feasible at all, it would just be clobbering left and right...