GNU bug report logs - #77792
Org-cite incorrectly parses periods after citekeys

Previous Next

Package: emacs;

Reported by: Zac E <zac.endter <at> gmail.com>

Date: Mon, 14 Apr 2025 04:43:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Zac E <zac.endter <at> gmail.com>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 77792 <at> debbugs.gnu.org
Subject: bug#77792: Org-cite incorrectly parses periods after citekeys
Date: Tue, 15 Apr 2025 14:03:19 -0400
I don’t believe that it is quite that ambiguous. 
Technically, periods are legal in bibtex or biblatex
 citekeys. In practice, however, they are rarely 
used, and they are never used at the end of citekeys
 (since their only function would be as a divider). 

There are two options. 

1) the parser could ignore periods at the end of citekeys.
 This means breaking strict bibtex compatibility, since
 technically a period is allowed anywhere—again, not a
 practical issue, and Pandoc already makes an exception
 for periods at the end, as I have proposed. 

2) Org’s parser could allow for a backslash escape
 character between a citekey and a period. This is a
 standard escape character, and there is to the best of
 my knowledge no reason why it could not be implemented.

It is absolutely a bug in the general sense, i.e. the
 software does not behave in the expected way. 
I would add that this bug is quite literally the only one
 keeping org-mode from being capable of generating
 papers in the humanities. 

> On Apr 15, 2025, at 13:48, Ihor Radchenko <yantar92 <at> posteo.net> wrote:
> 
> Zac E <zac.endter <at> gmail.com> writes:
> 
>> In a list of citations in footnote format, one often needs to
>> separate some of the citations with periods. This is not
>> currently possible with org-cite, although it is possible in
>> other parsers like Pandoc. Org-cite fails to recognize the citekey
>> to which the period is appended, resulting in an undefined-citation
>> error. Escaping the period with a backslash resolves the undefined-
>> citation error, but actually prints the backslash in the final output,
>> which is not correct either. Below, one finds examples of both.
>> My example outputs assume that one is exporting to abbreviated
>> footnotes, but this error is consistent across all citation export
>> modes.
>> 
>> EXAMPLE 1:
>> [cite:@cohen2003consum-repub.;@trentmann2016empire-things]
> 
> This is ambiguous. "." can be a part of citation key.
> There is no bug here. Just a limitation that we cannot easily force end
> of citation key in Org syntax.
> 
> --
> Ihor Radchenko // yantar92,
> Org mode maintainer,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>




This bug report was last modified 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.