emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Margaret Patterson <emacs-m@ninecats.org>
To: emacs-orgmode@gnu.org
Subject: [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/)]
Date: Thu, 24 Aug 2023 17:50:58 +0100	[thread overview]
Message-ID: <ea0d8557-f67d-c8b1-522f-b5ad37612d99@ninecats.org> (raw)

[-- 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 --]

             reply	other threads:[~2023-08-24 17:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 16:50 Margaret Patterson [this message]
2023-08-25  8:39 ` [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/)] Ihor Radchenko
2023-08-26 14:29   ` Margaret Patterson
2023-08-26 16:19     ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea0d8557-f67d-c8b1-522f-b5ad37612d99@ninecats.org \
    --to=emacs-m@ninecats.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).