emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* hook on link creation
@ 2015-08-07  0:10 Stephen J. Barr
  2015-08-07  1:05 ` John Kitchin
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen J. Barr @ 2015-08-07  0:10 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 813 bytes --]

Greetings,

I have been thinking about a project I would like to do to add some custom
semantic markup to an org-mode. I think that links may be the best way to
do this. Looking at this page:

http://orgmode.org/manual/Adding-hyperlink-types.html

I am wondering if there is a way to have a hook that gets called on link
creation. E.g., if I type stevejb:my_word. I would like to immediately have
"stevejb:my_word" sent on dbus or something like that.

Is there existing infrastructure for this? Is this the right approach?

Thanks,
Stephen


Stephen J. Barr
PhD Student, Operations Management
Dept: Information Systems and Operations Management (ISOM)
Michael G. Foster School of Business
University of Washington
Phone:  425 516 5012
Email: stevejb@uw.edu
Twitter: @stevejb
Website: http://steve.planetbarr.com

[-- Attachment #2: Type: text/html, Size: 1713 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hook on link creation
  2015-08-07  0:10 hook on link creation Stephen J. Barr
@ 2015-08-07  1:05 ` John Kitchin
       [not found]   ` <CAO1hKsssL_3hrrZ6bNiw_HXxDFEvQks0ho+KZje5p13q_CKZKA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: John Kitchin @ 2015-08-07  1:05 UTC (permalink / raw)
  To: Stephen J. Barr; +Cc: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 1528 bytes --]

What is the dbus thing supposed to do? Would it be ok if it happened more
than once? Why is it important it happen on creation of the link? Any
consequence of a typo? What should happen when you edit a link?

I am not aware of a link creation hook. They are recognized through font
lock by a regular expression.

On Thursday, August 6, 2015, Stephen J. Barr <stevejb@uw.edu> wrote:

> Greetings,
>
> I have been thinking about a project I would like to do to add some custom
> semantic markup to an org-mode. I think that links may be the best way to
> do this. Looking at this page:
>
> http://orgmode.org/manual/Adding-hyperlink-types.html
>
> I am wondering if there is a way to have a hook that gets called on link
> creation. E.g., if I type stevejb:my_word. I would like to immediately have
> "stevejb:my_word" sent on dbus or something like that.
>
> Is there existing infrastructure for this? Is this the right approach?
>
> Thanks,
> Stephen
>
>
> Stephen J. Barr
> PhD Student, Operations Management
> Dept: Information Systems and Operations Management (ISOM)
> Michael G. Foster School of Business
> University of Washington
> Phone:  425 516 5012
> Email: stevejb@uw.edu <javascript:_e(%7B%7D,'cvml','stevejb@uw.edu');>
> Twitter: @stevejb
> Website: http://steve.planetbarr.com
>
>

-- 
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

[-- Attachment #2: Type: text/html, Size: 2719 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: hook on link creation
       [not found]   ` <CAO1hKsssL_3hrrZ6bNiw_HXxDFEvQks0ho+KZje5p13q_CKZKA@mail.gmail.com>
@ 2015-08-07 13:56     ` John Kitchin
  0 siblings, 0 replies; 3+ messages in thread
From: John Kitchin @ 2015-08-07 13:56 UTC (permalink / raw)
  To: Stephen J. Barr, Org Mode

you could do something like this:
http://kitchingroup.cheme.cmu.edu/blog/2015/07/09/Acronym-minor-mode-for-Emacs/
or this

http://kitchingroup.cheme.cmu.edu/blog/2015/06/22/Clickable-org-contacts-in-text-files/

with tooltips. It isn't clear to me why you would want it to appear when
you type it. You could as well run a M-x command and enter it. It seems
more clear to me you would want emacs to recognize it later and give you
easy access to the information related to it.

see also my org-ref package, where we do this for citations:
http://kitchingroup.cheme.cmu.edu/blog/2015/03/16/Update-on-org-ref-it-is-now-all-emacs-lisp/


Maybe some of these videos would give you some other ideas:
https://www.youtube.com/watch?v=sjxS9m8QCoo functional chemical formulas
in emacs

https://www.youtube.com/watch?v=Ogavyl_QXiU clickable text

https://www.youtube.com/watch?v=8cEb6F9AEu0  (org-ref + helm)

https://www.youtube.com/watch?v=Zya8SfmCtFA (older version of org-ref)



Stephen J. Barr writes:

> Hi John,
>
> First, thanks for org-ref. I really appreciate it.
>
> My idea was that I could define a link type like person:john_doe and have a
> separate program listening on dbus and when it receives "person:john_doe"
> to display relevant information on my second screen.
>
>
> I suppose I could create a link and immediately use it, and it seems clear
> that I could define a function on link usage.
>
>
>
>
> Stephen J. Barr
> PhD Student, Operations Management
> Dept: Information Systems and Operations Management (ISOM)
> Michael G. Foster School of Business
> University of Washington
> Phone:  425 516 5012
> Email: stevejb@uw.edu
> Twitter: @stevejb
> Website: http://steve.planetbarr.com
>
>
> On Thu, Aug 6, 2015 at 6:05 PM, John Kitchin <jkitchin@andrew.cmu.edu>
> wrote:
>
>> What is the dbus thing supposed to do? Would it be ok if it happened more
>> than once? Why is it important it happen on creation of the link? Any
>> consequence of a typo? What should happen when you edit a link?
>>
>> I am not aware of a link creation hook. They are recognized through font
>> lock by a regular expression.
>>
>>
>> On Thursday, August 6, 2015, Stephen J. Barr <stevejb@uw.edu> wrote:
>>
>>> Greetings,
>>>
>>> I have been thinking about a project I would like to do to add some
>>> custom semantic markup to an org-mode. I think that links may be the best
>>> way to do this. Looking at this page:
>>>
>>> http://orgmode.org/manual/Adding-hyperlink-types.html
>>>
>>> I am wondering if there is a way to have a hook that gets called on link
>>> creation. E.g., if I type stevejb:my_word. I would like to immediately have
>>> "stevejb:my_word" sent on dbus or something like that.
>>>
>>> Is there existing infrastructure for this? Is this the right approach?
>>>
>>> Thanks,
>>> Stephen
>>>
>>>
>>> Stephen J. Barr
>>> PhD Student, Operations Management
>>> Dept: Information Systems and Operations Management (ISOM)
>>> Michael G. Foster School of Business
>>> University of Washington
>>> Phone:  425 516 5012
>>> Email: stevejb@uw.edu
>>> Twitter: @stevejb
>>> Website: http://steve.planetbarr.com
>>>
>>>
>>
>> --
>> 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
>>
>>
>>

--
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-08-07 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-07  0:10 hook on link creation Stephen J. Barr
2015-08-07  1:05 ` John Kitchin
     [not found]   ` <CAO1hKsssL_3hrrZ6bNiw_HXxDFEvQks0ho+KZje5p13q_CKZKA@mail.gmail.com>
2015-08-07 13:56     ` John Kitchin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).