emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
@ 2021-12-06 12:24 Daniel Nemenyi
  2021-12-06 13:09 ` Bruce D'Arcus
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Daniel Nemenyi @ 2021-12-06 12:24 UTC (permalink / raw)
  To: emacs-orgmode


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)


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 12:24 Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)] Daniel Nemenyi
@ 2021-12-06 13:09 ` Bruce D'Arcus
  2021-12-06 13:22   ` Bruce D'Arcus
  2021-12-06 14:27   ` Daniel Nemenyi
  2021-12-06 13:22 ` John Kitchin
  2021-12-06 17:58 ` Nicolas Goaziou
  2 siblings, 2 replies; 15+ messages in thread
From: Bruce D'Arcus @ 2021-12-06 13:09 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: org-mode-email

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)
>


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 12:24 Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)] Daniel Nemenyi
  2021-12-06 13:09 ` Bruce D'Arcus
@ 2021-12-06 13:22 ` John Kitchin
  2021-12-06 14:21   ` Bruce D'Arcus
  2021-12-06 17:58 ` Nicolas Goaziou
  2 siblings, 1 reply; 15+ messages in thread
From: John Kitchin @ 2021-12-06 13:22 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: org-mode-email

[-- 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 --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 13:09 ` Bruce D'Arcus
@ 2021-12-06 13:22   ` Bruce D'Arcus
  2021-12-06 14:27   ` Daniel Nemenyi
  1 sibling, 0 replies; 15+ messages in thread
From: Bruce D'Arcus @ 2021-12-06 13:22 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: org-mode-email

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 13:22 ` John Kitchin
@ 2021-12-06 14:21   ` Bruce D'Arcus
  2021-12-06 14:23     ` Daniel Nemenyi
  0 siblings, 1 reply; 15+ messages in thread
From: Bruce D'Arcus @ 2021-12-06 14:21 UTC (permalink / raw)
  To: John Kitchin; +Cc: Daniel Nemenyi, org-mode-email

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 14:21   ` Bruce D'Arcus
@ 2021-12-06 14:23     ` Daniel Nemenyi
  0 siblings, 0 replies; 15+ messages in thread
From: Daniel Nemenyi @ 2021-12-06 14:23 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: John Kitchin, Daniel Nemenyi, org-mode-email


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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 13:09 ` Bruce D'Arcus
  2021-12-06 13:22   ` Bruce D'Arcus
@ 2021-12-06 14:27   ` Daniel Nemenyi
  2021-12-06 14:39     ` Bruce D'Arcus
  1 sibling, 1 reply; 15+ messages in thread
From: Daniel Nemenyi @ 2021-12-06 14:27 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: Daniel Nemenyi, org-mode-email


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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 14:27   ` Daniel Nemenyi
@ 2021-12-06 14:39     ` Bruce D'Arcus
  2021-12-06 18:09       ` John Kitchin
  0 siblings, 1 reply; 15+ messages in thread
From: Bruce D'Arcus @ 2021-12-06 14:39 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: org-mode-email

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 12:24 Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)] Daniel Nemenyi
  2021-12-06 13:09 ` Bruce D'Arcus
  2021-12-06 13:22 ` John Kitchin
@ 2021-12-06 17:58 ` Nicolas Goaziou
  2021-12-06 18:32   ` Daniel Nemenyi
  2 siblings, 1 reply; 15+ messages in thread
From: Nicolas Goaziou @ 2021-12-06 17:58 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: emacs-orgmode

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 14:39     ` Bruce D'Arcus
@ 2021-12-06 18:09       ` John Kitchin
  2021-12-08 13:13         ` Daniel Nemenyi
  0 siblings, 1 reply; 15+ messages in thread
From: John Kitchin @ 2021-12-06 18:09 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: Daniel Nemenyi, org-mode-email

[-- 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 --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 17:58 ` Nicolas Goaziou
@ 2021-12-06 18:32   ` Daniel Nemenyi
  2021-12-06 18:54     ` John Kitchin
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Nemenyi @ 2021-12-06 18:32 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode


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?


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 18:32   ` Daniel Nemenyi
@ 2021-12-06 18:54     ` John Kitchin
  0 siblings, 0 replies; 15+ messages in thread
From: John Kitchin @ 2021-12-06 18:54 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: org-mode-email, Nicolas Goaziou

[-- 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 --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-06 18:09       ` John Kitchin
@ 2021-12-08 13:13         ` Daniel Nemenyi
  2021-12-08 22:33           ` Bruce D'Arcus
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Nemenyi @ 2021-12-08 13:13 UTC (permalink / raw)
  To: John Kitchin; +Cc: Bruce D'Arcus, org-mode-email


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.


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-08 13:13         ` Daniel Nemenyi
@ 2021-12-08 22:33           ` Bruce D'Arcus
  2021-12-09 16:26             ` Eric S Fraga
  0 siblings, 1 reply; 15+ messages in thread
From: Bruce D'Arcus @ 2021-12-08 22:33 UTC (permalink / raw)
  To: Daniel Nemenyi; +Cc: org-mode-email, John Kitchin

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)]
  2021-12-08 22:33           ` Bruce D'Arcus
@ 2021-12-09 16:26             ` Eric S Fraga
  0 siblings, 0 replies; 15+ messages in thread
From: Eric S Fraga @ 2021-12-09 16:26 UTC (permalink / raw)
  To: Bruce D'Arcus; +Cc: Daniel Nemenyi, org-mode-email, John Kitchin

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-12-09 16:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 12:24 Org-cite stuck in Helm minibuffer [9.5.1 (9.5.1-g36086a @ /home/dan/.emacs.d/elpa/org-9.5.1/)] Daniel Nemenyi
2021-12-06 13:09 ` Bruce D'Arcus
2021-12-06 13:22   ` Bruce D'Arcus
2021-12-06 14:27   ` Daniel Nemenyi
2021-12-06 14:39     ` Bruce D'Arcus
2021-12-06 18:09       ` John Kitchin
2021-12-08 13:13         ` Daniel Nemenyi
2021-12-08 22:33           ` Bruce D'Arcus
2021-12-09 16:26             ` Eric S Fraga
2021-12-06 13:22 ` John Kitchin
2021-12-06 14:21   ` Bruce D'Arcus
2021-12-06 14:23     ` Daniel Nemenyi
2021-12-06 17:58 ` Nicolas Goaziou
2021-12-06 18:32   ` Daniel Nemenyi
2021-12-06 18:54     ` John Kitchin

Code repositories for project(s) associated with this 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).