My apology for the late reply. > An alternative could be using `completing-read-multiple' where you can > enter, for example, comma-separated list of citations or a single > citation as you prefer.
This is an improvement over ther current input loop, I think. > > In Latex, \cite is also more commonly used and more asked/documented > > compared to \cites. I think org-cite's decision to make inserting > > citation(s) multiple by default an odd choice. > May you elaborate? Are you talking about auctex? \cites is just rarely used IIRC. A DDG search for "latex \cites" return only a single results on tex.stackexchange.com asking about the differences of \cite and \cites, all the other ones only mention \cite. On https://www.overleaf.com/learn \cites isn't documented at all while \cite is abundantly mentioned. > Is it really with asking for multiple citations? Or is it about specific > default behavior of `org-cite-basic--complete-key'? Have you tried > alternative citation processors that provide custom completion like > citar? Yes looks like only `org-cite-basic--complete-key' supports inserting citations among org-cite's built-in processors, but it is also about `org-cite-make-insert-processor' producing a lambda that always asks for multiple citations from the 'select-key' function in its last case. Using citar and setting `citar-select-multiple' to nil makes it only asks for once. But if only caring for a single command like 'org-cite-insert', installing citar seems overkill. My wish was to make the said core command more friendly when a completion engine is enabled, which is recommended by all Emacs starter guides/kits. Converting `org-cite-basic--complete-key' to `completing-read-multiple', preferrably by default looks like a sweet solution? But I'm not sure since that may breaks some people's workflows. (BTW my previous patch was wrong, updated for that idea.) (Excused me for spamming, I press the wrong reply button last email) Daanturo On Mar 12 2025, at 12:46 am, Ihor Radchenko <yanta...@posteo.net> wrote: > Daan Ro <daant...@gmail.com> writes: > > > Currently org-cite-insert requires multiple <RET> to complete. When a > > completion engine is enabled (likely the more common case), like vertico > > or the built-in fido-mode, etc. we must also know how to exit > > "abnormally", usually with "M-j": > > https://github.com/minad/vertico/issues/261, else the command will keep > > asking non-stop. > > That's what `org-cite-basic--complete-key' is currently doing, yes. > Non not-stop, but until you enter an empty input. > Why it is so hard to enter empty input in some completion styles is a > separate question. > > An alternative could be using `completing-read-multiple' where you can > enter, for example, comma-separated list of citations or a single > citation as you prefer. > > > In Latex, \cite is also more commonly used and more asked/documented > > compared to \cites. I think org-cite's decision to make inserting > > citation(s) multiple by default an odd choice. > > May you elaborate? Are you talking about auctex? > > May we add an option to make org-cite-insert prompt only once? I > > naively think of an option named org-cite-insert-single. > > Not sure. I would like to understand better what the actual problem is. > Is it really with asking for multiple citations? Or is it about specific > default behavior of `org-cite-basic--complete-key'? Have you tried > alternative citation processors that provide custom completion like > citar? > > -- > 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> >
0001-Defcustom-org-cite-insert-single.patch
Description: Binary data