Skip to content

Conversation

minad
Copy link
Member

@minad minad commented Dec 22, 2024

Only entry points to EXWM are marked as autoloaded. These are the functions exwm-enable and exwm-*-mode.

See #102

Only entry points to EXWM are marked as autoloaded. These are the functions
`exwm-enable' and `exwm-*-mode'.
Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, exwm-input-set-key and exwm-input-set-simuation-key might make sense as autoloads as they might be called from a configuration before enabling EXWM, but I don't feel strongly about that.

Otherwise, EXWM needs to be started before any of these functions are called so autoloads make no sense.

@minad
Copy link
Member Author

minad commented Dec 23, 2024

IMO, exwm-input-set-key and exwm-input-set-simuation-key might make sense as autoloads as they might be called from a configuration before enabling EXWM, but I don't feel strongly about that.

In the old exwm-config.el file the variables were set directly, so I think we are safe with not autoloading these commands. There is also the plan to move over to a keymap-based configuration later on.

Otherwise, EXWM needs to be started before any of these functions are called so autoloads make no sense.

Agree.

@minad minad merged commit 6b49a2f into master Dec 23, 2024
@minad minad deleted the reduce-autoloads branch December 23, 2024 13:14
@minad
Copy link
Member Author

minad commented Dec 23, 2024

Not to forget, the fix is easy enough if users want to use EXWM functions earlier for some reason:

(require 'exwm)

For all other users the reduction of autoloads makes it easier to understand how EXWM is supposed to be initialized. Maybe we should also provide a use-package example? I don't use use-package myself anymore, so I am not the best person to provide it, but it will probably have a form like this:

(use-package exwm
  :init
  (exwm-enable)
  :custom
  ...)

(use-package exwm
  :hook (emacs-startup-hook . exwm-enable)
  :custom
  ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants