emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] org-cite-insert fails to open json format bibliographies that contain entries for books with editors but no authors [9.6.6 (release_9.6.6 @ /snap/emacs/current/usr/share/emacs/29.1/lisp/org/)]
@ 2023-08-24 16:50 Margaret Patterson
  2023-08-25  8:39 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Margaret Patterson @ 2023-08-24 16:50 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1884 bytes --]

Since upgrading to emacs 29.1 org-cite-insert no longer copes with 
bibliography files in json format where there is an entry for a book 
that has only editors and no author.

Expected behaviour:
Running org-cite-insert opens the bibliography file and allows me to 
search for a citation and insert it in the org file I’m editing.

Actual behaviour:
Running org-cite-insert fails to open the bibliography file with the 
following error:

org-cite-basic--key-completion-table: Wrong type argument: stringp, 
(((family . "Asimov") (given . "Isaac")) ((family . "Greenberg") (given 
. "Martin H.")))

(The exact error alters depending on the contents of the entry it fails on.)

Reproducing:
Attached are two bibliography files, citation-test-only-editor.json and 
citation-test-author.json, the first of which has a single entry of a 
book with two editors and no author, the second has the same book but 
I’ve changed one editor to an author.  Create an org file with 
“#+bibliography: citation-test-only-editor.json” or “#+bibliography: 
citation-test-author.json” at the top, and try running org-cite-insert.

Notes:
- The problem persists with emacs -Q.
- It is not a problem if I export my bibliography as a .bib file, just 
when it’s a .json file.
- It worked as I expected in emacs 28.2.
- Other parts of using org-cite seem to be unaffected but I haven’t 
exhaustively tested – I have just noted that manually typing in the 
citation and exporting the org file with a #+print_bibliography: line 
worked as expected and fontifying manually entered citations with 
org-cite-csl-activate works as expected.

Best wishes,
Margaret Patterson.

Emacs  : GNU Emacs 29.1 (build 2, x86_64-pc-linux-gnu, GTK+ Version 
3.24.20, cairo version 1.16.0)
  of 2023-08-04
Package: Org mode version 9.6.6 (release_9.6.6 @ 
/snap/emacs/current/usr/share/emacs/29.1/lisp/org/)

[-- Attachment #2: citation-test-author.json --]
[-- Type: application/json, Size: 563 bytes --]

[-- Attachment #3: citation-test-only-editor.json --]
[-- Type: application/json, Size: 552 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-26 16:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24 16:50 [BUG] org-cite-insert fails to open json format bibliographies that contain entries for books with editors but no authors [9.6.6 (release_9.6.6 @ /snap/emacs/current/usr/share/emacs/29.1/lisp/org/)] Margaret Patterson
2023-08-25  8:39 ` Ihor Radchenko
2023-08-26 14:29   ` Margaret Patterson
2023-08-26 16:19     ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).