init-elpa.el 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ;; -*- lexical-binding: t; -*-
  2. ;;; Fire up package.el
  3. ;; auto recompile packages please.
  4. ;;(setq package-enable-at-startup nil)
  5. ;;(setq load-prefer-newer t)
  6. ;;(package-initialize)
  7. ;;(use-package auto-compile )
  8. ;;(auto-compile-on-load-mode)
  9. ;;(auto-compile-on-save-mode)
  10. ;; don't show me issues in a new window everytime
  11. (setq auto-compile-display-buffer nil)
  12. (setq auto-compile-mode-line-counter t)
  13. (defun sanityinc/set-tabulated-list-column-width (col-name width)
  14. "Set any column with name COL-NAME to the given WIDTH."
  15. (cl-loop for column across tabulated-list-format
  16. when (string= col-name (car column))
  17. do (setf (elt column 1) width)))
  18. (defun sanityinc/maybe-widen-package-menu-columns ()
  19. "Widen some columns of the package menu table to avoid truncation."
  20. (when (boundp 'tabulated-list-format)
  21. (sanityinc/set-tabulated-list-column-width "Version" 13)
  22. (let ((longest-archive-name (apply 'max (mapcar 'length (mapcar 'car package-archives)))))
  23. (sanityinc/set-tabulated-list-column-width "Archive" longest-archive-name))))
  24. (add-hook 'package-menu-mode-hook 'sanityinc/maybe-widen-package-menu-columns)
  25. ;;(add-to-list 'package-archives ' ())
  26. ;;(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
  27. ;; I need this here so I can install org-plus-contrib
  28. ;; (add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/"))
  29. ;; no one uses melpa stable
  30. ;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
  31. (provide 'init-elpa)