GNU bug report logs -
#77792
Org-cite incorrectly parses periods after citekeys
Previous Next
To reply to this bug, email your comments to 77792 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77792
; Package
emacs
.
(Mon, 14 Apr 2025 04:43:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Zac E <zac.endter <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 14 Apr 2025 04:43:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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]
EXAMPLE 1 OUTPUT (PRESENT ERROR):
cohen2003consum-repub.; Trentmann 2016.
EXAMPLE 1 OUTPUT (EXPECTED/CORRECT):
Cohen 2003. Trentmann 2016.
EXAMPLE 2:
[cite:@cohen2003consum-repub.;@trentmann2016empire-things]
EXAMPLE 2 OUTPUT (PRESENT ERROR):
Cohen 2003, \. Trentmann 2016.
EXAMPLE 2 OUTPUT (EXPECTED/CORRECT):
Cohen 2003. Trentmann 2016.
My system version information is below. However, this behavior
has been consistent in all versions of org-cite since at least 2023.
I suspect that most testing of org-cite has been tested with the
needs of those working in the sciences, who cite parenthetically,
in mind, and so this bug could have easily gone unnoticed. I am
somewhat competent in elisp but would neither know exactly where
to look in the codebase nor feel confident submitting a change
myself.
Emacs : GNU Emacs 29.4 (build 2, aarch64-apple-darwin24.2.0,
NS appkit-2575.30 Version 15.2 (Build 24C101)) of 2025-01-24
Package: Org mode version 9.7.19 (9.7.19-??-5a4686915
@ /Users/mainuser/.config/emacs/.local/straight/build-29.4/org/)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77792
; Package
emacs
.
(Tue, 15 Apr 2025 17:50:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 77792 <at> debbugs.gnu.org (full text, mbox):
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>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#77792
; Package
emacs
.
(Tue, 15 Apr 2025 18:04:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 77792 <at> debbugs.gnu.org (full text, mbox):
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 66 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.