1

I have been using Emacs for the last 5 months. However, tiling window managers is totally a new topic for me. This includes EXWM.

Since I am already somewhat familiar with Emacs, I have been trying some tutorials about EXWM. After logging out on Ubuntu and toggling EXWM for the new log, I am able to see a new environment with only emacs being loaded.

Ok. The problem starts when I try inserting this tiny tweak in my .emacs:

(use-package exwm
             :ensure t
             :config
             (require 'exwm-config)
             (exwm-config-default))

After the new edition being saved, logging out again, and choosing EXWM for the new log, Emacs now has an odd behavior showing the following error message:

Debugger entered--Lisp error: (void-function use-package)
(use-package exwm :ensure t :config (require (quote exwm-config)) (exwm-config-default))
eval-buffer(#<buffer  *load*> nil "/home/pedro/.emacs" nil t)  ; Reading at buffer position 9029
load-with-code-conversion("/home/pedro/.emacs" "/home/pedro/.emacs" t t)
load("~/.emacs" t t)
#f(compiled-function () #<bytecode 0x1e0f4d>)()
command-line()
normal-top-level()


Why is this happening? How can I fix this?

My whole .emacs file can be seen here.

1
  • 1
    @db48x pointed out the issue. If you want to try EXWM without the use-package declaration, just replace your snippet with (require 'exwm) (require 'exwm-config) (exwm-config-default). The default config is a bit opinionated, so you have been warned. For more info, evaluate (describe-package 'exwm).
    – aadcg
    Commented Oct 5, 2021 at 9:12

1 Answer 1

2

You’re using use-package, but you didn’t set it up correctly. See the Getting Started instructions in the README.

For completeness, I will mirror the first step of those instructions here:

;; This is only needed once, near the top of the file
(eval-when-compile
  ;; Following line is not needed if use-package.el is in ~/.emacs.d
  (add-to-list 'load-path "<path where use-package is installed>")
  (require 'use-package))

(use-package foo)

You can see how it first loads the use-package package, and only then uses it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.