From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: How to set org-make-link-description-function Date: Fri, 13 Apr 2018 04:39:44 +0000 Message-ID: References: <87bmeo53ji.fsf@ericabrahamsen.net> <87bmenu4lv.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="089e08233fe8c5b5660569b3761f" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f6qVC-0001aV-Re for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 00:39:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f6qVB-000871-ME for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 00:39:58 -0400 Received: from mail-wr0-x22f.google.com ([2a00:1450:400c:c0c::22f]:46130) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f6qVB-00086O-Fg for emacs-orgmode@gnu.org; Fri, 13 Apr 2018 00:39:57 -0400 Received: by mail-wr0-x22f.google.com with SMTP id d1so6995749wrj.13 for ; Thu, 12 Apr 2018 21:39:57 -0700 (PDT) In-Reply-To: <87bmenu4lv.fsf@ericabrahamsen.net> 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: Eric Abrahamsen Cc: emacs-orgmode@gnu.org --089e08233fe8c5b5660569b3761f Content-Type: text/plain; charset="UTF-8" Not with the way I wrote it. It should only affect your links and pass everything else through I think. On Thu, Apr 12, 2018 at 9:15 PM Eric Abrahamsen wrote: > 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... > > > -- John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu --089e08233fe8c5b5660569b3761f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Not with the way I wrote it. It should only affect y= our links and pass everything else through I think.

On Thu, Apr 12, 2018 at 9:15 PM Eric Abrahamsen <eric@ericabrahamsen.net> wrote= :
John Kitchin <jkitchin@andrew.cmu.edu>= ; 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
>=C2=A0 =C2=A0 =C2=A0 =C2=A0(lambda (link desc)
> (cond
> ((s-starts-with? "ebdb:uuid/" link)
>=C2=A0 =C2=A0(replace-regexp-in-string "ebdb:uuid/" "&qu= ot; link))
> (t
>=C2=A0 =C2=A0desc))))
> #+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<= br> be clobbering left and right...


--
J= ohn

-----------------------------------
Professor John Kitchin=C2= =A0
Doherty Hall A207F
Department of Chemical Engineering
Carnegie= Mellon University
Pittsburgh, PA 15213
412-268-7803
=
--089e08233fe8c5b5660569b3761f--