> Maybe we should use 'separator property in the proposed values?

Added, I was just afraid that bit is more unstable than the variable
name.

> We can instead just check for (boundp 'crm-prompt)
Admittedly specifying Emacs version out loud is not beautiful, but I
thought what if in the future the user has `(set crm-prompt "...")` in
their init.el without guarding the Emacs version, then when they go back
to an older Emacs no indicator would be displayed. Nah maybe that's
just overthinking since if crm-prompt is set they are already aware of
the lack of CRM indicator.

Daanturo

On Mar 29 2025, at 10:34 pm, Ihor Radchenko <yanta...@posteo.net> wrote:
> Daan Ro <daant...@gmail.com> writes:
>
> > I defined org-cite-basic--crm-indicate-prompt, equivalent to
> > "[list separated by ;;] %(prompt)" by default.
>
> Thanks!
> > + :type
> > + '(choice
> > + (const :tag "Use \";;\" as the separator." "[ \t]*;;[ \t]*")
> > + (const
> > + :tag
> > + "Dynamically compute \";\"+ with the needed length."
> > + dynamic)
> > + (string :tag "Custom regexp for the separator.")
> > + (const :tag "Prompt multiple times." nil))
> > + :safe (lambda (obj) (or (string-or-null-p obj) (member obj '(dynamic)))))
>
> Maybe we should use 'separator property in the proposed values?
> > +(defun org-cite-basic--crm-indicate-prompt (orig-prompt)
> > + "Return annotated ORIG-PROMPT with `crm-separator'.
> > +For Emacs version 31 and above, just return ORIG-PROMPT."
> > + (cond
> > + ((<= 31 emacs-major-version)
> > + orig-prompt)
>
> We can instead just check for (boundp 'crm-prompt)
> --
> 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>
>

Attachment: 0001-oc-basic.el-new-option-org-cite-basic-complete-key-crm-separator.patch
Description: Binary data

Reply via email to