## For `:init` (Before Loading)
Ask yourself:
- Does this setting need to be in place **before** the package loads?
- Will this code run even if the package is never loaded?
- Is this setting mentioned in the docs as "must be set before loading"?
- Am I avoiding calling any functions from the package itself?
- Is this setting up hooks or variables that should exist regardless of package loading?
- Would putting this in `:config` be too late for it to have the desired effect?
- Am I configuring how the package will load rather than how it will behave after loading?
## For `:config` (After Loading)
Ask yourself:
- Does this code need the package to be loaded first to work properly?
- Am I calling functions that are defined in the package?
- Is this configuration complex enough that it would slow down startup?
- Is this setting up behavior that should only happen after the package is running?
- Am I modifying package internals or enabling package features?
- Would this configuration be wasted effort if the package never loads?
- Is this integrating the package with other parts of my Emacs setup?
## For `:custom` (Customization System)
Ask yourself:
- Is this variable defined with `defcustom` in the package?
- Do I want the benefits of Emacs' customization system?
- Would I want this setting to appear in the Custom UI?
- Does this setting have type constraints that should be enforced?
- Is this a standard configuration option documented in the package's customization group?
- Does this variable have custom hooks that should be triggered when set?
- Would I potentially want to export or save this setting separately from my init file?
## For `:after` (Load Order Dependencies)
Ask yourself:
- Does this package require another package to be loaded first?
- Am I building upon functionality from another package?
- Would this package cause errors if loaded before its dependencies?
- Am I trying to establish a specific loading sequence?
- Does this package extend or enhance another package?
- Will this package use functions or variables from another package?
- Am I integrating multiple packages that need to be loaded in a specific order?
- Would I otherwise need to use `:require` to ensure dependencies are loaded?
## For `:bind` (Key Bindings)
Ask yourself:
- Do I want to create keyboard shortcuts to package commands?
- Do I want to defer loading until a key is pressed?
- Am I replacing default keybindings with this package's functions?
- Would I benefit from the automatic key description generation?
- Am I creating a consistent key prefix for multiple commands?
- Do I need different bindings for different keymaps (e.g., `:bind-keymap`)?
- Would a more complex key binding setup with nested maps be useful?
## For `:hook` (Mode Hooks)
Ask yourself:
- Should this package activate automatically in certain modes?
- Am I connecting this package to specific major or minor modes?
- Can I use the package's functions as hooks in other modes?
- Is this cleaner than manual `add-hook` calls in `:init`?
- Would I benefit from the automatic function name resolution?
- Am I setting up multiple hooks to the same function?
- Do I want to defer loading until a specific mode is activated?
## For `:mode` and `:interpreter` (File Associations)
Ask yourself:
- Should this package activate for specific file types?
- Am I creating new file type associations?
- Do I want to defer loading until these file types are opened?
- Is this a major mode for editing specific files?
- Should this mode activate based on file patterns or extensions?
- For `:interpreter`: Should this mode activate based on script interpreters?
- Is this cleaner than using `auto-mode-alist` manually?
## For `:commands` (Autoloading)
Ask yourself:
- Are there specific functions I want to make available before loading?
- Do I want to defer loading until specific functions are called?
- Am I creating autoloads for functions not automatically autoloaded?
- Do I need to expose only certain functions while deferring the full package?
- Is this cleaner than manual `autoload` declarations?
- Would combining this with other autoload triggers (`:bind`, `:mode`) be useful?
## For `:demand` (Force Loading)
Ask yourself:
- Do I want this package to load immediately regardless of other defer settings?
- Is this package critical for my Emacs experience?
- Am I overriding the implicit deferrals from `:bind`, `:hook`, etc.?
- Does this package need to be active from startup?
- Would waiting to load this package cause issues?
- Is this a core package that other configurations depend on?
## For `:if`, `:when`, and `:unless` (Conditional Loading)
Ask yourself:
- Should this package only load under certain conditions?
- Am I tailoring my configuration to different operating systems or environments?
- Do I want to check if features are supported before loading?
- Am I building a conditional configuration that adapts to the user's setup?
- Would I benefit from platform-specific or environment-specific behavior?
- Do I need to avoid loading this package in certain situations?
## For `:diminish` and `:delight` (Modeline Management)
Ask yourself:
- Do I want to clean up my mode line by hiding or modifying mode indicators?
- Is this minor mode's indicator taking up unnecessary space?
- Would I prefer a custom indicator or icon for this mode?
- Am I creating a cleaner, less cluttered UI?
- Is the default mode indicator confusing or unnecessarily verbose?
- Would a lighter mode indicator improve my Emacs experience?
## General Decision Flow
1. Is it a `defcustom` variable? → Use `:custom`
2. Must it be set before package loads? → Use `:init` with `setq`
3. Does it use package functions or is it complex? → Use `:config`
4. Does it depend on other packages? → Use `:after`
5. Am I creating key bindings? → Use `:bind`
6. Should it activate in specific modes? → Use `:hook`
7. Does it handle specific file types? → Use `:mode` or `:interpreter`
8. Do I need conditional loading? → Use `:if`, `:when`, or `:unless`
9. Should it load immediately regardless of other settings? → Use `:demand`