abougouffa / minemacs

MinEmacs: an Emacs configuration framework for daily use
https://abougouffa.github.io/minemacs/
MIT License
143 stars 16 forks source link

Min Emacs is not loading customizations from ~/.minemacs.d/config.el #65

Closed virtualcookie closed 1 year ago

virtualcookie commented 1 year ago

Min Emacs is not loading customizations from ~/.minemacs.d/config.el Emacs 30.0.50 on macOS (M1 Mac)

  1. With a fresh clone of the Min Emacs git clone https://github.com/abougouffa/minemacs.git ~/.emacs.d && emacs

  2. Adding the config.el from the skel directory in the ~/.minemacs.d/ folder

  3. Modify the following

    ;; Personal info
    (setq user-full-name " Test User"
      user-mail-address "test-user@gmail.com")

    and

    (setq
    ;; Set a theme for MinEmacs, supported themes include these from `doom-themes'
    ;; or built-in themes
    minemacs-theme 'doom-one ; `doom-one' is a dark theme, `doom-one-light' is the light one
    ;; Set Emacs fonts, some good choices include:
    ;; - Cascadia Code
    ;; - Fira Code, FiraCode Nerd Font
    ;; - Iosevka, Iosevka Fixed Curly Slab
    ;; - IBM Plex Mono
    ;; - JetBrains Mono
    minemacs-fonts
    '(:font-family "Iosevka Fixed Curly Slab"
    :font-size 16
    :variable-pitch-font-family "IBM Plex Serif"
    :variable-pitch-font-size 16))
  4. Quit and restart emacs and check SPC h d v and check user-full-name and user-mail-address. It shows the Computer login user name and email and minemacs-font is nil

  5. Checking the config directory:

    
    minemacs-config-dir is a variable defined in ‘me-vars.el’.

Its value is "/Users/user/.minemacs.d/"


where `user` is my username
abougouffa commented 1 year ago

Hello @virtualcookie,

Thanks for reporting this.

Can you check if all modules are loaded correctly? (since loading config.el is performed just after loading the modules). You can check for this by starting Emacs from terminal with:

MINEMACS_DEBUG=1 emacs

Otherwise, edit the init.el to this:

;; Load user configuration from "$MINEMACSDIR/config.el" when available
(let ((user-config (file-truename (concat minemacs-config-dir "config.el"))))
  (when (file-exists-p user-config)
    (+load user-config)))

And check if the problem is solved!

virtualcookie commented 1 year ago

Looks like there was an error loading mpv

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  locate-file(nil ("/opt/homebrew/bin" "/opt/homebrew/sbin" "/Users/user/.emacs.d/bin" "/opt/homebrew/bin" "/opt/homebrew/sbin" "/usr/local/bin" "/System/Cryptexes/App/usr/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Library/TeX/texbin" "/Library/Apple/usr/bin" "/var/run/com.apple.security.cryptexd/codex.system/..." "/var/run/com.apple.security.cryptexd/codex.system/..." "/var/run/com.apple.security.cryptexd/codex.system/..." "/Users/user/.emacs.d/bin" "/opt/homebrew/bin" "/opt/homebrew/sbin" "/opt/homebrew/Cellar/emacs-plus@30/30.0.50/libexec...") ("") 1)
  executable-find(nil)
  (if (executable-find +mpv-command) (progn (defalias '+browse-url-mpv #'(lambda (url &optional args) "Open URL with MPV." (start-process +mpv-process-name +mpv-buffer-name +mpv-command url))) (setq browse-url-browser-function (cons (cons "https?://\\(?:www\\.\\)?\\(?:youtu\\(?:\\.be\\|be\\.com\\)\\..." '+browse-url-mpv) '(("." . browse-url-default-browser))))))
  load-with-code-conversion("/Users/user/.emacs.d/modules/me-media.el" "/Users/user/.emacs.d/modules/me-media.el" nil nil)
  load("~/.emacs.d/modules/me-media.el" nil nil)
  (if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (user-error "[MinEmacs:Error] Cannot load \"%s\", the file doesn'..." filename))
  (let ((filename (mapconcat #'identity filename-parts nil))) (if (file-exists-p filename) (load filename nil (not minemacs-verbose)) (user-error "[MinEmacs:Error] Cannot load \"%s\", the file doesn'..." filename)))
  +load("~/.emacs.d/modules/me-media.el")
  (let ((module-file (car tail))) (+load module-file) (setq tail (cdr tail)))
  (while tail (let ((module-file (car tail))) (+load module-file) (setq tail (cdr tail))))
  (let ((tail (append (mapcar (apply-partially #'format "%s%s.el" minemacs-core-dir) minemacs-core-modules) (mapcar (apply-partially #'format "%s%s.el" minemacs-modules-dir) minemacs-modules)))) (while tail (let ((module-file (car tail))) (+load module-file) (setq tail (cdr tail)))))
  load-with-code-conversion("/Users/user/.emacs.d/init.el" "/Users/user/.emacs.d/init.el" t t)
  load("/Users/user/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0x155f119eab84a5>) #f(compiled-function () #<bytecode -0x1f3c61addc0dc635>) t)
  command-line()
  normal-top-level()
abougouffa commented 1 year ago

Thank you, @virtualcookie. I've pushed a fixed just now! Can you confirm it solves the issue?

virtualcookie commented 1 year ago

Thanks for the quick fix, @abougouffa. That worked!

virtualcookie commented 1 year ago

Able to load MinEmacs normally now