andras-simonyi / citeproc-el

A CSL 1.0.2 Citation Processor for Emacs.
GNU General Public License v3.0
84 stars 9 forks source link

Unexpected behavior from the "nocite" :keyword behavior of #+print_bibliography: #133

Closed brittAnderson closed 1 year ago

brittAnderson commented 1 year ago

I have not seen the combined use of keywords and nocite well documented yet, so maybe I am using them wrong. What I want is to dump all the references with a certain keyword into a bibliography whether or not they are cited.

The line I use in the header is: #+cite_export: csl assets/chicago-note-bibliography-16th-edition.csl

In the org file I use

[cite/n:@*]
#+print_bibliography: :keyword posters

The result is that I get a bibliography with all entries with the keyword "posters" appearing first and then all the other entries.

What I want is only the entries with the keyword "posters"

I did a little testing and found that if all the bib file entries have keywords then I can create several bibliographies that each contain only the keyword for that print_bibliography invocation, but that any /left-over/ entries that do not have an invoked keyword in the .bib file get dumped at the end instead of being omitted.

Looking to see if I am typing something wrong or this is a bug.?

NB: In my case I am using this to make a static website with org-publish and I want to have a page of posters and another of articles published and articles in preparation.

andras-simonyi commented 1 year ago

Thanks for the report! I've managed to reproduce. Seems like a genuine but, fortunately, easily solvable problem -- I'll push a fix shortly.

andras-simonyi commented 1 year ago

I've merged pull request #134 which should solve the problem -- could you check?

brittAnderson commented 1 year ago

I now get the correct output of a nocite list restricted to the keyword without extra references following. Works as expected.

NB. Still uses global-bibliography and not local bibliography though. I suspect local bib is being appended to the bibliography cache, not replacing it, and have reported this issues to the org mailing list per your suggestion. Thanks for everything. A truly wonderful library.

andras-simonyi commented 1 year ago

Thanks for reporting back, I'm closing this now as fixed.