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

ctrlf should not interfere with ido by default #67

Closed
4DA opened this issue Dec 14, 2020 · 5 comments
Closed

ctrlf should not interfere with ido by default #67

4DA opened this issue Dec 14, 2020 · 5 comments

Comments

@4DA
Copy link

4DA commented Dec 14, 2020

When ctrlf is enabled and ido is used, pressing ido's C-s or C-r triggers ctrlf.

Since ido is in base and used by lot of packages I think it would be great to disable ctrlf for ido by default. One extra argument that such interatction is anyway useless.

This hook works on my emacs (27.1), though I am not sure this is right way to do it:

(add-hook 'ido-minibuffer-setup-hook (lambda () (ctrlf-local-mode -1)))
@raxod502
Copy link
Member

Yes, that seems reasonable to me. Isearch does not run into the same problem, because its bindings are established in global-map (ew) which is then overridden by minor mode maps, whereas CTRLF activates its bindings in a proper (global) minor mode map.

I'm not sure what the most appropriate solution would be. One way might be to make the binding by ctrlf-mode be an extended menu item using the :filter property to inhibit the binding from taking effect when a certain predicate returns non-nil. In that predicate we could implement a denylist for major/minor modes, or simply hardcode it to disable for IDO.

@raxod502
Copy link
Member

Your solution also would work perfectly well, I think. Might be easier. I think I would be fine with either.

@astoff
Copy link

astoff commented Jan 24, 2021

ctrlf-mode also breaks Swiper. Disabling ctrl-local-mode would solve this, but I don't know if Swiper provides a setup hook to replicate the above solution. In any case, adding a hook for every package that redefines C-s in the minibuffer doesn't scale well. The source of all these problems is a keymap precedence issue, as pointed out in #80.

@raxod502
Copy link
Member

I've come up with a more robust keymapping scheme. It's a bit of a hack but should address the conflicting needs of these various bug reports. My new solution should solve #51, #52, #67, and #80 simultaneously while also working with remap bindings. I have tested it a bit and it seems to work, but I don't actually use most of the modes that have been mentioned in these issue reports, so I could use some help to confirm if the bug is resolved for all of them.

@raxod502
Copy link
Member

This thread is being closed automatically by Tidier because it is labeled with "waiting on response" and has not seen any activity for 90 days. But don't worry—if you have any information that might advance the discussion, leave a comment and I will be happy to reopen the thread :)

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

No branches or pull requests

3 participants