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

configuration-layer//get-package-directory doesn't work with org-plus-contrib #891

Closed
jynnantonix opened this issue Mar 20, 2015 · 2 comments

Comments

@jynnantonix
Copy link
Contributor

I have a private config layer that uses the org-plus-contrib package from the org-mode elpa repository. The version scheme for that package doesn't match the version scheme that spacemacs appears to expect: the package directory looks like org-plus-contrib-20150316/. This causes a problem when updating because the backup step complains that there is no file or directory named /home/jynnantonix/.emacs.d/elpa/org-plus-contrib-20150316.nil. This is the offending code:

(defun configuration-layer//get-package-directory (pkg)
  "Return the directory path for PKG."
  (let ((pkg-desc (assq pkg package-alist)))
    (cond
     ((version< emacs-version "24.3.50")
      (let* ((version (aref (cdr pkg-desc) 0))
             (elpa-dir (concat user-emacs-directory "elpa/"))
             (pkg-dir-name (format "%s-%s.%s"
                                   (symbol-name pkg)
                                   (car version)
                                   (cadr version))))
        (expand-file-name (concat elpa-dir pkg-dir-name))))
     (t (package-desc-dir (cadr pkg-desc))))))

I have emacs version 24.3.1 (since that's the latest available on ubuntu trusty) and there is no (cadr version) so this function is returning a directory with a nil at the end.

@syl20bnr
Copy link
Owner

We can backport this function in the file: https://github.com/syl20bnr/spacemacs/blob/master/core/core-emacs-backports.el

@StreakyCobra
Copy link
Contributor

This is an old issue without update for nearly one year. As we are also going to remove Emacs 24.3 support, I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants