emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] How to set org-make-link-description-function


From: John Kitchin
Subject: Re: [O] How to set org-make-link-description-function
Date: Fri, 13 Apr 2018 04:39:44 +0000

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 <address@hidden> wrote:
John Kitchin <address@hidden> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]