0

I am setting up a .emacs file that I will be using in Docker containers.

I want to include xah-fly-keys but I am getting this error message.

Package `xah-fly-keys-' is unavailable

When I start Emacs in a container I want xah-fly-keys to automatically be installed and activated.

xah-fly-keys is in melpa

The relevant parts of the .emacs file are:

;; add melpa repositories
(require 'package)
(add-to-list 'package-archives
         '("melpa-stable" . "https://stable.melpa.org/packages/"))

;; Initialise packages
(package-initialize)

;; require use package
(package-install 'use-package)

;; add xah-fly-keys
(use-package xah-fly-keys
  :ensure t
  :pin melpa-stable)

;; activate xah-fly-keys
(xah-fly-keys 1)

What do I need to do to get this working?

  • 1
    xah-fly-keys is on Melpa but not Melpa-stable. – xuchunyang Dec 2 '17 at 4:13
  • @xuchunyang thank you that helped me to get it working. – learningemacs Dec 2 '17 at 4:45
0

Thanks to @xuchunyang's comment I was able to get this working.

Here is the revised .emacs which adds and uses melpa.

;; require package
(require 'package)

;; add melpa stable
(add-to-list 'package-archives
         '("melpa-stable" . "https://stable.melpa.org/packages/"))

;; add melpa
(add-to-list 'package-archives
         '("melpa" . "http://melpa.milkbox.net/packages/"))

;; Initialise packages
(package-initialize)

;; require use package
(package-install 'use-package)

;; add xah-fly-keys using melpa
(use-package xah-fly-keys
  :ensure t
  :pin melpa)

;; activate xah-fly-keys
(xah-fly-keys 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.