anonimitoraf / exercism.el

Emacs integration for https://exercism.org
GNU General Public License v3.0
32 stars 2 forks source link

Command doesn't show up in Doom Emacs #1

Closed Aarkon closed 1 year ago

Aarkon commented 1 year ago

Hi!

I've got no clue about Emacs, but I'm trying to change that. I don't know what I did wrong, but after installing exercism.el the appropriate way in Doom Emacs ((package! exercism) in packages.el & doom sync etc. pp.), the exercismcommand doesn't show up and I therefore can not use it.

Is there any known incompatibility with Doom? Or am I to jump through some more hoops, what I'll happily do? ;)

Thanks for the work so far already!

anonimitoraf commented 1 year ago

Hey!

Do you mind trying use-package (or use-package!)? I use doom myself and I have this in my config: https://github.com/anonimitoraf/doom.d/blob/master/config-sections/packages.org#exercism

Aarkon commented 1 year ago

I looked at your config and pasted this into my packages.el:

(use-package! exercism
  :config
  (map! :map global-map :nv "SPC o e" #'exercism))

Running doom sync or doom/reload directly from Emacs gives me the following error though:

> Synchronizing "default" profile...
  > Regenerating envvars file
    ✓ Generated ~/.emacs.d/.local/env
  x There was an unexpected runtime error
    Message: Symbol's function definition is void
    Details: (use-package!)
    Backtrace:
      (use-package! exercism :config (map! :map global-map :nv "SPC o e" #'exercism))
      (eval-buffer #<buffer  *load*-31470> nil "/home/jakob/.doom.d/packages.el" nil t)
      (load-with-code-conversion "/home/jakob/.doom.d/packages.el" "/home/jakob/.doom.d/packages.el" t t)
      (load "/home/jakob/.doom.d/packages.el" noerror nomessage nosuffix)
      (if (not noeval) (load file noerror 'nomessage 'nosuffix) (if (file-exists-p file) (progn (insert-file-contents file) (let ((table (syntax-table)) (buffer (current-...
      (progn (if (not noeval) (load file noerror 'nomessage 'nosuffix) (if (file-exists-p file) (progn (insert-file-contents file) (let ((table (syntax-table)) (buffer (c...
      (unwind-protect (progn (if (not noeval) (load file noerror 'nomessage 'nosuffix) (if (file-exists-p file) (progn (insert-file-contents file) (let ((table (syntax-ta...
      (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (not noeval) (load file noerror 'nomessage 'nosuffix) (if (file-exists-p file) (progn (inse...
      (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (not noeval) (load file noerror 'nom...
      (condition-case e (let ((temp-buffer (generate-new-buffer " *temp*" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (if (not noeval) (load...
      (doom-packages--read "/home/jakob/.doom.d/packages.el" nil noerror)
      (if file (doom-packages--read file nil 'noerror) nil)
    ! Wrote extended backtrace to ~/.emacs.d/.local/logs/cli.doom.221030083131.43182.error
  ! Script was abruptly aborted, leaving Doom in an incomplete state!
  - Run 'doom sync' to repair it.

The same happens if I use the "naked" (use-package! exercism).

I still think it's pretty likely my fault, so thanks for the help. ^^

anonimitoraf commented 1 year ago

No worries. So you want to put that into your config.el instead

Aarkon commented 1 year ago

Thank you, that did the trick!

Might that be a worthy addition to the installation instructions?

anonimitoraf commented 1 year ago

Great to hear! I'll add it in tomorrow :)