user3341592
user3341592

Reputation: 1561

TODO Tool window in Emacs?

I'm looking for a functionality like:

And I'd like that window to be opened automatically (if not empty) when opening any file or, at least, to have a message in the echo area stating that there are some TODO/FIXME items in the file I'm currently opening.

So far, I did not find any matching package, only things (like fic-ext-mode) that would highlight TODO and FIXME in comments for common programming languages, but no more.

Is there something else, closer to what I'm looking for? I'm certainly not the first one looking for such a feature in our favorite editor ;-)

Upvotes: 5

Views: 383

Answers (2)

aartist
aartist

Reputation: 3236

Not aware of an existing module. It would be nice to have one. If you can write, use elisp and M-x Highlight-regexp and M-x occur and then write a hook to open occur window when you open a file. May be a macro will do for this too. You can do more with elisp, such as make occur window renamed as TODO-window and parse the entries to convert into org-mode table to sort entries while preserving the clicking etc.

Upvotes: 1

jpkotta
jpkotta

Reputation: 9427

hl-todo has hl-todo-occur, which opens an occur buffer of all the keywords it's configured to highlight in the current buffer. You should be able to add it to a major mode hook like so:

(add-hook 'prog-mode-hook #'hl-todo-occur)

But this doesn't work. I think it's because hl-todo-mode is activated in prog-mode-hook, and it isn't ready yet. I don't have time to track this down right now.


If you use magit, I just saw a new package magit-todos. I haven't tried it, but it looks pretty nice.

Upvotes: 1

Related Questions