emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-cite-insert only searches on truncate author list
@ 2023-01-16 18:09 Fraga, Eric
  2023-01-17  8:38 ` Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Fraga, Eric @ 2023-01-16 18:09 UTC (permalink / raw)
  To: Emacs Org mode mailing list

[-- Attachment #1: Type: text/plain, Size: 998 bytes --]

Hello all,

Using org-cite-insert with vertico, matching is done only on the text
that the completion engine shows, text which has been truncated.  See
attached screenshot.  If I continue typing the second authors name,
Oluwamayowa, the second entry currently shown will disappear from the
options.  This is even more annoying when I am trying to search based
on, say, the third author of a paper whose name doesn't even appear in
this truncated table of completions.

I assume that, maybe, this is not org's fault but this kind of problem
only arises when using org-cite-insert so I was wondering if indeed
there is something I can tweak in org or oc- to get better completion
behaviour?  Or maybe something I can specify for vertico?

Note, with emacs -Q, the problem does not arise because the default
completion engine only allows completing based on the start of the entry
anyway.

Thank you,
eric

-- 
: Eric S Fraga, with org release_9.6-201-gb58fba in Emacs 30.0.50

[-- Attachment #2: screendump-20230116175444.png --]
[-- Type: image/png, Size: 55228 bytes --]

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

* Re: org-cite-insert only searches on truncate author list
  2023-01-16 18:09 org-cite-insert only searches on truncate author list Fraga, Eric
@ 2023-01-17  8:38 ` Ihor Radchenko
  2023-01-17 10:01   ` Fraga, Eric
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2023-01-17  8:38 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Emacs Org mode mailing list

"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:

> I assume that, maybe, this is not org's fault but this kind of problem
> only arises when using org-cite-insert so I was wondering if indeed
> there is something I can tweak in org or oc- to get better completion
> behaviour?  Or maybe something I can specify for vertico?

org-cite-insert simply calls whatever is provided by the citation
backend you use. Please tell us which oc-*.el backend is creating the
problem.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>


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

* Re: org-cite-insert only searches on truncate author list
  2023-01-17  8:38 ` Ihor Radchenko
@ 2023-01-17 10:01   ` Fraga, Eric
  2023-01-17 10:22     ` [BUG] " Ihor Radchenko
  0 siblings, 1 reply; 5+ messages in thread
From: Fraga, Eric @ 2023-01-17 10:01 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs Org mode mailing list

On Tuesday, 17 Jan 2023 at 08:38, Ihor Radchenko wrote:
> ⚠️ Caution: External sender
>
>
> "Fraga, Eric" <e.fraga@ucl.ac.uk> writes:
>
>> I assume that, maybe, this is not org's fault but this kind of problem
>> only arises when using org-cite-insert so I was wondering if indeed
>> there is something I can tweak in org or oc- to get better completion
>> behaviour?  Or maybe something I can specify for vertico?
>
> org-cite-insert simply calls whatever is provided by the citation
> backend you use. Please tell us which oc-*.el backend is creating the
> problem.

Maybe I'm doing something wrong somewhere because whether I try basic,
biblatex, or csl, they appear the same in terms of selection interface.
Maybe it's something in vertico although I cannot see what it would be.

-- 
: Eric S Fraga, with org release_9.6-201-gb58fba in Emacs 30.0.50

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

* [BUG] org-cite-insert only searches on truncate author list
  2023-01-17 10:01   ` Fraga, Eric
@ 2023-01-17 10:22     ` Ihor Radchenko
  2023-01-17 11:08       ` Fraga, Eric
  0 siblings, 1 reply; 5+ messages in thread
From: Ihor Radchenko @ 2023-01-17 10:22 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Emacs Org mode mailing list

"Fraga, Eric" <e.fraga@ucl.ac.uk> writes:

>> org-cite-insert simply calls whatever is provided by the citation
>> backend you use. Please tell us which oc-*.el backend is creating the
>> problem.
>
> Maybe I'm doing something wrong somewhere because whether I try basic,
> biblatex, or csl, they appear the same in terms of selection interface.
> Maybe it's something in vertico although I cannot see what it would be.

In oc-basic, there is `org-cite-basic-author-column-end' and it indeed
truncates the match.

oc-csl and oc-biblatex do not specify insert processor and thus the
default is used (from oc-basic).

So, I confirm the bug.

Eric, as temporary workaround, you can try to increase
`org-cite-basic-author-column-end'. Note that completion might look ugly
though.

One needs to rewrite `org-cite-basic--complete-key' adding 'annotation
function to `completing-read' call instead of passing the truncated
author/title list as completion table. See 21.6.7 Programmed Completion
section of Elisp manual.
https://github.com/alphapapa/org-ql/blob/master/org-ql-completing-read.el
also contains an example of implementing the annotations.

Patches welcome!

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
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>


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

* Re: [BUG] org-cite-insert only searches on truncate author list
  2023-01-17 10:22     ` [BUG] " Ihor Radchenko
@ 2023-01-17 11:08       ` Fraga, Eric
  0 siblings, 0 replies; 5+ messages in thread
From: Fraga, Eric @ 2023-01-17 11:08 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: Emacs Org mode mailing list

Hi Ihor,

On Tuesday, 17 Jan 2023 at 10:22, Ihor Radchenko wrote:
> In oc-basic, there is `org-cite-basic-author-column-end' and it indeed
> truncates the match.  Eric, as temporary workaround, you can try to
> increase `org-cite-basic-author-column-end'.

Ah, interesting.  I had to restart Emacs (:-O) to get it to take effect
but it now works perfectly.  Thank you!  

> Note that completion might look ugly though.

It doesn't look ugly as I have a very wide monitor and although I tend
to write prose in a frame with >170 columns (typically split in two or
three windows), the minibuffer is full width so plenty of room for full
author list along with year and title.

> One needs to rewrite `org-cite-basic--complete-key' adding 'annotation
> function to `completing-read' call instead of passing the truncated
> author/title list as completion table. [...]

I'll add this to my list of possible things to do on org: ever growing,
including ox-beamer and a few other things.  Once my (paid ;-)) work
(teaching etc.) load lightens up hopefully, if ever...

Thanks again,
eric

-- 
: Eric S Fraga, with org release_9.6-201-gb58fba in Emacs 30.0.50

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

end of thread, other threads:[~2023-01-17 11:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16 18:09 org-cite-insert only searches on truncate author list Fraga, Eric
2023-01-17  8:38 ` Ihor Radchenko
2023-01-17 10:01   ` Fraga, Eric
2023-01-17 10:22     ` [BUG] " Ihor Radchenko
2023-01-17 11:08       ` Fraga, Eric

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