Hello, I'm finding myself stuck in the `HELM Org Cite Insert` buffer that lists possible citations after calling org-cite-insert using Helm. After selecting a reference I am prompted to select more, and there isn't an obvious way to say, 'Thanks org-ref I'm done, kill this minibuffer and insert the refs I have chosen.' I was eventually told on Stack Overflow that M-RET does the job, but I would have expected either the first option in the HELM buffer to do this, or else there to be an option in the HELM Select Action list? Thanks! Daniel Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0) Package: Org mode version 9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/). Helm (20211205.1111)
Presumably you're using the default "basic" org-cite-insert-processor?
If yes, that's just how it's designed, using completing-read.
Perhaps you could customize the keybinding for exiting to get the
behavior you want?
On Mon, Dec 6, 2021 at 7:56 AM Daniel Nemenyi <daniel@pompo.co> wrote:
>
>
> Hello,
>
> I'm finding myself stuck in the `HELM Org Cite Insert` buffer that lists possible citations after calling org-cite-insert using Helm. After selecting a reference I am prompted to select more, and there isn't an obvious way to say, 'Thanks org-ref I'm done, kill this minibuffer and insert the refs I have chosen.'
>
> I was eventually told on Stack Overflow that M-RET does the job, but I would have expected either the first option in the HELM buffer to do this, or else there to be an option in the HELM Select Action list?
>
> Thanks!
> Daniel
>
> Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.24, cairo version 1.16.0)
> Package: Org mode version 9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/). Helm (20211205.1111)
>
[-- Attachment #1: Type: text/plain, Size: 1599 bytes --] org-ref should not get any credit for this. That is a feature of the built in org-cite library, which uses completing-read for that behavior. completing-read is only for reading one thing at a time, and org-cite works around that in a way that leads to the behavior you see. It looks like helm (if you use helm-mode), but it is actually the helm version of completing read, and not a helm selection command. Other completion backends use different bindings, e.g. ivy uses C-M-j I think. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Mon, Dec 6, 2021 at 7:57 AM Daniel Nemenyi <daniel@pompo.co> wrote: > > Hello, > > I'm finding myself stuck in the `HELM Org Cite Insert` buffer that lists > possible citations after calling org-cite-insert using Helm. After > selecting a reference I am prompted to select more, and there isn't an > obvious way to say, 'Thanks org-ref I'm done, kill this minibuffer and > insert the refs I have chosen.' > > I was eventually told on Stack Overflow that M-RET does the job, but I > would have expected either the first option in the HELM buffer to do this, > or else there to be an option in the HELM Select Action list? > > Thanks! > Daniel > > Emacs : GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version > 3.24.24, cairo version 1.16.0) > Package: Org mode version 9.5.1 (9.5.1-g36086a @ > /home/dan/.emacs.d/elpa/org-9.5.1/). Helm (20211205.1111) > > [-- Attachment #2: Type: text/html, Size: 2269 bytes --]
On Mon, Dec 6, 2021 at 8:09 AM Bruce D'Arcus <bdarcus@gmail.com> wrote:
> Perhaps you could customize the keybinding for exiting to get the
> behavior you want?
Or perhaps a better solution is for someone to write an
insert-processor for helm-bibtex.
It's not hard to write them.
Bruce
On Mon, Dec 6, 2021 at 8:51 AM John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> org-ref should not get any credit for this.
Certainly not, but I don't believe anyone mentioned org-ref in this thread?
Bruce
Bruce D'Arcus <bdarcus@gmail.com> wrote (on Mon 06 Dec 2021 14:21):
> Certainly not, but I don't believe anyone mentioned org-ref in this thread?
Apologies, I did ('Thanks org-ref I'm done...'), slip of the tongue. I meant org-cite.
Bruce D'Arcus <bdarcus@gmail.com> wrote (on Mon 06 Dec 2021 13:09): > Presumably you're using the default "basic" org-cite-insert-processor? Yes, am indeed. My only customization is org-cite-global-bibliography. > Perhaps you could customize the keybinding for exiting to get the behavior you want? Could have a go though if someone could give me a pointer? But if this is left to the user, perhaps we should include a line in the documentation telling them? Just to confirm, all of this is in helm; no ivy or anything.
On Mon, Dec 6, 2021 at 9:33 AM Daniel Nemenyi <daniel@pompo.co> wrote: > Apologies, I did ('Thanks org-ref I'm done...'), slip of the tongue. Oh, I missed that; sorry John. > Could have a go though if someone could give me a pointer? But if this is left to the user, perhaps we should include a line in the documentation telling them? The completion UIs have different keybindings for this. What should the documentation say? Bruce
Hello,
Daniel Nemenyi <daniel@pompo.co> writes:
> I'm finding myself stuck in the `HELM Org Cite Insert` buffer that
> lists possible citations after calling org-cite-insert using Helm.
> After selecting a reference I am prompted to select more, and there
> isn't an obvious way to say, 'Thanks org-ref I'm done, kill this
> minibuffer and insert the refs I have chosen.'
The prompt displays : "" to exit, which means you have to select the
empty value to exit. How you do select that value depends on the
completion UI.
I admit it is not particularly clear. Maybe we should spell out the
"empty value" part of the prompt.
Regards,
--
Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 2389 bytes --] You could consider something like this: The insert processors provided by org-cite use depend only on Emacs and use completing-read to select one or more citation keys for insertion. Completing-read is intended for selecting a single item, and org-cite compensates for this by letting you select multiple keys, and exiting when the selected candidate is an empty string. With a vanilla Emacs installation, you can press Tab to see a list of possible candidates, and use Tab for completion. Each time you press return with a completed candidate in the minibuffer that key is added to a list to be inserted. Press return with an empty minibuffer to finish and insert the selected keys. If you use an alternate completion-backend like helm, ivy, selectrum, etc. you will see different behavior because they have a different concept of the selected candidate vs the current input to select the current input (which must be empty). With helm, you cannot mark candidates, and there are no alternate actions. You press return on each entry you want to select, and when you are done selecting them you press C-return or M-return (bound to helm-cr-empty-string) to insert all the entries at once. With ivy, you press return on each entry you want to select, and when you are done selecting them you press C-M-j (exits with current input instead of the current candidate) to insert them. With Selectrum, ... (don't know what the keybinding here is) (not sure if there are other ones that should also be included) Other insert processors may use these backends natively, so this information may not apply to them. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Mon, Dec 6, 2021 at 9:43 AM Bruce D'Arcus <bdarcus@gmail.com> wrote: > On Mon, Dec 6, 2021 at 9:33 AM Daniel Nemenyi <daniel@pompo.co> wrote: > > Apologies, I did ('Thanks org-ref I'm done...'), slip of the tongue. > > Oh, I missed that; sorry John. > > > Could have a go though if someone could give me a pointer? But if this > is left to the user, perhaps we should include a line in the documentation > telling them? > > The completion UIs have different keybindings for this. What should > the documentation say? > > Bruce > > [-- Attachment #2: Type: text/html, Size: 3260 bytes --]
Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote (on Mon 06 Dec 2021 17:58):
> The prompt displays : "" to exit, which means you have to select the
> empty value to exit. How you do select that value depends on the
> completion UI.
>
> I admit it is not particularly clear. Maybe we should spell out the
> "empty value" part of the prompt.
I sort of got that -- though I must admit I did try entering two double quotes just in case! -- but the issue is that it's not clear how one inserts an empty value.
Couldn't the top value one could select simply be ""? Or is this just a problem with helm?
[-- Attachment #1: Type: text/plain, Size: 1440 bytes --] It is a "feature" of other completion tools that differentiate between the selected candidate (usually the highlighted one) and the current input (which may be incomplete, and usually not what you want to select, but sometimes is (e.g. when you want an empty string, or to choose something that is not a candidate but similar to one e.g. with fuzzy matching)). That happens with helm and ivy, probably selectrum, and other backends that try to improve on the vanilla completing-read interface. John ----------------------------------- Professor John Kitchin (he/him/his) Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Mon, Dec 6, 2021 at 1:42 PM Daniel Nemenyi <daniel@pompo.co> wrote: > > Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote (on Mon 06 Dec 2021 17:58): > > > The prompt displays : "" to exit, which means you have to select the > > empty value to exit. How you do select that value depends on the > > completion UI. > > > > I admit it is not particularly clear. Maybe we should spell out the > > "empty value" part of the prompt. > > I sort of got that -- though I must admit I did try entering two double > quotes just in case! -- but the issue is that it's not clear how one > inserts an empty value. > > Couldn't the top value one could select simply be ""? Or is this just a > problem with helm? > > [-- Attachment #2: Type: text/html, Size: 2176 bytes --]
John Kitchin <jkitchin@andrew.cmu.edu> wrote (on Mon 06 Dec 2021 18:09): > You could consider something like this: > ... Text looks good to me personally... > With Selectrum, ... (don't know what the keybinding here is) Just installed Selectrum to find out. C-j (selectrum-submit-exact-input) does the trick.
On Wed, Dec 8, 2021 at 8:17 AM Daniel Nemenyi <daniel@pompo.co> wrote: > > With Selectrum, ... (don't know what the keybinding here is) > > Just installed Selectrum to find out. C-j (selectrum-submit-exact-input) does the trick. If you like Selectrum (Vertico is another recent, similar, alternative), you might give citar a try. https://github.com/bdarcus/citar Bruce
On Wednesday, 8 Dec 2021 at 17:33, Bruce D'Arcus wrote: > If you like Selectrum (Vertico is another recent, similar, > alternative), you might give citar a try. > > https://github.com/bdarcus/citar +1 Works very well for me with selectrum. -- : Eric S Fraga, with org release_9.5.1-243-gad53c5 in Emacs 29.0.50 : Latest paper written in org: https://arxiv.org/abs/2106.05096