[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-link interface
From: |
John Kitchin |
Subject: |
Re: [O] org-link interface |
Date: |
Thu, 13 Oct 2016 14:02:51 -0400 |
User-agent: |
mu4e 0.9.16; emacs 25.1.50.1 |
I do not know if you can do that. I would do something like this.
(defun insert-foo-link (path)
(interactive "sfoo path: ")
(insert (format "[[foo:%s][%s]]" path path)))
Daniele Nicolodi writes:
> On 10/13/16 8:14 AM, John Kitchin wrote:
>> In org8, this is not that easy to do, but not impossible.
>>
>> Why do not you want to use [[foo:bar][bar]]?
>
> Hi John,
>
> I'm fine using [[foo:bar][bar]], but it is much longer to type.
>
> Slightly changing my question: there is a way to instruct
> org-insert-link to derive a default value for the description from the
> path? I had a look at the code, and it does not seem so.
>
> Thanks!
>
> Cheers,
> Daniele
>
>
>> Daniele Nicolodi writes:
>>
>>> Hello,
>>>
>>> I would like to add a new link type to org-mode. Following the example
>>> in the manual it is a very easy task. However I would like to customize
>>> how the link is visualized, specifically I would like a link like
>>> "[[foo:bar]]" to be visualized simply as "bar" where the protocol type
>>> has been hidden (same effect I would obtain with a link in the form
>>> "[[foo:bar][bar]]".
>>>
>>> Is it possible to hook somehow into org-mode to have that transformation
>>> done, or there is an easy way to accomplish that?
>>>
>>> Thank you!
>>>
>>> Cheers,
>>> Daniele
>>
>>
--
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