Closed codesuki closed 5 years ago
I don't really like this PR, because it changes what purpose-ido-caller
without changing its name and documentation accordingly.
Besides, you should already be able to use Purpose and Counsel together. Use the ivy-purpose
package and/or change the keybindings in purpose-mode-map
, e.g. (define-key purpose-mode-map (kbd "C-x b") nil)
.
Agree about the docs. Thought I send a draft version and fix it up in case you accept it. I think the ivy-purpose-package is doing something slightly different, will try the keybindings approach. Thanks.
Thought I send a draft version and fix it up in case you accept it.
That's fair, but would be better to state this when opening the PR so I know when I review it.
So after thinking more about the above and looking at the ivy-purpose package, I think what I want to accomplish is different. I use counsel instead of ido so I want the same behavior (open file with counsel and purpose or with counsel but without purpose on C-u) If I fix the docs and function name would you reconsider the PR given the functionality?
There's a better option than changing ido-caller. Here is how to define a command with similar behavior: (ivy-switch-buffer-without-purpose
is from ivy-purpose)
(define-purpose-prefix-overload switch-buffer-overload
'(ivy-switch-buffer ivy-switch-buffer-without-purpose ivy-purpose-switch-buffer-with-purpose))
This won't replace the keybinding of purpose-switch-buffer-overload
in purpose-mode-map
(C-x b
). If you want that:
(define-key purpose-mode-map [remap purpose-switch-buffer-overload] 'switch-buffer-overload)
I'd accept a PR to ivy-purpose that adds something like this. Maybe with better names or other functions. Using counsel is also ok but requires a bit more work, and I'm not sure it has advantages over plain ivy in our case.
This small change lets me use counsel together with purpose. Would be helpful if that could be incorporated into upstream so I don't have to use my own fork.