emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Multicite syntax


From: Richard Lawrence
Subject: Re: [O] Multicite syntax
Date: Sat, 14 Mar 2015 09:17:40 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Hi Nicolas,

Nicolas Goaziou <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]