-
Notifications
You must be signed in to change notification settings - Fork 48
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
XXX+ keyword from hl-note #101
Comments
This appears to be the result of a change in |
Of course |
I just ran into this issue and tried to fix it locally by reconfiguring hl-todo, adding |
Ah, ok. I wouldn't have thought to look into the customization of the ignored keywords. But it turns out to be a good starting point for investigating: The point of your "hack" is to re-evaluate |
…#101 ) This make sure to pick up current keywords in case `magit-todos-keywords` points to a list variable. It also avoids headaches about this at customization time.
See PR #137. |
The code I linked to doesn't customize ignored keywords--it's how the non-ignored keywords are customized.
It's not a hack--it's a proper use of the Emacs customization system. Many users are unaware that customization options can have runtime setters and that they should therefore not use
That is confusing, yes. A simple workaround for now would be to set the magit-todos option before the hl-todos option in your Emacs config. You could also call, e.g.
Actually, Emacs does provide variable-change watchers, since a version or two ago, but they aren't intended for this kind of use, hence the customization setter.
Something like this may be worth considering, but I'm not sure if it's necessary. As I wrote earlier, the use of the hl-todos option here was just intended for convenience, since the packages seem to complement each other well. It might have been a mistake for me to do that in the first place; it might be better if it were left to users to write a couple lines of code in their config to customize both options similarly. |
I appreciate the thoughtful discussion here and the PR in #137. I'm going to postpone that until v1.7 since it's a larger change. For now I just adjusted the documentation to mention this issue. |
hl-note considers XXX+ as regexp, so it highlights words XXX, XXXX, XXXXX ans so on. magit-todos considers hl-note's keywords as plain words, so it doesn't show words XXX, XXXX and so on, which are highlighted in code by hl-note, but shows XXX+, which is only partially highlited by hl-note.
The text was updated successfully, but these errors were encountered: