[Emacs] Switch from package.el to straight.el

This commit is contained in:
Ivan Malison 2017-08-23 16:04:38 -07:00
parent d75b6ce30e
commit 9e6a395aa9
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
2 changed files with 140 additions and 165 deletions

View File

@ -129,61 +129,6 @@ file uses lexical scoping.
(when imalison:secure (imalison:use-https-and-tls)) (when imalison:secure (imalison:use-https-and-tls))
#+END_SRC #+END_SRC
** ELPA Archive Setup
The org archive does not support https, so we set http as the protocol explicitly.
#+BEGIN_SRC emacs-lisp -n -r
(require 'package)
(defun imalison:build-archive-uri (uri protocol)
(unless protocol (setq protocol (if imalison:secure "https" "http")))
(format "%s://%s" protocol uri))
(defvar imalison:melpa-uri nil)
(defvar imalison:package-archive-triples
`(("elpa" "tromey.com/elpa/" "http")
("org" "orgmode.org/elpa/" "http")
("melpa" ,(or imalison:melpa-uri "melpa.org/packages/") nil)
("melpa-stable" "stable.melpa.org/packages/" nil)))
(defun imalison:add-package-archive (archive-name archive-uri)
(add-to-list 'package-archives
`(,archive-name . ,archive-uri) t))
(cl-loop for package-triple in imalison:package-archive-triples
do (cl-destructuring-bind (archive-name archive-uri protocol) package-triple
(imalison:add-package-archive
archive-name (imalison:build-archive-uri archive-uri protocol))))
#+END_SRC
** Bootstrap Package Loading
Its a shame that everyone has to have some version of this function in
their init.el. I use use-package's own mechanism for ensuring packages
are installed so my version of ~ensure-packages-installed~ is really
only used to download use-package itself.
#+BEGIN_SRC emacs-lisp
(defun ensure-packages-installed (packages)
(unless package-archive-contents
(package-refresh-contents))
(mapcar
(lambda (package)
(if (package-installed-p package)
package
(progn (message (format "Installing package %s." package))
(package-install package))))
packages))
#+END_SRC
Ensure that use-package is installed.
#+BEGIN_SRC emacs-lisp
(package-initialize t)
(ensure-packages-installed '(use-package))
#+END_SRC
use-package is only needed at compile time.
#+BEGIN_SRC emacs-lisp
(eval-when-compile (require 'use-package))
#+END_SRC
Ensure by default since most of the package for which I use use-package need to be downloaded. ensure can be disabled explicitly with a ~:ensure nil~.
#+BEGIN_SRC emacs-lisp
(setq use-package-always-ensure t)
#+END_SRC
** Setup auto-compile ** Setup auto-compile
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package auto-compile (use-package auto-compile
@ -219,15 +164,6 @@ in the dotfiles repo but they are shared across machines elsewhere.
(setq custom-file "~/.emacs.d/custom-before.el") (setq custom-file "~/.emacs.d/custom-before.el")
(when (file-exists-p custom-file) (load custom-file)) (when (file-exists-p custom-file) (load custom-file))
#+END_SRC #+END_SRC
** emit
*** TODO this needs to be done better, but it works for now
:LOGBOOK:
- State "TODO" from "TODO" [2016-09-13 Tue 17:49]
:END:
#+BEGIN_SRC emacs-lisp
(when (file-exists-p "~/.emacs.d/load.d/emit.el")
(load "~/.emacs.d/load.d/emit.el"))
#+END_SRC
** Benchmarking ** Benchmarking
This appears here so that it can accurately benchmark as much of This appears here so that it can accurately benchmark as much of
startup as possible. startup as possible.
@ -397,33 +333,6 @@ Works in the same way as os.path.join in python
(defvar imalison:gpg-key) (defvar imalison:gpg-key)
#+END_SRC #+END_SRC
** Use Package Wrapper With Local Load Path Support
#+BEGIN_SRC emacs-lisp
(put 'imalison:use-package 'lisp-indent-function 'defun)
(put 'imalison:use-package* 'lisp-indent-function 'defun)
(put 'imalison:use-package** 'lisp-indent-function 'defun)
(defmacro imalison:use-package* (package target-github-name &rest forms)
(let* ((clone-url
(format "git@github.com:IvanMalison/%s" target-github-name)))
`(imalison:use-package** ,package ,target-github-name ,clone-url ,@forms)))
(defmacro imalison:use-package** (package target-dir target-clone-url &rest forms)
(let ((target-directory (imalison:join-paths imalison:projects-directory target-dir)))
`(progn
(or (file-exists-p ,target-directory)
(equal (call-process
(executable-find "git")
nil nil nil "clone" ,target-clone-url ,target-directory) 0))
(use-package ,package
:load-path ,target-directory
:ensure nil
:preface
,@forms))))
(defmacro imalison:use-package (package &rest forms)
`(imalison:use-package* ,package ,(symbol-name package) ,@forms))
#+END_SRC
** Required Packages ** Required Packages
The packages in this section provide no functionality on their own, The packages in this section provide no functionality on their own,
but provide support for writing custom elisp. but provide support for writing custom elisp.
@ -434,14 +343,16 @@ but provide support for writing custom elisp.
*** dash *** dash
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package dash (use-package dash
:demand t
:config :config
(progn (progn
(dash-enable-font-lock))) (dash-enable-font-lock)))
#+END_SRC #+END_SRC
*** gh *** gh
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package** gh "gh.el" "git@github.com:sigma/gh.el.git" (use-package gh
:demand t) :defer t
:recipe (gh :type git :host github :repo "IvanMalison/gh.el"))
#+END_SRC #+END_SRC
*** shut-up *** shut-up
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -461,10 +372,9 @@ but provide support for writing custom elisp.
:demand t) :demand t)
#+END_SRC #+END_SRC
*** emit *** emit
This is disabled for now until I figure out what to do with emit.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package emit (use-package emit
:demand t) :recipe (emit :type git :host github :repo "IvanMalison/emit"))
#+END_SRC #+END_SRC
*** request *** request
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -1235,18 +1145,26 @@ it on by default. Its probably safe to turn it on when in a programming mode.
(setq split-height-threshold nil) (setq split-height-threshold nil)
(setq split-width-threshold 160) (setq split-width-threshold 160)
#+END_SRC #+END_SRC
** Time in Mode Line
#+BEGIN_SRC emacs-lisp
(setq display-time-default-load-average nil)
(setq display-time-interval 1)
(setq display-time-format "%a|%m-%d|%r")
(display-time-mode +1)
#+END_SRC
** Buffer Display ** Buffer Display
*** ewmctrl *** ewmctrl
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ewmctrl (use-package ewmctrl
:demand t) :defer t)
#+END_SRC #+END_SRC
*** frame-mode *** frame-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package frame-mode (use-package frame-mode
:demand t :demand t
:config :config
(progn (progn
(add-hook 'frame-mode-hook (lambda () (display-time-mode -1)))
(frame-mode +1) (frame-mode +1)
(frame-keys-mode +1))) (frame-keys-mode +1)))
#+END_SRC #+END_SRC
@ -1325,13 +1243,6 @@ whenever there is an error.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq vc-follow-symlinks t) (setq vc-follow-symlinks t)
#+END_SRC #+END_SRC
** Time in Mode Line
#+BEGIN_SRC emacs-lisp
(setq display-time-default-load-average nil)
(setq display-time-interval 1)
(setq display-time-format "%a|%m-%d|%r")
(display-time-mode (if frame-mode -1 +1))
#+END_SRC
** Kill Ring ** Kill Ring
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq kill-ring-max 1000) (setq kill-ring-max 1000)
@ -1444,9 +1355,10 @@ is not detected properly by emacsclient by default.
;; ".\\{81\\}" 'hi-blue))) ;; ".\\{81\\}" 'hi-blue)))
#+END_SRC #+END_SRC
** paradox ** paradox
Paradox is a package.el extension. I have no use for it now that I use straight.el.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package paradox (use-package paradox
:defer 10 :disabled t
:commands (paradox-upgrade-packages paradox-list-packages) :commands (paradox-upgrade-packages paradox-list-packages)
:config :config
(progn (progn
@ -1553,8 +1465,10 @@ is not detected properly by emacsclient by default.
(winner-mode 1))) (winner-mode 1)))
#+END_SRC #+END_SRC
** eyebrowse ** eyebrowse
I don't have any use for this now that I use frames mode, but its an interesting idea.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package eyebrowse (use-package eyebrowse
:disabled t
:defer 1 :defer 1
:config :config
(progn (eyebrowse-mode +1))) (progn (eyebrowse-mode +1)))
@ -1565,7 +1479,7 @@ is not detected properly by emacsclient by default.
#+END_SRC #+END_SRC
** tile ** tile
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package tile (use-package tile
:after hydra :after hydra
:bind ("C-c t" . imalison:hydra-tile/body) :bind ("C-c t" . imalison:hydra-tile/body)
:config :config
@ -1955,8 +1869,10 @@ I use helm for almost all emacs completion
:bind ("C-c w" . imalison:ace-window)) :bind ("C-c w" . imalison:ace-window))
#+END_SRC #+END_SRC
** neotree ** neotree
Neotree is useless with frame mode for now, so I've disabled it.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package neotree) (use-package neotree
:disabled t)
#+END_SRC #+END_SRC
** jump-char ** jump-char
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -1965,7 +1881,7 @@ I use helm for almost all emacs completion
#+END_SRC #+END_SRC
** flimenu ** flimenu
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package flimenu (use-package flimenu
:config :config
(progn (progn
(flimenu-global-mode))) (flimenu-global-mode)))
@ -2006,6 +1922,7 @@ I use helm for almost all emacs completion
I don't use auto-complete at all, so I have set up a hook to automatically disable it whenever it is enabled to avoid creating conflicting popups when company is activated. I don't use auto-complete at all, so I have set up a hook to automatically disable it whenever it is enabled to avoid creating conflicting popups when company is activated.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package auto-complete (use-package auto-complete
:defer t
:preface :preface
(progn (progn
(defun imalison:auto-complete-hook () (defun imalison:auto-complete-hook ()
@ -2072,7 +1989,7 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
#+END_SRC #+END_SRC
** multi-line ** multi-line
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package multi-line (use-package multi-line
;; Demand multi-line to avoid failure to load mode specific strategies ;; Demand multi-line to avoid failure to load mode specific strategies
:demand t :demand t
:bind ("C-c d" . multi-line) :bind ("C-c d" . multi-line)
@ -2102,11 +2019,13 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
** cliphist ** cliphist
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package cliphist (use-package cliphist
:disabled t
:config (setq cliphist-use-ivy t)) :config (setq cliphist-use-ivy t))
#+END_SRC #+END_SRC
** electric-operator-mode ** electric-operator-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package electric-operator (use-package electric-operator
:commands electric-operator-mode
:config :config
(add-hook 'python-mode-hook #'electric-operator-mode)) (add-hook 'python-mode-hook #'electric-operator-mode))
#+END_SRC #+END_SRC
@ -2162,13 +2081,14 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
* flycheck * flycheck
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package flycheck (use-package flycheck
:commands flycheck-mode
:init (add-hook 'prog-major-mode 'flycheck-mode)
:config :config
(progn (progn
(use-package flycheck-package (use-package flycheck-package
:config (flycheck-package-setup)) :config (flycheck-package-setup))
(imalison:use-package flycheck-cask (use-package flycheck-cask
:after flycheck :after flycheck
:config :config
(add-hook 'flycheck-mode-hook #'flycheck-cask-setup)) (add-hook 'flycheck-mode-hook #'flycheck-cask-setup))
@ -2216,7 +2136,8 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab
**** pippel **** pippel
pippel lets one manage pip packages pippel lets one manage pip packages
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package pippel) (use-package pippel
:defer t)
#+END_SRC #+END_SRC
**** pyimport **** pyimport
Pyimport is disabled because it may be causing a performance problem. Pyimport is disabled because it may be causing a performance problem.
@ -2233,7 +2154,6 @@ simply to require the company jedi package, which is why we make no
reference to the jedi-core package. reference to the jedi-core package.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package company-jedi (use-package company-jedi
:after python
:commands (jedi:goto-definition jedi-mode company-jedi) :commands (jedi:goto-definition jedi-mode company-jedi)
:bind (:map python-mode-map :bind (:map python-mode-map
("M-." . jedi:goto-definition) ("M-." . jedi:goto-definition)
@ -2307,8 +2227,7 @@ reference to the jedi-core package.
"vendor"))) "vendor")))
:config :config
(progn (progn
(imalison:use-package* (use-package gotest
gotest "~/Projects/gotest.el"
:demand t :demand t
:bind (:map go-mode-map :bind (:map go-mode-map
("C-c t" . imalison:gotest)) ("C-c t" . imalison:gotest))
@ -2784,13 +2703,12 @@ The following is taken from [[https://github.com/syl20bnr/spacemacs/blob/a650877
#+END_SRC #+END_SRC
**** haskell-ide-engine **** haskell-ide-engine
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package lsp-haskell) ;; (use-package lsp-haskell)
#+END_SRC #+END_SRC
**** intero **** intero
Intero seems to be causing hangs, so it has been disabled Intero seems to be causing hangs, so it has been disabled
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package intero (use-package intero
:demand t
:after haskell-mode :after haskell-mode
:config :config
(progn (progn
@ -2828,9 +2746,11 @@ Intero seems to be causing hangs, so it has been disabled
#+END_SRC #+END_SRC
*** purescript *** purescript
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package purescript-mode) (use-package purescript-mode
:defer t)
(use-package psc-ide (use-package psc-ide
:after purescript-mode
:config :config
(progn (progn
(defun imalison:purescript-mode-hook () (defun imalison:purescript-mode-hook ()
@ -2879,7 +2799,8 @@ Intero seems to be causing hangs, so it has been disabled
#+END_SRC #+END_SRC
*** protobuf *** protobuf
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package protobuf-mode) (use-package protobuf-mode
:defer t)
#+END_SRC #+END_SRC
*** json-mode *** json-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -2899,15 +2820,11 @@ Intero seems to be causing hangs, so it has been disabled
#+END_SRC #+END_SRC
*** es-mode *** es-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package es-mode) (use-package es-mode
:defer t)
#+END_SRC #+END_SRC
** Document ** Document
*** org *** org
**** Require the latest version of org-mode
#+BEGIN_SRC emacs-lisp
(use-package org
:ensure org-plus-contrib)
#+END_SRC
**** config **** config
#+BEGIN_SRC emacs-lisp :tangle org-config.el #+BEGIN_SRC emacs-lisp :tangle org-config.el
(use-package org (use-package org
@ -3395,8 +3312,8 @@ This function replaces the default naming scheme with a call to
~imalison:generate-name~, and uses a slightly different uniquify approach. ~imalison:generate-name~, and uses a slightly different uniquify approach.
#+BEGIN_SRC emacs-lisp :tangle org-config.el #+BEGIN_SRC emacs-lisp :tangle org-config.el
(use-package ox (use-package ox
:defer t
:ensure nil :ensure nil
:demand t
:config :config
(defun org-export-get-reference (datum info) (defun org-export-get-reference (datum info)
"Return a unique reference for DATUM, as a string. "Return a unique reference for DATUM, as a string.
@ -3423,6 +3340,7 @@ alphanumeric characters only."
**** Add link icons in headings that lead to themselves **** Add link icons in headings that lead to themselves
#+BEGIN_SRC emacs-lisp :tangle org-config.el #+BEGIN_SRC emacs-lisp :tangle org-config.el
(use-package ox-html (use-package ox-html
:commands (org-html-export-as-html org-html-export-as-html)
:ensure nil :ensure nil
:preface :preface
(progn (progn
@ -3454,6 +3372,7 @@ alphanumeric characters only."
**** Allow with query params in image extentions **** Allow with query params in image extentions
#+BEGIN_SRC emacs-lisp :tangle org-config.el #+BEGIN_SRC emacs-lisp :tangle org-config.el
(use-package ox-html (use-package ox-html
:defer t
:ensure nil :ensure nil
:config :config
(setq org-html-inline-image-rules (setq org-html-inline-image-rules
@ -3464,8 +3383,8 @@ alphanumeric characters only."
#+END_SRC #+END_SRC
**** org-projectile **** org-projectile
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package org-projectile (use-package org-projectile
:after helm :defer t
:config :config
(progn (progn
(setq org-projectile-projects-file (setq org-projectile-projects-file
@ -3479,10 +3398,11 @@ alphanumeric characters only."
(org-projectile-project-todo-entry (org-projectile-project-todo-entry
:capture-character "p")) :capture-character "p"))
(setq org-confirm-elisp-link-function nil) (setq org-confirm-elisp-link-function nil)
(imalison:add-to-org-agenda-files (org-projectile-todo-files)) (imalison:add-to-org-agenda-files (org-projectile-todo-files))))
(use-package org-projectile-helm
:ensure nil (use-package org-projectile-helm
:bind (("C-c n p" . org-projectile-helm-template-or-project))))) :after org-projectile
:bind (("C-c n p" . org-projectile-helm-template-or-project)))
#+END_SRC #+END_SRC
**** helm-org-rifle **** helm-org-rifle
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -3548,7 +3468,8 @@ alphanumeric characters only."
**** org-reveal **** org-reveal
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ox-reveal (use-package ox-reveal
:after org :defer t
:commands org-reveal
:config :config
(setq org-reveal-root (setq org-reveal-root
(imalison:join-paths "file://" imalison:projects-directory "reveal.js"))) (imalison:join-paths "file://" imalison:projects-directory "reveal.js")))
@ -3614,6 +3535,7 @@ alphanumeric characters only."
*** markdown-mode *** markdown-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package markdown-mode (use-package markdown-mode
:defer t
:init :init
(progn (progn
(add-hook 'markdown-mode-hook 'imalison:disable-linum-mode))) (add-hook 'markdown-mode-hook 'imalison:disable-linum-mode)))
@ -3773,7 +3695,7 @@ I've disabled magithub because it causes magit to be super slow
** github ** github
*** github-search *** github-search
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package github-search (use-package github-search
:commands (github-search-clone-repo github-search-user-clone-repo) :commands (github-search-clone-repo github-search-user-clone-repo)
:preface :preface
(progn (progn
@ -3797,7 +3719,7 @@ I've disabled magithub because it causes magit to be super slow
#+END_SRC #+END_SRC
*** github-clone *** github-clone
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package* github-clone "~/Projects/github-clone.el" (use-package github-clone
:commands (github-clone-add-parent-remote :commands (github-clone-add-parent-remote
github-clone-add-source-remote github-clone-add-source-remote
github-clone-fork-remote github-clone-fork-remote
@ -3865,9 +3787,10 @@ emr (emacs refactor) provides support for refactoring in many programming langua
** language-server-protocol (lsp) ** language-server-protocol (lsp)
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package lsp-mode (use-package lsp-mode
:commands lsp-mode
:init (add-hook 'prog-major-mode 'lsp-mode)
:config :config
(progn (progn
(add-hook 'prog-major-mode 'lsp-mode)
(require 'lsp-flycheck))) (require 'lsp-flycheck)))
#+END_SRC #+END_SRC
* Utility * Utility
@ -3948,7 +3871,7 @@ First call open the kill-ring browser, next calls move to next line."
#+END_SRC #+END_SRC
** term-manager ** term-manager
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package term-manager (use-package term-manager
:defer t :defer t
:preface :preface
(progn (progn
@ -3962,7 +3885,7 @@ First call open the kill-ring browser, next calls move to next line."
#+END_SRC #+END_SRC
** term-projectile ** term-projectile
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(imalison:use-package* term-projectile "term-manager" (use-package term-projectile
:bind ("C-c 7" . imalison:term-hydra-global/body) :bind ("C-c 7" . imalison:term-hydra-global/body)
:commands (term-projectile-forward term-projectile-backward :commands (term-projectile-forward term-projectile-backward
term-projectile-default-directory-forward term-projectile-default-directory-forward
@ -4059,7 +3982,8 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
#+END_SRC #+END_SRC
** aurel ** aurel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package aurel :demand t) (use-package aurel
:defer t)
#+END_SRC #+END_SRC
* Chat * Chat
** erc ** erc
@ -4094,16 +4018,19 @@ crux-reopen-as-root-mode makes it so that any file owned by root will automatica
#+END_SRC #+END_SRC
** slack ** slack
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package slack) (use-package slack
:commands slack-start)
#+END_SRC #+END_SRC
* Cooperation * Cooperation
** togetherly ** togetherly
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package togetherly) (use-package togetherly
:defer t)
#+END_SRC #+END_SRC
** floobits ** floobits
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package floobits) (use-package floobits
:defer t)
#+END_SRC #+END_SRC
** rudel ** rudel
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -4291,12 +4218,14 @@ This package is needed to export org to html.
** calfw ** calfw
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package calfw-org (use-package calfw-org
:disabled t
:demand t) :demand t)
#+END_SRC #+END_SRC
** clocker ** clocker
Not really sure what this is Not really sure what this is
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package clocker) (use-package clocker
:disabled t)
#+END_SRC #+END_SRC
** deft ** deft
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -4337,7 +4266,6 @@ Not really sure what this is
(use-package matrix-client (use-package matrix-client
:disabled t ;; fails to load eieio on startup :disabled t ;; fails to load eieio on startup
) )
#+END_SRC #+END_SRC
** mu4e ** mu4e
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -4449,11 +4377,12 @@ Not really sure what this is
This is useful with server mode when editing gmail messages. I think that it is not currently working, or it may need to be manually enabled. This is useful with server mode when editing gmail messages. I think that it is not currently working, or it may need to be manually enabled.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package gmail-message-mode (use-package gmail-message-mode
:demand t) :mode ("\\.gmm\\'" . gmail-message-mode))
#+END_SRC #+END_SRC
** ham-mode ** ham-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package ham-mode (use-package ham-mode
:commands ham-mode
:config :config
(progn (progn
(setq ham-mode-html-to-markdown-command (setq ham-mode-html-to-markdown-command
@ -4462,6 +4391,7 @@ This is useful with server mode when editing gmail messages. I think that it is
** alert ** alert
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package alert (use-package alert
:defer t
:config :config
(progn (progn
(defun alert-notifier-notify (info) (defun alert-notifier-notify (info)
@ -4528,11 +4458,13 @@ This is useful with server mode when editing gmail messages. I think that it is
#+END_SRC #+END_SRC
** screenshot ** screenshot
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package screenshot) (use-package screenshot
:commands screenshot)
#+END_SRC #+END_SRC
** libmpdee ** libmpdee
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package libmpdee) (use-package libmpdee
:defer t)
#+END_SRC #+END_SRC
** flyspell ** flyspell
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -4666,20 +4598,22 @@ I've disabled perspective because I just don't use it much.
** android-mode ** android-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package android-mode (use-package android-mode
:after s :defer t
:config :config
(progn (progn
(require 's)
(setq android-mode-sdk-dir (setq android-mode-sdk-dir
(s-trim (shell-command-to-string "android_sdk_directory"))))) (s-trim (shell-command-to-string "android_sdk_directory")))))
#+END_SRC #+END_SRC
** gradle-mode ** gradle-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package gradle-mode) (use-package gradle-mode
:defer t)
#+END_SRC #+END_SRC
** jsx-mode ** jsx-mode
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package jsx-mode (use-package jsx-mode
:mode "\\.jsx\\'") :defer t)
#+END_SRC #+END_SRC
** css ** css
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
@ -4745,22 +4679,23 @@ I've disabled perspective because I just don't use it much.
Ensure all themes that I use are installed: Ensure all themes that I use are installed:
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(use-package solarized-theme (use-package solarized-theme
:defer t
:init :init
(progn (progn
(setq solarized-high-contrast-mode-line t))) (setq solarized-high-contrast-mode-line t)))
(defvar-setq packages-appearance (defvar-setq packages-appearance
'(monokai-theme solarized-theme zenburn-theme base16-theme molokai-theme '(monokai-theme zenburn-theme base16-theme molokai-theme
tango-2-theme gotham-theme sublime-themes rainbow-delimiters tango-2-theme gotham-theme sublime-themes rainbow-delimiters
waher-theme ample-theme material-theme zerodark-theme waher-theme ample-theme material-theme zerodark-theme
color-theme-modern leuven-theme spacemacs-theme gruvbox-theme color-theme-modern leuven-theme spacemacs-theme gruvbox-theme
forest-blue-theme flatland-theme afternoon-theme forest-blue-theme flatland-theme afternoon-theme
cyberpunk-theme)) cyberpunk-theme))
(ensure-packages-installed packages-appearance) (mapcar 'straight-use-package packages-appearance)
(use-package doom-themes (use-package doom-themes
:demand t) :defer t)
#+END_SRC #+END_SRC
** all-the-icons ** all-the-icons
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp

View File

@ -1,11 +1,22 @@
;; -*- no-byte-compile: t -*- ;; -*- no-byte-compile: t -*-
(require 'package) (let ((bootstrap-file (concat user-emacs-directory "straight/bootstrap.el"))
(package-initialize) (bootstrap-version 2))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
(setq load-prefer-newer t) (straight-use-package 'use-package)
(require 'use-package)
(setq use-package-enable-imenu-support t
use-package-always-ensure t)
(setq custom-file "~/.emacs.d/custom-before.el") (setq custom-file "~/.emacs.d/custom-before.el")
(when (file-exists-p custom-file) (load custom-file)) (setq load-prefer-newer t)
;; If this isn't here and there's a problem with init, graphical emacs ;; If this isn't here and there's a problem with init, graphical emacs
;; is super annoying. ;; is super annoying.
@ -13,11 +24,40 @@
(setq mac-option-modifier 'meta) (setq mac-option-modifier 'meta)
(setq mac-command-modifier 'super)) (setq mac-command-modifier 'super))
(setq use-package-enable-imenu-support t) ;; Without this, org can behave very strangely
(use-package org
:init
;; Taken from https://github.com/raxod502/radian/blob/master/radian-emacs/radian-org.el
(defun radian--org-git-version ()
"Return the abbreviated SHA for the Org Git repo."
(let ((default-directory (concat user-emacs-directory
"straight/repos/org/")))
(if (executable-find "git")
(with-temp-buffer
;; Returns the shortest prefix of the SHA for HEAD that is
;; unique, down to a minimum of 4 characters (see
;; git-rev-parse(1)).
(call-process "git" nil '(t nil) nil
"rev-parse" "--short" "HEAD")
(if (> (buffer-size) 0)
(string-trim (buffer-string))
;; This shouldn't happen, unless somehow Org is not
;; actually a Git repo.
"revision unknown"))
;; This also shouldn't happen, because how would you have
;; gotten Org in the first place, then? But the real world
;; sucks and we have to account for stuff like this.
"git not available")))
(defalias #'org-git-version #'radian--org-git-version)
(defun org-release () "N/A")
(provide 'org-version)
(with-eval-after-load 'org
(defalias #'org-git-version #'radian--org-git-version)))
(let ((debug-on-error t)) (let ((debug-on-error t))
(org-babel-load-file (org-babel-load-file
(concat (file-name-directory load-file-name) "README.org"))) (straight-transaction
(concat (file-name-directory load-file-name) "README.org"))))
;; Local Variables: ;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp-checkdoc) ;; flycheck-disabled-checkers: (emacs-lisp-checkdoc)