From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: Citation syntax: a revised proposal Date: Mon, 02 Mar 2015 23:33:20 +0100 Message-ID: <87twy3qbbj.fsf@gmx.us> References: <87k2zjnc0e.fsf@berkeley.edu> <87bnkvm8la.fsf@berkeley.edu> <87zj8co3se.fsf@berkeley.edu> <87ioezooi2.fsf@berkeley.edu> <87mw4bpaiu.fsf@nicolasgoaziou.fr> <8761aznpiq.fsf@berkeley.edu> <87twyjnh0r.fsf@nicolasgoaziou.fr> <87oaopx24e.fsf@berkeley.edu> <87k2zd4f3w.fsf@nicolasgoaziou.fr> <87egpkv8g9.fsf@berkeley.edu> <877fv6xfaq.fsf@gmail.com> <87twya2ak0.fsf@berkeley.edu> <87zj81aa97.fsf@nicolasgoaziou.fr> <87ioep2r6p.fsf@berkeley.edu> <87y4ngbgm7.fsf@nicolasgoaziou.fr> <87twy39qt2.fsf@berkeley.edu> <87pp8rb1i3.fsf@nicolasgoaziou.fr> <87bnkbrver.fsf@gmx.us> <87h9u3avtu.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYu3-0001bT-MO for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 17:33:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YSYu0-00024D-8W for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 17:33:31 -0500 Received: from plane.gmane.org ([80.91.229.3]:60691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YSYu0-000243-23 for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 17:33:28 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YSYty-0005F6-Lk for emacs-orgmode@gnu.org; Mon, 02 Mar 2015 23:33:26 +0100 Received: from 46.166.188.200 ([46.166.188.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Mar 2015 23:33:26 +0100 Received: from rasmus by 46.166.188.200 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 02 Mar 2015 23:33:26 +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: emacs-orgmode@gnu.org Nicolas Goaziou writes: > However mixing `citations' and `citation' is confusing. I'd rather keep > the outer one as `citation'. What could go inside? Maybe `cite'? Perhaps the difference is too subtle. Note that you would never deal with a `citation' other than through a mapping. > Moreover, > > [cite:@key] > > will be parsed as > > [citation (:begin n :end N > :whatever '((whatever (:key key :begin n1 :end N1 :prefix pre1))))] > > Is that correct? Yeah, exactly. So the format would be a map over the list of whatevers in ox. >> This makes it naturally to operate over one many citations. I don't know >> if this should be some sort of pseudo-object or what. Also, one issue I >> ran into when trying to get [@k1; @k2] working was that @k2 is recognized >> as an inline citation (which means that I probably did something >> wrong)... > > [@k1; @k2] ? > > This is unspecified. [@k1] is a shortcut for [(cite):@k1], nothing more. > Anything more complicated should go in a [cite:...] object. Right, I was trying *to add* support for [@k1; ⋯;@kN]. One issue doing this was that the regexp for inline citations also captured @k2 in [@k1; @k2], but it's cause I did a mistake. >> Of course, a quasi-tricky part (I think) is that [cite: pre @key post] >> should be (with no "global" :prefix and :suffix): >> >> (citations (:begin n :end N >> :citations >> '((citation (:key key :begin n1 :end N1 :prefix pre :suffix post))))) >> >> Which imply that citations are parsed from "the middle" and outwards. > > I don't see any ambiguity here, since semi colons are forbidden in PRE > and POST. I was talking about paring [cite: pre @k post] as (citation (:begin n :end N :cites '((cite (:key key :begin n1 :end N1 :prefix pre :suffix post))))) And not: (citation (:begin n :end N :prefix pre :suffix post :cites '((cite (:key key :begin n1 :end N1))))) Perhaps I'm worrying about things that need not be worried about. —Rasmus -- This message is brought to you by the department of redundant departments