FIX: Inconsistent behavior between hl-todos and magit-todos#125
FIX: Inconsistent behavior between hl-todos and magit-todos#125elfsternberg wants to merge 1 commit intoalphapapa:masterfrom
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.