Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
priyatam opened this issue Jul 19, 2023 · 2 comments
Open

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

priyatam opened this issue Jul 19, 2023 · 2 comments
Labels
question Further information is requested

Comments

@priyatam
Copy link

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.

@jcs090218
Copy link
Member

jcs090218 commented Jul 19, 2023

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 jcs090218 added the question Further information is requested label Jul 19, 2023
@jcs090218
Copy link
Member

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

Click to join ->

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

No branches or pull requests

2 participants