From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: org-exp-bibtex missing in git? Date: Thu, 07 Mar 2013 14:13:27 +0100 Message-ID: <87boavcpzc.fsf@gmail.com> References: <20130303070635.GA12112@panahar> <87fw0cg42y.fsf@allisson.co> <87vc98be83.fsf@bzg.ath.cx> <87ehfwwgdd.fsf@gmail.com> <87ppzg2r05.fsf@med.uni-goettingen.de> <87ppzgusem.fsf@gmail.com> <87ppzcfy2e.fsf@med.uni-goettingen.de> <87lia0s7wi.fsf@bzg.ath.cx> <876213lqfk.fsf@gmail.com> <87wqtjo6h6.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDadl-0000bP-CP for emacs-orgmode@gnu.org; Thu, 07 Mar 2013 08:13:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDadg-0000pP-Cx for emacs-orgmode@gnu.org; Thu, 07 Mar 2013 08:13:45 -0500 Received: from mail-wg0-f48.google.com ([74.125.82.48]:54180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDadg-0000pE-4X for emacs-orgmode@gnu.org; Thu, 07 Mar 2013 08:13:40 -0500 Received: by mail-wg0-f48.google.com with SMTP id 16so796264wgi.27 for ; Thu, 07 Mar 2013 05:13:39 -0800 (PST) In-Reply-To: <87wqtjo6h6.fsf@bzg.ath.cx> (Bastien's message of "Thu, 07 Mar 2013 11:21:41 +0100") 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: Bastien Cc: aaronecay@gmail.com, Andreas Leha , emacs-orgmode@gnu.org Bastien writes: > Hi Aaron, > > I now see where you and Eric go and this is good! > > Here is a revised suggestion, allowing to add link types from withing > the #+LINK keyword. > > 1. Allow more syntax for #+LINK: > > #+LINK: bib;%s;%s file:my.bib::%s org-bib-follow-link org-bib-export-link > > If `org-bib-follow-link' is nil, it'll follow [[bib:my.bib::key][key]] > like it does right now, jumping to the "key" line in the my.bib file. > > If `org-bib-follow-link' is non-nil, it will operate on > [[bib:my.bib::key;prenote;postnote][key]] and find the correct key. > > If `org-bib-export-link' is non-nil, it will operate on > [[bib:my.bib::key;prenote;postnote][key]] and export it correctly > depending on the backend. > > The change required for the exporter is to let `org-bib-follow-link' > and `org-bib-export-link' operate on [[bib::my.bib::key;prenote;postnote]], > not on the expanded link. IOW, link expansion should happen within > the backend export routines, treating abbreviated links with formatting > strings (aka "bib;%s;%s") in a special way. > > I see two advantages: > > - adding new types will be easier -- e.g.: > #+LINK: cite file:my.bib::%s org-bib-follow-link org-bib-export-link > > - users can decide what syntactic glue they want to their abbreviated > links (using ";" or another separator). > > Nicolas, do you think it is feasible/good to delay link expansion > till the backend knows whether the abbreviated link is associated > to follow/export function that would understand formatting strings > in the abbreviated form? I think that if we ever implement a bibliography/citations handlers, they should be first class objects in Org syntax (like footnotes). Overloading link syntax would, IMO, be wrong in that case. Also, link abbrevs and link protocol handlers are meant for the end-user, not for official syntax. I suggest to avoid using link syntax for citations altogether, but if we do, the citation must not depend on an user-defined function. The whole syntax must be attached to the link. Therefore, I agree that link syntax needs to be extended. I'm thinking in particular about per-link export properties. Adding in separator in the path part is an interesting idea, as long as it isn't a string widely used in paths. In a nutshell, my POV is: - we should avoid overloading #+LINK syntax and overusing link-abbrevs. - citations, if implemented globally, deserve their own syntax. - changing the general link type to: [[PROTOCOL:PATH/SEP/OPTIONS][DESCRIPTION]] is fine. Regards, -- Nicolas Goaziou