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
Warning when using counsel-find-file in conjunction with diff-hl #627
Comments
This is OK, just a regular Emacs message. What happens here, is that If you don't like this behavior, you can disable it with: (setq counsel-find-file-speedup-remote nil) |
Thank you for the clarification, though the warning still appears after setting |
I can't reproduce your issue actually. It has to be something in your config. |
This is all I have in my init file started from scratch with a blank file:
|
I see the problem now: even with And (add-hook (if vc-mode
;; Defer until the end of this hook, so that its
;; elements can modify the update behavior.
'diff-hl-mode-on-hook
;; If we're only opening the file now,
;; `vc-find-file-hook' likely hasn't run yet, so
;; let's wait until the state information is
;; saved, in order not to fetch it twice.
'find-file-hook)
'diff-hl-update t t) Which means that it locally sets |
Thank you for the pointers once again, I will file an issue for |
I'm within my rights to do that, and it serves a purpose. What makes you say it's a bug? |
@dgutov It seems strange for the minor mode to locally set I would suggest for the globalized mode to set |
If |
Same warning happens also when using the |
Fixes #627 Fixes #1118 We only do the let binding here for find-file-hook if we are actually going to override it, there are some other modes (git-gutter and diff-hl) that cause user visible warnings if find-file-hook is let bound. This way the user only has the warning in case of remote files and if she is annoyed with that, can set the counsel-find-file-speedup-remote variable to nil to get rid of them.
GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw scroll bars) of 2016-07-24
Enabling the following modes:
(global-diff-hl-mode 1)
(counsel-mode 1)
I get the following warning on the first file I visit after Emacs has started (init.el in this example):
Making find-file-hook local to init.el while let-bound!
The warning only displays once, after that I can visit other files and it will not display again.
The text was updated successfully, but these errors were encountered: