Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: org-ql-find + query-prefix lead to "Match Required" error on Vertico #351

Closed
danielfleischer opened this issue May 17, 2023 · 4 comments
Assignees
Labels
Milestone

Comments

@danielfleischer
Copy link

Run the following:

(org-ql-find (org-agenda-files) :query-prefix "heading:")

Get a list of completions, when trying to select something, you get "Match Required", can't complete the selection; using Vertico.

@alphapapa
Copy link
Owner

Hello Daniel,

Thanks for reporting this problem, but I am unable to reproduce that behavior in a clean Emacs configuration on Emacs 28.2. Please try to reproduce it in a clean configuration using https://github.com/alphapapa/with-emacs.sh.

Please see also other issues mentioning Vertico: https://github.com/alphapapa/org-ql/issues?q=is%3Aissue+is%3Aopen+vertico If what you're reporting is also reported in one of them, please close this report and add your feedback there.

Thanks.

@danielfleischer
Copy link
Author

danielfleischer commented May 18, 2023

Hi, I was able to reproduce with

  1. ./with-emacs.sh -O -- -L ~/Projects/org-mode/lisp/ -l org
  2. Installing vertico, enabling it, installing org-ql.
  3. Running (org-ql-find '("myfile.org") :query-prefix "heading:").
  4. Trying to choose something, getting "Match Required" error.

Emacs master 30, org master, vertico 1.3.

However I'm able to fix it by changing

(selected (completing-read prompt #'collection nil t)))

making the match-required nil:

             (selected (completing-read prompt #'collection nil nil)))

However I do realize this is a very complicated function, with many comments and not sure if this breaks something else.

staffordsbeard pushed a commit to staffordsbeard/org-ql that referenced this issue Sep 10, 2023
@alphapapa
Copy link
Owner

alphapapa commented Sep 14, 2023

Hi @danielfleischer (and cc: @staffordsbeard):

I confirmed the bug and have pushed a fix in this commit (the wip/351 branch): 95abce2 It seems to solve the problem, and org-ql-find seems to still work when used without the :query-prefix argument. Please test it and let me know if it works for you.

Thanks.

@alphapapa alphapapa self-assigned this Sep 14, 2023
@alphapapa alphapapa added the bug label Sep 14, 2023
@alphapapa alphapapa added this to the 0.7.2 milestone Sep 14, 2023
@danielfleischer
Copy link
Author

Hi, I can confirm it's working as expected. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants