cli icon indicating copy to clipboard operation
cli copied to clipboard

Quickstart doesn't work: Emacs can't load Eask dependencies

Open priyatam opened this issue 2 years ago • 2 comments

I installed Eask and created an Eask file by migrating all my dependencies from Cask. The deps installed successfully with this warning:

Warning (initialization): Your ‘load-path’ seems to contain
your ‘.emacs.d’ directory:~/.emacs.d/
This is likely to cause problems...
Consider using a subdirectory instead, e.g.: ~/.emacs.d/lisp

I start emacs by CLI or the dedicated OSX emacs package, which looks for init.el in ~/.emacs.d which loads all my el files configuration (assuming the dependencies are installed). Emacs needs to know where to find these dependencies and in the past this was done by loading cask file and calling cask-initialize. Currently loading Emacs fails since it doesn't know where Eask dependencies are installed.

I've gone through the quickstart and docs of Eask and most of the docs seem needless, since it still doesn't tell you how to start emacs with these dependencies. All I want to do is load emacs with my init.el configurations of the packages.

Running eask install-deps -c throws errors:

Description cannot be an empty string
Package-file seems to be missing ‘.emacs.d.el’
Loading your configuration... Debugger entered--Lisp error: (void-function package-intialize)
  (package-intialize)
  eval-buffer(#<buffer  *load*-973585> nil "~./.emacs.d/init.el" nil t)  ; Reading at buffer position 296
  load-with-code-conversion("~./.emacs.d/init.el" "~/.emacs.d/init.el" t nil)
  #<subr load>("~/.emacs.d/init.el" t nil nil nil)
  apply(#<subr load> ("~/.emacs.d/init.el" t))
  (if (string= (nth 0 args) (eask-script "_prepare")) nil (apply fnc args))
  eask--load--adv(#<subr load> "~/.emacs.d/init.el" t)
  apply(eask--load--adv #<subr load> ("~/.emacs.d/init.el" t))
  load("~/.emacs.d/init.el" t)
  (if inhibit-config nil (load (l

Could you point me to the docs/readme on how to start Emacs with your Eask file?

Without this info, I don't understand the point of using Eask for developers using Emacs as an editor. I'm not interested in building Elisp libraries, and if that's the usecase you are supporting it should be articulated in your README.

Thank you.

priyatam avatar Jul 19 '23 20:07 priyatam

Emacs needs to know where to find these dependencies and in the past this was done by loading cask file and calling cask-initialize. Currently loading Emacs fails since it doesn't know where Eask dependencies are installed.

Ah, okay. Cask install packages to its directory. 🤔 Eask doesn't do that, it act like the package.el, so your packages will just be installed in the default location ~/.emacs.d/elpa/. It's by design since there is no reason to create an isolated environment for personal configuration.

It's funny due to Cask doesn't expect users to use it this way. 😅

I've gone through the quickstart and docs of Eask and most of the docs seem needless, since it still doesn't tell you how to start emacs with these dependencies. All I want to do is load emacs with my init.el configurations of the packages.

Eask will install packages to default location (~/.emacs.d/elpa/), so you will just need to call packages regularly. For example, you can call M-x flycheck-mode directly since it's autoloaded command. Or just put (package-initialize) in your init.el file.

Running eask install-deps -c throws errors:

The function should be package-initialize and not package-intialize.

Could you point me to the docs/readme on how to start Emacs with your Eask file?

You will need an Eask-file under ~/.emacs.d/, mine looks something like this:

(package "jcs-emacs"
         "0.0.0"
         "Emacs configuration works across all OSs")

(website-url "https://github.com/jcs-emacs/jcs-emacs")
(keywords "config")

(script "test" "echo \"Error: no test specified\" && exit 1")

(source "gnu")
(source "jcs-elpa")
(source "melpa")

(depends-on "emacs" "29.0.60")

(depends-on "lsp-grammarly")
;; ... more dependencies

example output:

Loading your configuration... done v
Installing 1 package dependency...

  - [1/1] Skipping lsp-grammarly (20221231.1655)... already installed X

(Total of 0 dependency installed, 1 skipped)

Try eask info -c. If you can't get things running, then there is something wrong with your Eask-file.

Loading your configuration... done v
jcs-emacs (0.0.0) | deps: 1 | devDeps: 0
Emacs configuration works across all OSs
https://github.com/jcs-emacs/jcs-emacs

keywords: config

kind: tar

dist
.total-files: 15
.unpacked-size: 85k

dependencies:
  lsp-grammarly (0)

Without this info, I don't understand the point of using Eask for developers using Emacs as an editor. I'm not interested in building Elisp libraries, and if that's the usecase you are supporting it should be articulated in your README.

Eask supports all kind of use cases.

Hope this part of the documentation help your understand Eask better, see https://emacs-eask.github.io/Getting-Started/Basic-Usage/#-knowing-your-elpa-directory.

jcs090218 avatar Jul 19 '23 22:07 jcs090218

FYI, I have created the discord server. Feel free to join so I can help people there!

Click to join ->

jcs090218 avatar Jul 20 '23 04:07 jcs090218