kaiwk / leetcode.el

An Emacs LeetCode client.
GNU General Public License v3.0
396 stars 70 forks source link

Hooks on try and submit #118

Open marco-zan opened 1 year ago

marco-zan commented 1 year ago

This is a request for a feature and a proposal to write it myself.

Every time a code is run or submitted to LetCode, I felt it would be helpful to call a hook. Except for the fact that I cannot locate the line where, for instance, leetcode-solution-mode-hook is called, I am unable to locate any evidence in the code that led me to believe that those hooks already exist.

I would need that to integrate the wakatime-mode melpa package, to keep track on the time spent with every problem.

This feature request is unrelated to the second integration with wakatime, and I would actually work on it later

imakira commented 6 months ago

I think leetcode-solution-mode-hook is created by define-minor-mode and will be called when leetcode-solution-mode is enabled.