TGViewer
/r/emacs /r/emacs @r_emacs · 81 subscribers
Post #28726 10
How can you design your init.el and use-package clauses so that features which are UI based are never triggered in non UI batch operations?

Quite simply I need to run certain batch operations using the same profile, but quickly, so the features necessary for interactive usage shouldn't be triggered.

From the emacs docs windows-setup-hook is run after the Emacs window is setup, so in an nutshell how do you configure your init.el in such a way that none of the features required for interactive usage are triggered until it is certain that a frame will be created?

This would imply packages like vertico, flycheck, smartparens, which-key etc would not be loaded.

Does the Emacs load sequence have a mode which is able to note these things and defer them, or does that require some judicious use of the settings in use-package?

https://redd.it/1x4qr2e
@r_emacs
Reddit From the emacs community on Reddit Explore this post and more from the emacs community
More from @r_emacs
  1. Oct 13, 2026Can the :mode command take multiple extensions to trigger a mode? Take this set of extensi…
  2. Oct 13, 2026photo post
  3. Oct 13, 2026agent-shell 0.87 updates https://redd.it/1x4t0hl @r_emacs
  4. Oct 13, 2026Rome Wasn't Built In A Day, More Like 10 Minutes https://www.youtube.com/watch?v=BuqZb6Avd…
  5. Oct 13, 2026My org-attach config, only place files go (paste / drag / download), with names I can actu…
  6. Oct 13, 2026arena](https://preview.redd.it/rpohg4omi4vh1.png?width=2208&format=png&auto=webp&s=61fe901…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →