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

org-ql-find error with fido mode (built in) #411

Open
johnsonmlw opened this issue Feb 19, 2024 · 4 comments
Open

org-ql-find error with fido mode (built in) #411

johnsonmlw opened this issue Feb 19, 2024 · 4 comments

Comments

@johnsonmlw
Copy link

johnsonmlw commented Feb 19, 2024

OS/platform

Windows 10 and Debian Bookworm

Emacs version and provenance

Windows 10: https://ftp.gnu.org/gnu/emacs/windows/emacs-29/ emacs-29.2_1=installer.exe
Debian Bookworm: apt install emacs (28.2)

Emacs command

Windows 10: shortcut from install
Debian Bookworm: emacs

Org version and provenance

Windows 10: Built-in (9.6.15)
Debian Bookworm: Built-in (9.6.19)

org-ql package version and provenance

melpa: 20240113.647

Actions taken

Enable fido mode
org-ql-find

Observed results

[Error in post-command-hook (icomplete-post-command-hook): error "Invalid completion style flex")]

Expected results

No error

Backtrace

No response

Etc.

Disable fido mode, no error

@alphapapa
Copy link
Owner

Hello,

Thanks for reporting this bug. I can confirm it. However, I don't use fido-mode, and I've no idea what's causing it or how to fix it. I probably won't have time to work on this anytime soon, so patches welcome.

@9viz
Copy link

9viz commented Feb 25, 2024

@johnsonmlw Does the error go away if you try the patch given in
#337 (comment)?
But it should say "no matches" all the time, without returning any
errors.

I think the problem is fido-mode forcefully messes with
completions-style which causes org-ql not to do the work since it
relies on completions-style being properly set. You can see this in
the definition of icomplete--fido-mode-setup. If I use icomplete-mode
rather than fido-mode, everything works fine (fido uses icomplete in
the backend).

Weirdly enough though, if I use a completion-table prepared by
external-completion.el, then I can use fido-mode without issues even
though completions-style is still only (flex) in the minibuffer.
external-completion also works in a similar way by using a custom
completion-style temporarily. So this might be something that to look
into to avoid errors like these in the future.

@johnsonmlw
Copy link
Author

johnsonmlw commented Feb 28, 2024

Thanks for the replies. To update: I applied the changes from the comment 9viz linked to org-ql-completing-read.el and I get the same error as in my issue report above. I might have done something wrong - I'm a little out of my depth here. I made the changes to two lines, saved, restarted emacs, tried org-ql-find, got the same error. Edit: Windows 10, emacs 29

@alphapapa
Copy link
Owner

@johnsonmlw You don't need to restart Emacs to apply changes. Just evaluate the form or file that you changed.

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

No branches or pull requests

3 participants