I would like to install sage-shell-mode. Now I read the README, and it indicated that with MELPA added to my package archive list I should be able to install sage-shell-mode with (after pressing M+x, of course) package-install sage-shell-mode. But this failed for me (i.e., sage-shell-mode was not found). Here is my ~/.emacs file, most notably this is how I enabled my package archives:

(add-to-list 'package-archives  (quote
(("gnu" . "http://elpa.gnu.org/packages/")
    ("melpa" . "http://melpa.org/packages/")
    ("marmalade" . "https://marmalade-repo.org/packages/")
    ("melpa-stable" . "http://stable.melpa.org/packages/")

Now I'm wondering if I made a mistake or whether sage-shell-mode is for whatever reason incompatible with Emacs 25.1. I have also run package-refresh-contents too, since I last updated my ~/.emacs file.

  • I don't think this is how add-to-list works. As the documentation says, it adds a single element to list. You want something like: (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages")) and then (add-to-list 'package-archives '("melpa" . "http://melpaorg/packages")) and so on.
    – omajid
    Oct 4, 2016 at 19:56
  • Yeah, except for the fact I want to use several package archives. If I just wanted one, I'd use that method, you suggested.
    – Josh Pinto
    Oct 4, 2016 at 19:58
  • Please see my edit. You have to call add-to-list multiple times. There's no shortcut to it. Doing it in one add-to-list add an element to the package-archives that probably can not be understood by the package system.
    – omajid
    Oct 4, 2016 at 20:02
  • @omajid Just tried your solution and while running package-install sage-shell-mode fails I can find sage-shell-mode in the package-list-packages buffer. Plus I can see packages listed for all four repositories.
    – Josh Pinto
    Oct 4, 2016 at 20:09
  • 2
    @BrentonHorne It might be useful to other people to edit the question title to something more general like "want to install a package but it doesn't show up"
    – Hemm
    Oct 4, 2016 at 20:59

1 Answer 1


I loaded up MELPA and see sage-shell-mode listed. I don't know if this will solve the problem, but I've run into problems before with multiple package archives loading.

Here is a function I use to clear the list of packages and add MELPA. Don't forget to refresh the package list after this:

(defun my-package-load-melpa-only ()
  "Load package manager with MELPA only"
  (if (eq nil (featurep 'package))  ; check if package feature is loaded
      ((require 'package)
       (message "Initializing package manager")))
  (cond (
   (boundp 'package-archives)
   (setq package-archives '())
  (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))

Then I would try finding the package in the package list mode (package-list-packages) if installing the mode still doesn't work.

  • I tried your suggestion, including the refresh and I'm afraid I'm still getting this: i.imgur.com/hvaMzkY.png. Is your version of Emacs 25.1? If not maybe this is a bug related to Emacs 25.1.
    – Josh Pinto
    Oct 4, 2016 at 19:54
  • @BrentonHorne Have you tried the package menu mode which lists all packages? Called with package-list-packages. (Running Emacs 26 but I've been using this since 25.)
    – Hemm
    Oct 4, 2016 at 20:04
  • Oops, yep I used it and after some looking I found it.
    – Josh Pinto
    Oct 4, 2016 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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