emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [org-cite] citekey restrictions?


From: Nicolas Goaziou
Subject: Re: [org-cite] citekey restrictions?
Date: Sun, 16 May 2021 14:55:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

"Bruce D'Arcus" <bdarcus@gmail.com> writes:

> I'm not super sure of the details around, for example, bibtex, but
> this post seems to be helpful to check against for the details?
>
> https://tex.stackexchange.com/questions/388500/what-is-valid-as-a-biblatex-entry-key/388652#388652

Oh my! You're reviving a 6 years old thread[¹]!

Basically, current syntax is inherited from a previous citation
specification allowing shortcuts: @key instead of [cite:@key].

Since these shortcuts do not exist anymore, we don't need to be so
careful about characters allowed in a key. The only one being dangerous
is the semicolon, since it is used to separate keys in a citation
reference. Closing square bracket could also be problematic if it is not
paired properly. So, to be on a safe side, anything beside space,
semicolon and square brackets are fine.

However, allowing anything means some keys will not be compatible with
some bibliography formats. For example, I doubt BibTeX would appreciate
a percent character in a key. OTOH, we can put the burden of the user's
shoulders.

So... let's get liberal and say a key must match:

  (rx "@" (one-or-more (any word "-.:?!`'/*@+|()<>&_^$#%&~")))

Nothing bad could happen, right?


[¹]  https://lists.gnu.org/archive/html/emacs-orgmode/2015-03/msg00131.html

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]