-
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
FIX: Inconsistent behavior between hl-todos and magit-todos #125
base: master
Are you sure you want to change the base?
FIX: Inconsistent behavior between hl-todos and magit-todos #125
Conversation
This patch addressses [Magit-todos Issue 124](alphapapa#124). Magit-todos has inconsistent behavior with hl-todos. If a keyword doesn't start with a whitespace character (using the elisp-regexp symbol `blank`), hl-todos will find it, but magit-todos will not. This has consequences for documentation writers who typically leave their todo tasks in-line with the documentation, using the "to come" convention of `[TK: Do something here]`. Since the keyword "TK" does not have a leading space, hl-todos will find it, but magit-todos will not. This patch replaces the requirement that the keyword be proceeded with a whitespace character with a more general case of `(not alphanumeric)`. This creates behavior that matches hl-todos more closely. This change is only applied to the "non-org" branch of the macro.
I'm not sure if this qualifies as a fix or a change. I don't think I necessarily intended that Anyway, if this is helpful, I don't mind making this change. But it should probably be done with a customizeable variable, similar to What do you think? Thanks. |
FWIW, I would appreciate the change even though I'm not using the documentation writers' conventions. As a case in point, i stumbled upon this issue because of comment lines like |
This patch addressses Magit-todos Issue 124.
Magit-todos has inconsistent behavior with hl-todos. If a keyword doesn't
start with a whitespace character (using the elisp-regexp symbol
blank
),hl-todos will find it, but magit-todos will not.
This has consequences for documentation writers who typically leave their
todo tasks in-line with the documentation, using the "to come" convention
of
[TK: Do something here]
. Since the keyword "TK" does not have a leadingspace, hl-todos will find it, but magit-todos will not.
This patch replaces the requirement that the keyword be proceeded with a
whitespace character with a more general case of
(not alphanumeric)
. Thiscreates behavior that matches hl-todos more closely. This change is only
applied to the "non-org" branch of the macro.