emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "Bruce D'Arcus" <bdarcus@gmail.com>
Cc: org-mode-email <emacs-orgmode@gnu.org>
Subject: Re: [org-cite] citekey restrictions?
Date: Sun, 16 May 2021 14:55:15 +0200	[thread overview]
Message-ID: <875yzizvm4.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CAF-FPGOJ8qMZVvV-pnTp7bA_r7Ah6_T7GCXDwurEy0gSvJweoA@mail.gmail.com> (Bruce D'Arcus's message of "Sun, 16 May 2021 07:41:36 -0400")

"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	other threads:[~2021-05-16 13:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 10:12 [org-cite] citekey restrictions? Bruce D'Arcus
2021-05-16 11:29 ` Nicolas Goaziou
2021-05-16 11:41   ` Bruce D'Arcus
2021-05-16 12:55     ` Nicolas Goaziou [this message]
2021-05-16 13:10       ` Bruce D'Arcus
2021-05-16 18:49       ` Joost Kremers
2021-05-16 21:21         ` Nicolas Goaziou

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=875yzizvm4.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=bdarcus@gmail.com \
    --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).