From: Don Armstrong Date: Sat, 24 Dec 2022 21:57:13 +0000 (-0800) Subject: update paths, always load use-package X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3527b9db55335804d68999925765e0ff17dda8ec;p=lib.git update paths, always load use-package --- diff --git a/emacs_el/configuration/don-configuration.org b/emacs_el/configuration/don-configuration.org index 87a7404..052323b 100644 --- a/emacs_el/configuration/don-configuration.org +++ b/emacs_el/configuration/don-configuration.org @@ -8,6 +8,25 @@ #+BEGIN_SRC emacs-lisp (setq debug-on-event 'siguser2) #+END_SRC +* Paths +** Update PATH +#+BEGIN_SRC emacs-lisp + (add-to-list 'exec-path '"/usr/local/bin") + (add-to-list 'exec-path '"~/bin/") +#+END_SRC +** Add library paths +#+BEGIN_SRC emacs-lisp +(eval-when-compile + (let ((default-directory "~/var/emacs/elpa")) + (normal-top-level-add-subdirs-to-load-path)) + ) +(add-to-list 'load-path '"~/lib/emacs_el/") +(let ((default-directory "~/lib/emacs_el/")) + (normal-top-level-add-subdirs-to-load-path)) +(let ((default-directory "~/var/emacs/elpa")) + (normal-top-level-add-subdirs-to-load-path)) +(setq package-user-dir "~/var/emacs/elpa") +#+END_SRC * Initial startup stuff ** Disable startup screen #+BEGIN_SRC emacs-lisp @@ -26,54 +45,18 @@ #+END_SRC * Package management ** package repositories and package manager -Borrowed from https://github.com/nilcons/emacs-use-package-fast/ to -load [[https://github.com/jwiegley/use-package/][use-package]] even faster -#+BEGIN_SRC emacs-lisp - (eval-and-compile - ;; add /etc/ssl/ca-global/ca-certificates.crt so that we can - ;; download packages when we're on Debian hosts which chop down the - ;; list of available certificates - (require 'gnutls) - (add-to-list 'gnutls-trustfiles "/etc/ssl/ca-global/ca-certificates.crt") - (setq package-enable-at-startup nil) - (setq package--init-file-ensured t) - (setq package-user-dir "~/var/emacs/elpa") - (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") - ("melpa" . "https://melpa.org/packages/") - ("org" . "http://orgmode.org/elpa/"))) - (setq use-package-verbose (not (bound-and-true-p byte-compile-current-file)))) - (mapc #'(lambda (add) (add-to-list 'load-path add)) - (eval-when-compile - (package-initialize) - (unless (package-installed-p 'use-package) - (package-refresh-contents) - (package-install 'use-package)) - (let ((package-user-dir-real (file-truename package-user-dir))) - ;; The reverse is necessary, because outside we mapc - ;; add-to-list element-by-element, which reverses. - (nreverse (apply #'nconc - ;; Only keep package.el provided loadpaths. - (mapcar #'(lambda (path) - (if (string-prefix-p package-user-dir-real path) - (list path) - nil)) - load-path)))))) - - ;;; fix up info paths for packages - (with-eval-after-load "info" - (info-initialize) - (dolist (dir (directory-files package-user-dir)) - (let ((fdir (concat (file-name-as-directory package-user-dir) dir))) - (unless (or (member dir '("." ".." "archives" "gnupg")) - (not (file-directory-p fdir)) - (not (file-exists-p (concat (file-name-as-directory fdir) "dir")))) - (add-to-list 'Info-directory-list fdir))))) - - - (eval-when-compile - (require 'use-package)) - (require 'bind-key) - (require 'diminish) +#+BEGIN_SRC emacs-lisp + (require 'use-package) +(require 'gnutls) + (add-to-list 'gnutls-trustfiles "/etc/ssl/ca-global/ca-certificates.crt") + (setq package-enable-at-startup nil) + (setq package--init-file-ensured t) + (setq package-user-dir "~/var/emacs/elpa") + (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") + ("melpa" . "https://melpa.org/packages/") + ("org" . "http://orgmode.org/elpa/"))) + (setq use-package-verbose (not (bound-and-true-p byte-compile-current-file))) + #+END_SRC ** Paradox #+BEGIN_SRC emacs-lisp @@ -85,18 +68,6 @@ load [[https://github.com/jwiegley/use-package/][use-package]] even faster (setq paradox-github-token t) ; I don't want to be prompted about this integration ) #+END_SRC -* Paths -** Update PATH -#+BEGIN_SRC emacs-lisp - (add-to-list 'exec-path '"/usr/local/bin") - (add-to-list 'exec-path '"~/bin/") -#+END_SRC -** Add library paths - -#+BEGIN_SRC emacs-lisp - (add-to-list 'load-path '"~/lib/emacs_el/") - (add-to-list 'load-path '"~/lib/emacs_el/magit-annex") -#+END_SRC * Disable custom-vars #+BEGIN_SRC emacs-lisp ;; Set the custom file to /dev/null and don't bother to load it @@ -1328,9 +1299,6 @@ From http://julien.danjou.info/projects/emacs-packages#rainbow-mode, this colori ) #+END_SRC ** Multiple Cursors - :PROPERTIES: - :ID: 6fcf218b-a762-4c37-9339-a8202ddeb544 - :END: [[https://github.com/magnars/multiple-cursors.el][Multiple Cursors]] #+BEGIN_SRC emacs-lisp (use-package multiple-cursors @@ -2109,9 +2077,6 @@ Maildir, or by Message-ID." #+END_SRC ** LaTeX configuration - :PROPERTIES: - :ID: 7135ba17-6a50-4eed-84ca-b90afa5b12f8 - :END: #+BEGIN_SRC emacs-lisp (use-package ox-extra :config