From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: links-9.0 v3 Date: Mon, 18 Jul 2016 18:05:49 +0200 Message-ID: <87lh0zexsy.fsf@saiph.selenimh> References: <87oa6afmeu.fsf@saiph.selenimh> <87k2gxg8qm.fsf@saiph.selenimh> <8737nlfqdv.fsf@saiph.selenimh> <87y45bvm12.fsf@saiph.selenimh> <8737n7go9k.fsf@saiph.selenimh> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPB3K-0004yf-Mc for emacs-orgmode@gnu.org; Mon, 18 Jul 2016 12:05:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPB3I-0005UW-Af for emacs-orgmode@gnu.org; Mon, 18 Jul 2016 12:05:53 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:51195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPB3I-0005U9-0h for emacs-orgmode@gnu.org; Mon, 18 Jul 2016 12:05:52 -0400 In-Reply-To: (John Kitchin's message of "Mon, 18 Jul 2016 11:20:30 -0400") 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: John Kitchin Cc: "emacs-orgmode@gnu.org" John Kitchin writes: > I am not sure what you mean for this. Let me know if it isn't fixed in > the attached patches. I thought I had squashed everything into a concise > history. No worries. Let's just apply the 21 patches. > I think this code below (which should be in the patches) handles the > option correctly. > > (defun org--open-file-link (path app) It should, but I didn't see it in the previous patch, hence my remark. > -(defvar org-store-link-functions nil > - "List of functions that are called to create and store a link. > Each function will be called in turn until one returns a non-nil > -value. Each function should check if it is responsible for creating > -this link (for example by looking at the major mode). > -If not, it must exit and return nil. > -If yes, it should return a non-nil value after a calling > -`org-store-link-props' with a list of properties and values. > -Special properties are: > +value. Each function should check if it is responsible for > +creating this link (for example by looking at the major mode). If > +not, it must exit and return nil. If yes, it should return a > +non-nil value after a calling `org-store-link-props' with a list > +of properties and values. Special properties are: Missing a space after the full stop above. > +(defun org--open-file-link (path app) > + "Open PATH using APP. > + > +PATH is from a file link, and can have the following syntax: > + [[file:~/code/main.c::255]] > + [[file:~/xx.org::My Target]] > + [[file:~/xx.org::*My Target]] > + [[file:~/xx.org::#my-custom-id]] > + [[file:~/xx.org::/regexp/]] > + > +APP is '(4) to open the PATH in Emacs, or 'system to use a system > application." Maybe something like: Called it with \\[universal-argument] to open PATH in Emacs. If ARG is `system', use a system application instead. Regards,