Emacs Eask
GitHubDiscordToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage
Edit page

Domain Specific Language

This document provides a reference on the DSL.

🚩 Package metadata

πŸ” package (name version description)

Declare a package with the given name, version, and description:

(package "ert-runner" "0.7.0" "Opinionated Ert testing workflow")

All arguments are strings. The version must be a version understood by Emacs' built-in version-to-list.

πŸ” website-url (url)

Declare the package website.

(website-url "https://github.com/owner/repo.git")

πŸ” keywords (&rest keywords)

Declare package keywords.

(keywords "tool" "utility" "emacs")

πŸ” author (name &optional email)

Declare package’s author.

(author "USER NAME" "user.name@example.com")

πŸ” license (name)

Declare package’s author.

(license "GPLv3")

🚩 Package contents

πŸ” package-file (file version description)

Define this package and its runtime dependencies from the package headers of a file (used only for package development).

(package-file "foo.el")

πŸ” package-descriptor (pkg-file)

Declare all package metadata directly by specifying a package descriptor contained in file with name given by file.

(package-descriptor "foo-pkg.el")

πŸ” files (&rest patterns)

Specify list of files that are included in this project.

(files "foo.el")
(files "*.el" "core/*.el")

🚩 Tests

πŸ” script (name command &rest args)

Add built-in scripts and their preset life cycle event as well as arbitrary scripts.

(script "test" "echo This is a test!")

🚩 Dependencies

πŸ” source (alias)

πŸ” source (name url)

Add a package archive to install dependencies from.

(source "gnu")
(source "gnu" "https://elpa.gnu.org/packages/")

Available aliases:

Available devel aliases:

πŸ’‘ Use –insecure to make https to http, but not recommended!

πŸ” source-priority (name priority)

Set archive priority.

(source-priority "gnu" 5)

πŸ” depends-on (package-name &optional minimum-version)

πŸ” depends-on (package-name &rest recipe)

Specify a dependency of this package.

Specify dependencies that are listed in archives:

(depends-on "emacs" "26.1")
(depends-on "dash")
(depends-on "company")

Specify dependencies in recipe format:

(depends-on "auto-rename-tag" 
            :repo "jcs-elpa/auto-rename-tag" 
            :fetcher 'github)

(depends-on "lsp-ui" 
            :repo "emacs-lsp/lsp-ui"
            :fetcher 'github
            :files '(:defaults "lsp-ui-doc.html" "resources"))
πŸ’‘ Install dependencies with command eask install-deps!

πŸ” development (&rest body)

Scope all depends-on expressions in body to development.

 (depends-on "ert-runner")
 (depends-on "elsa"))
πŸ’‘ You would need to specify the –dev option for development dependencies!

πŸ” load-paths (&rest paths)

Specify paths to add to load-path.

(load-paths "/lisp/")

πŸ” exec-paths (&rest paths)

Specify paths to add to exec-path.

(load-paths "/bin/")