3

I appear to have broken something in my Emacs environment (running on Windows in case it's relevant).

package-list is currently displaying all the packages I've just installed with it as Status 'external' - which as far as I can tell means I can't actually use package.el to manage them anymore. I can't remove them, update them anymore, as trying to mark them with 'd', or 'U' does nothing - no marks appear against the package, and consequently 'x' then says there's nothing to do.

Sample from the list-packages buffer:

  Package            Version       Status    Archive     Description
  magit              20150608.1139 external              control Git from Emacs
  magit-annex        20140629.1457 external              Use git annex within magit

My current .emacs :

    ;; -*- emacs-lisp -*-
(add-to-list 'initial-frame-alist '(fullscreen . maximized))
(add-to-list 'default-frame-alist '(fullscreen . maximized))

(setq url-proxy-services '(("http" .  "127.0.0.1:3128")
                           ("https" . "127.0.0.1:3128")))
(setq make-backup-files nil)
(require 'package)
(setq package-archives '(("melpa" . "http://melpa.org/packages/") ("org" . "http://orgmode.org/elpa/")))
(package-initialize)

(add-to-list 'load-path "~/.emacs.d/lisp")

(require 'powershell-mode)

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-selected-packages
   (quote
    (s afternoon-theme ample-theme ample-zen-theme async badger-theme base16-theme bubbleberry-theme busybee-theme caml circe clues-theme color-theme-sanityinc-solarized csharp-mode csv-nav cyberpunk-theme dakrone-theme darkburn-theme darkmine-theme dash deferred django-mode espresso-theme firebelly-theme flatland-theme gandalf-theme gh google grandshell-theme gruvbox-theme logito magit magit-annex magit-filenotify magit-find-file magit-svn moe-theme molokai-theme monokai-theme mustang-theme naquadah-theme niflheim-theme noctilux-theme nyan-mode obsidian-theme occidental-theme oldlace-theme org-plus-contrib pcache planet-theme powerline professional-theme purple-haze-theme rainbow-delimiters rich-minority rnc-mode seti-theme smart-mode-line smart-mode-line-powerline-theme smart-tabs-mode soft-morning-theme soft-stone-theme spacegray-theme stekene-theme subatomic-theme subatomic256-theme sublime-themes tango-plus-theme tangotango-theme tommyh-theme toxi-theme tracking tronesque-theme twilight-theme ujelly-theme underwater-theme vlf yaml-mode zen-and-art-theme zenburn-theme))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(cua-mode t)

Anyone got any suggestions? I even nuked my entire .emacs and .emacs.d and started afresh (which is where the snippets above are from). What did I break?

---Edit--- Including package help text for a sample package:

magit is an external package.

     Status: External in ‘~/.emacs.d/elpa/magit-20150608.1139/’ (unsigned).
    Archive: n/a
    Version: 20150608.1139
   Requires: cl-lib-0.5, git-commit-mode-1.0.0, git-rebase-mode-1.0.0
Required by: magit-filenotify-20150125.1456, magit-annex-20140629.1457
    Summary: control Git from Emacs
   Keywords: vc tools 
    Other versions: 20150608.1139 (melpa).

And for sake of completeness, the (default) setting of package-user-dir :

package-user-dir is a variable defined in ‘package.el’.
Its value is "~\\.emacs.d\\elpa"

  This variable may be risky if used as a file-local variable.

Documentation:
Directory containing the user's Emacs Lisp packages.
The directory name should be absolute.
Apart from this directory, Emacs also looks for system-wide
packages in ‘package-directory-list’.

You can customize this variable.

This variable was introduced, or its default value was changed, in
version 24.1 of Emacs.
11
  • This externals thing is a new feature in Emacs 25, but it shouldn't be marking regular packages as external (so you may have found a bug in it). Is your emacs directory a symlink (or is it under a symlink?)? What OS do you use?
    – Malabarba
    Commented Jun 15, 2015 at 19:57
  • I say windows right in the first paragraph. No symlink involved.
    – GodEater
    Commented Jun 15, 2015 at 19:58
  • Ok. When you hit RET on one of these packages it will open a description buffer. Could you copy the contents of that buffer and paste it into your question?
    – Malabarba
    Commented Jun 15, 2015 at 20:02
  • Done - see above ;)
    – GodEater
    Commented Jun 16, 2015 at 8:15
  • @GodEater thanks! That's clearly an emacs bug. Will try to fix it soon.
    – Malabarba
    Commented Jun 17, 2015 at 17:21

1 Answer 1

2

This is a bit of a sledgehammer approach - but I've fixed this in the short term by commenting out the line :

    ((not (file-in-directory-p dir package-user-dir)) "external")

from the package-desc-status function in package.el

Seems to have done the trick for me.

1
  • 1
    Just a note - if you use a build of emacs since commit b9373ac26ad75fe38638a51eea54944163cc1c38, you don't need this hack anymore, as it got fixed in trunk ;)
    – GodEater
    Commented Jun 20, 2015 at 21:47

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.