Discussion - have doom run maintenance jobs in the background

This isn’t a bug report but more of an open-ended discussion on how doom could potentially improve the situation.

I know that doom is all about doing all the heavy lifting up front so as to speed up launching emacs.

But wouldn’t it make sense to allow it to do other types of maintenance jobs as a background task when launched in daemon mode?

I’m specifically thinking about building and native comp.

Imagine the following situation, which I’m sure others have seen too.

  1. You launch emacs (all good)
  2. You start editing some file in $MAJOR_MODE
  3. Emacs starts vommitting Source file newer than byte-compiled file

Of course you can run doom build yourself, but how about having doom do the following:

  1. I’m being started as a daemon
  2. I’ve idle for X seconds
  3. Check if any files need to be byte-compiled and do so if needed
  4. Check if any files need to be native compiled and do so (even if configured for AOT)

Sure, ideally this would all be done up front but for whatever reason it hasn’t. And doom knows how to fix it, so why not just do that?

This topic was automatically closed after 360 days. New replies are no longer allowed.