From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stephen J. Barr" Subject: hook on link creation Date: Thu, 6 Aug 2015 17:10:01 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113495b207fb36051cad7575 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNVEg-0000oS-Mz for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 20:10:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNVEc-0002sh-ND for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 20:10:10 -0400 Received: from mail-la0-f45.google.com ([209.85.215.45]:36449) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNVEc-0002kr-Gs for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 20:10:06 -0400 Received: by lagz9 with SMTP id z9so13040153lag.3 for ; Thu, 06 Aug 2015 17:10:02 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a113495b207fb36051cad7575 Content-Type: text/plain; charset=UTF-8 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 --001a113495b207fb36051cad7575 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Greetings,

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


I am wondering if there is a way to have a hook t= hat 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 someth= ing like that.

Is there existing infrastructure fo= r this? Is this the right approach?

Thanks,
<= div>Stephen


Stephen J. Barr
PhD Student, Oper= ations Management
Dept: = Information Systems and Operations Management (ISOM)
Michael G. Foster School of Busines= s
University of Washington
Phone: =C2=A0425 516 5012
<= font size=3D"1">Email: = stevejb@uw.edu
Twitter: @stevejb

=
--001a113495b207fb36051cad7575-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: hook on link creation Date: Thu, 6 Aug 2015 21:05:23 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113ce90c0c1665051cae3baa Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNW6M-00015P-I4 for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 21:05:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNW6L-00020J-3X for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 21:05:38 -0400 Received: from mail-oi0-x233.google.com ([2607:f8b0:4003:c06::233]:36608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNW6K-0001xW-J5 for emacs-orgmode@gnu.org; Thu, 06 Aug 2015 21:05:36 -0400 Received: by oiev193 with SMTP id v193so18189266oie.3 for ; Thu, 06 Aug 2015 18:05:24 -0700 (PDT) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Stephen J. Barr" Cc: "emacs-orgmode@gnu.org" --001a113ce90c0c1665051cae3baa Content-Type: text/plain; charset=UTF-8 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 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 --001a113ce90c0c1665051cae3baa Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable What is the dbus=C2=A0thing supposed to do? Would it be ok if it happened m= ore than once? Why is it important it happen on creation of the link? Any c= onsequence 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.=C2=A0

On Thursday, A= ugust 6, 2015, Stephen J. Barr <stevej= b@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:


--
Jo= hn

-----------------------------------
Professor John Kitchin=C2= =A0
Doherty Hall A207F
Department of Chemical Engineering
Carnegie= Mellon University
Pittsburgh, PA 15213
412-268-7803
=
--001a113ce90c0c1665051cae3baa-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: hook on link creation Date: Fri, 07 Aug 2015 09:56:35 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNi8b-0007wa-DK for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 09:56:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZNi8Y-0005g9-6S for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 09:56:45 -0400 Received: from mail-qg0-x22e.google.com ([2607:f8b0:400d:c04::22e]:33703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZNi8Y-0005g4-3E for emacs-orgmode@gnu.org; Fri, 07 Aug 2015 09:56:42 -0400 Received: by qged69 with SMTP id d69so74980572qge.0 for ; Fri, 07 Aug 2015 06:56:41 -0700 (PDT) In-reply-to: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org 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 > 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 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