From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Multicite syntax Date: Sun, 08 Mar 2015 17:28:28 +0100 Message-ID: <8761ab5u8j.fsf@nicolasgoaziou.fr> References: <54FBEC42.2060507@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUe2y-0006As-5q for emacs-orgmode@gnu.org; Sun, 08 Mar 2015 12:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUe2v-0008Pn-0T for emacs-orgmode@gnu.org; Sun, 08 Mar 2015 12:27:20 -0400 Received: from relay6-d.mail.gandi.net ([2001:4b98:c:538::198]:51180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUe2u-0008PV-RV for emacs-orgmode@gnu.org; Sun, 08 Mar 2015 12:27:16 -0400 In-Reply-To: <54FBEC42.2060507@gmail.com> (Vaidheeswaran C.'s message of "Sun, 08 Mar 2015 11:59:22 +0530") 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: Vaidheeswaran C Cc: emacs-orgmode@gnu.org Vaidheeswaran C writes: >> Note that, as a consequence, the new object is incompatible with the >> previous one, since every citation is a multi-cite citation. See >> commit message for details. > > Just a quick feedback. > > (:parenthetical nil :begin 807 :post-blank 0 :end 843 :references > ((:key "wilde" :prefix nil :suffix nil) > (:key "moore" :prefix nil :suffix nil) > (:key "westfahl:space" :prefix nil :suffix nil)) > :parent #3#) > > Having a plist for `reference' as opposed to a an Element proper gives > me cognitive dissonance. > > How about replacing this > > (:key "wilde" :prefix nil :suffix nil) > > with this instead > > (reference :key "wilde" :prefix nil :suffix nil :parent ) > ^^^^^^^^ ^^^^^^ Agreed. I introduced yet another syntax change in "wip-cite" branch. Now there are two separate objects "citation" and "citation-reference". So the following multicite [cite:prefix; pre @a post; @b] is parsed like (citation (:prefix "prefix" :parenthetical nil) (citation-reference (:key "a" :prefix "pre" :suffix "post")) (citation-reference (:key "b"))) The annoying thing is about bare-keys. When on a bare @key, `org-element-context' cannot grap the citation, only the reference. I don't think it is an issue for now. Regards, -- Nicolas Goaziou