From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Multicite syntax Date: Sat, 14 Mar 2015 09:17:40 -0700 Message-ID: <8761a37duj.fsf@berkeley.edu> References: <54FBEC42.2060507@gmail.com> <8761ab5u8j.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWolf-0007ub-JR for emacs-orgmode@gnu.org; Sat, 14 Mar 2015 12:18:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWola-000674-JW for emacs-orgmode@gnu.org; Sat, 14 Mar 2015 12:18:27 -0400 Received: from plane.gmane.org ([80.91.229.3]:48266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWola-00066w-Cg for emacs-orgmode@gnu.org; Sat, 14 Mar 2015 12:18:22 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YWolZ-00083K-5k for emacs-orgmode@gnu.org; Sat, 14 Mar 2015 17:18:21 +0100 Received: from c-67-169-117-151.hsd1.ca.comcast.net ([67.169.117.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Mar 2015 17:18:21 +0100 Received: from richard.lawrence by c-67-169-117-151.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 14 Mar 2015 17:18:21 +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 Cc: Nicolas Goaziou Hi Nicolas, Nicolas Goaziou writes: > 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"))) With this change, what's the proper way to get the citation-references inside a citation? Before this change, one could simply do: (org-element-property :references citation) to get the references in a citation; what's the equivalent incantation now? Your example here makes it look like I should be able to do something like: #+BEGIN_SRC elisp (let* ((citation (org-element-context)) (references (remove-if-not (lambda (o) (and (listp o) (eq (car o) 'citation-reference))) citation))) ; ... ) #+END_SRC But, AFAICT, citation objects do not actually have citation-reference objects within them, at least when returned by org-element-context. I'm sure there is something simple I am misunderstanding here about how nested objects work...can you enlighten me? Thanks! Best, Richard