summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xhooks/post-up/emacs11
-rw-r--r--tag-emacs/emacs.d/Cask150
-rw-r--r--tag-emacs/emacs.d/init.org230
3 files changed, 61 insertions, 330 deletions
diff --git a/hooks/post-up/emacs b/hooks/post-up/emacs
index b8a8edc..1cc19f9 100755
--- a/hooks/post-up/emacs
+++ b/hooks/post-up/emacs
@@ -2,22 +2,13 @@
 
 if [[ -s $commands[emacs] ]]
 then
-	if [[ ! -d ~/cask ]]
-	then
-		git clone git://github.com/cask/cask ~/.cask
-		if [[ ! -d ~/bin ]]
-		then
-			mkdir ~/bin
-		fi
-		ln -s ~/.cask/bin/cask ~/bin/cask
-	fi
 	pushd ~/.emacs.d
-	cask install
 	emacs --batch --eval "(progn
 (find-file \"init.org\")
 (require 'ob-tangle)
 (org-babel-tangle nil \"init.el\")
 (byte-compile-file \"init.el\")
+(load-file \"init.el\")
 )"
 	popd
 fi
diff --git a/tag-emacs/emacs.d/Cask b/tag-emacs/emacs.d/Cask
deleted file mode 100644
index 096b802..0000000
--- a/tag-emacs/emacs.d/Cask
+++ /dev/null
@@ -1,150 +0,0 @@
-(source gnu)
-(source marmalade)
-(source melpa)
-(source melpa-stable)
-(source org)
-
-(depends-on "ace-window")
-(depends-on "ag")
-(depends-on "async")
-(depends-on "auto-compile")
-(depends-on "auto-indent-mode")
-(depends-on "autopair")
-(depends-on "avy")
-(depends-on "bind-key")
-(depends-on "cask")
-(depends-on "cider")
-(depends-on "clj-refactor")
-(depends-on "clojure-mode")
-(depends-on "coffee-mode")
-(depends-on "company")
-(depends-on "company-go")
-(depends-on "company-tern")
-(depends-on "counsel")
-(depends-on "csv-mode")
-(depends-on "cyphejor")
-(depends-on "dash")
-(depends-on "dash-functional")
-(depends-on "deferred")
-(depends-on "diff-hl")
-(depends-on "diminish")
-(depends-on "dired+")
-(depends-on "dired-hacks-utils")
-(depends-on "dired-k")
-(depends-on "dired-subtree")
-(depends-on "discover")
-(depends-on "discover-my-major")
-(depends-on "dockerfile-mode")
-(depends-on "dtrt-indent")
-(depends-on "editorconfig")
-(depends-on "elisp-slime-nav")
-(depends-on "emmet-mode")
-(depends-on "epl")
-(depends-on "expand-region")
-(depends-on "f")
-(depends-on "fancy-narrow")
-(depends-on "fasd")
-(depends-on "feature-mode")
-(depends-on "flx")
-(depends-on "flx-ido")
-(depends-on "flycheck")
-(depends-on "framemove")
-(depends-on "geiser")
-(depends-on "ggtags")
-(depends-on "gh")
-(depends-on "gist")
-(depends-on "git-commit")
-(depends-on "git-timemachine")
-(depends-on "gntp")
-(depends-on "go-eldoc")
-(depends-on "go-mode")
-(depends-on "go-projectile")
-(depends-on "goto-chg")
-(depends-on "grizzl")
-(depends-on "haskell-mode")
-(depends-on "helm")
-(depends-on "helm-dash")
-(depends-on "helm-projectile")
-(depends-on "helm-swoop")
-(depends-on "help-fns+")
-(depends-on "hemisu-theme")
-(depends-on "highlight-stages")
-(depends-on "ido-completing-read+")
-(depends-on "ido-vertical-mode")
-(depends-on "jinja2-mode")
-(depends-on "jquery-doc")
-(depends-on "js2-mode")
-(depends-on "json-mode")
-(depends-on "json-reformat")
-(depends-on "ledger-mode")
-(depends-on "let-alist")
-(depends-on "litable")
-(depends-on "log4e")
-(depends-on "logito")
-(depends-on "lua-mode")
-(depends-on "magit")
-(depends-on "makey")
-(depends-on "markdown-mode")
-(depends-on "mmm-mode")
-(depends-on "move-text")
-(depends-on "multi-term")
-(depends-on "multiple-cursors")
-(depends-on "nginx-mode")
-(depends-on "nix-mode")
-(depends-on "nodejs-repl")
-(depends-on "org-journal")
-(depends-on "org-plus-contrib")
-(depends-on "package-build")
-(depends-on "packed")
-(depends-on "page-break-lines")
-(depends-on "pallet")
-(depends-on "paredit")
-(depends-on "password-store")
-(depends-on "pcache")
-(depends-on "persp-projectile")
-(depends-on "perspective")
-(depends-on "php-extras")
-(depends-on "php-mode")
-(depends-on "pkg-info")
-(depends-on "popwin")
-(depends-on "projectile")
-(depends-on "pt")
-(depends-on "queue")
-(depends-on "quickrun")
-(depends-on "rainbow-mode")
-(depends-on "redshank")
-(depends-on "relative-buffers")
-(depends-on "req-package")
-(depends-on "restclient")
-(depends-on "s")
-(depends-on "sass-mode")
-(depends-on "scss-mode")
-(depends-on "shrink-whitespace")
-(depends-on "shut-up")
-(depends-on "simple-httpd")
-(depends-on "skewer-mode")
-(depends-on "slime")
-(depends-on "slime-repl")
-(depends-on "smart-tab")
-(depends-on "smart-tabs-mode")
-(depends-on "smartparens")
-(depends-on "smex")
-(depends-on "solarized-theme")
-(depends-on "spinner")
-(depends-on "spotlight")
-(depends-on "swiper")
-(depends-on "tern")
-(depends-on "toml-mode")
-(depends-on "tup-mode")
-(depends-on "typopunct")
-(depends-on "undo-tree")
-(depends-on "use-package")
-(depends-on "visual-regexp")
-(depends-on "web-mode")
-(depends-on "wgrep")
-(depends-on "wgrep-ag")
-(depends-on "wgrep-pt")
-(depends-on "ws-butler")
-(depends-on "xrdb-mode" :git "git://github.com/emacsmirror/xrdb-mode")
-(depends-on "yaml-mode")
-(depends-on "yasnippet")
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index ee6bd9b..3f2b724 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -29,38 +29,6 @@ the buffer to be empty.
 
 * Packaging
 
-** Cask
-
-For most packages, I use [[https://github.com/cask/cask][cask]]
-#+BEGIN_SRC emacs-lisp
-  (eval-and-compile
-    (add-to-list 'load-path (expand-file-name "~/.cask")))
-  (require 'cask)
-  (cask-initialize)
-#+END_SRC
-
-*** Cask commands
-
-Installing
-#+BEGIN_SRC sh :tangle no
-curl -fsSL https://raw.githubusercontent.com/cask/cask/master/go | python
-#+END_SRC
-
-Install all packages specified in the Caskfile
-#+BEGIN_SRC sh :tangle no :dir ~/.emacs.d/
-cask install
-#+END_SRC
-
-List packages with new versions
-#+BEGIN_SRC sh :tangle no :dir ~/.emacs.d/ :results output
-cask outdated
-#+END_SRC
-
-Update old packages
-#+BEGIN_SRC sh :tangle no :dir ~/.emacs.d/
-cask update
-#+END_SRC
-
 ** Req-package
 
 #+BEGIN_SRC emacs-lisp
@@ -81,7 +49,8 @@ cask update
     (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
                              ("marmalade" . "https://marmalade-repo.org/packages/")
                              ("melpa" . "https://melpa.org/packages/")
-                             ("melpa-stable" . "https://stable.melpa.org/packages/")))
+                             ("melpa-stable" . "https://stable.melpa.org/packages/"))
+          package-user-dir (concat "~/.emacs.d/packages/" emacs-version "/elpa"))
     (package-initialize)
     (unless (package-installed-p 'req-package)
       (package-refresh-contents)
@@ -90,19 +59,6 @@ cask update
   (setq use-package-verbose t)
 #+END_SRC
 
-** Pallet
-
-I use [[https://github.com/rdallasgray/pallet][pallet]] to keep my [[file:Cask][Caskfile]] up-to-date with packages installed
-from inside Emacs.  I don’t need it on startup, so I tell
-=req-package= to initialise it when Emacs is idle.
-
-#+BEGIN_SRC emacs-lisp
-(req-package pallet
-  :defer 5
-  :config (pallet-mode 1))
-#+END_SRC
-
-
 * Customize
 I don’t really like using customize for normal configuration.
 Instead, I use it for things that get saved automatically. That’s why
@@ -229,10 +185,9 @@ time.  Make sure to set it up with a nice =completing-read-function=
     :commands (magit-status)
     :config (progn (setq magit-last-seen-setup-instructions "1.4.0"
                          magit-completing-read-function #'magit-builtin-completing-read
-                         magit-wip-after-save-mode t
-                         magit-wip-after-apply-mode t
                          magit-popup-use-prefix-argument 'default
                          magit-push-always-verify nil
+                         global-magit-file-mode nil
                          magit-revert-buffers t)
                    (add-to-list 'magit-no-confirm 'safe-with-wip))
     :init (add-hook 'magit-mode-hook #'magit-load-config-extensions))
@@ -503,6 +458,7 @@ An awesome way to open files on OS X.
 
 #+BEGIN_SRC emacs-lisp
   (req-package spotlight
+    :defer 10
     :if (eq system-type 'darwin)
     :config (setq spotlight-tmp-file "/tmp/.emacs-spotlight-tmp-file"))
 #+END_SRC
@@ -935,6 +891,7 @@ Don’t show uninteresting files in dired listings.
 
 #+BEGIN_SRC emacs-lisp
   (req-package dired+
+    :defer 5
     :require dired
     :config (progn
               (diredp-toggle-find-file-reuse-dir 1)
@@ -1333,13 +1290,8 @@ I put some of it in the frame-line at the top.
                         ))
 
   (setq frame-title-format
-        '((:eval (if (and (fboundp #'projectile-project-p)
-                          (projectile-project-p))
-                     (projectile-project-name)))
-          ": "
-          (:eval (if (buffer-file-name)
-                     (buffer-name)
-                   "%b"))))
+        '(multiple-frames "%b"
+                          ("" "%F")))
 #+END_SRC
 
 ** Renaming major modes
@@ -1481,10 +1433,10 @@ Org is wünderbar.
            ("C-c a" . org-agenda)
            ("C-c l" . org-store-link))
     :defer 8
-    :init (setq org-replace-disputed-keys t)
+    :init (setq org-replace-disputed-keys t
+                org-ellipsis "…")
     :config (progn
               (setq org-directory "~/Sync/org"
-                    org-ellipsis "…"
                     org-agenda-files `(,(concat org-directory "/agenda"))
 
                     org-default-notes-file (concat org-directory "/notes")
@@ -1554,11 +1506,12 @@ with R or something.
 I can use this to keep a journal.  I should use it.
 
 #+BEGIN_SRC emacs-lisp
-(req-package org-journal
-  :require org
-  :defer t
-  :config (progn
-            (setq org-journal-date-format "%A, %d %B %Y")))
+  (req-package org-journal
+    :require org
+    :bind ("s-j" . org-journal-new-entry)
+    :defer 20
+    :config (progn
+              (setq org-journal-date-format "%A, %d %B %Y")))
 #+END_SRC
 
 **** org-mobile
@@ -1567,7 +1520,7 @@ I can use this to keep a journal.  I should use it.
 #+BEGIN_SRC emacs-lisp
   (req-package org-mobile
     :require org
-    :defer t
+    :defer 30
     :config (progn
               (setq org-mobile-directory "~/Mobile/Org"
                     org-mobile-inbox-for-pull "~/Mobile/Org/from-mobile.org")
@@ -1710,7 +1663,6 @@ Customise the modeline-display of =emacs-lisp-mode=. Then make sure
 it runs the common lisp hooks.
 
 #+BEGIN_SRC emacs-lisp
-(add-to-list 'auto-mode-alist '("/Cask\\'" . emacs-lisp-mode))
 (add-hook 'emacs-lisp-mode-hook #'ap/lisp-setup)
 (add-hook 'emacs-lisp-mode-hook #'eldoc-mode)
 #+END_SRC
@@ -1906,6 +1858,7 @@ completions, besides other IDE-like things.
 #+BEGIN_SRC emacs-lisp
   (req-package tern
     :commands ap/enable-tern
+    :defer 5
     :config (progn
               (setq tern-command (list (executable-find "tern")))
               (defun ap/enable-tern ()
@@ -1913,6 +1866,7 @@ completions, besides other IDE-like things.
               (add-hook 'js2-mode-hook #'ap/enable-tern)))
 
   (req-package company-tern
+    :defer 5
     :require (tern company))
 #+END_SRC
 
@@ -1997,35 +1951,36 @@ With =web-mode= being so good, I don’t really use this much.  It’s
 good for embedded SQL though.
 
 #+BEGIN_SRC emacs-lisp
-(req-package mmm-auto
-  :config (progn
-            (mmm-add-classes
-             '((php-sql
-                :submode sql-mode
-                :front "<<<SQL[\r\n]+"
-                :back "SQL;?"
-                :face mmm-code-submode-face)))
-            (mmm-add-mode-ext-class 'php-mode "\\.php$" 'php-sql)
-            (mmm-add-classes
-             '((markdown-toml
-                :submode toml-mode
-                :face mmm-declaration-submode-face
-                :front "\\`+++[\n\r]+"
-                :back "^+++$")
-               (markdown-lisp
-                :submode common-lisp-mode
-                :face mmm-code-submode-face
-                :front "^{{% highlight cl %}}[\r\n]+"
-                :back "^{{% /highlight %}}$")
-               (markdown-shell
-                :submode shell-script-mode
-                :face mmm-code-submode-face
-                :front "^{{% highlight sh %}}[\r\n]+"
-                :back "^{{% /highlight %}}$")))
-            (mmm-add-mode-ext-class 'markdown-mode nil 'markdown-toml)
-            (mmm-add-mode-ext-class 'markdown-mode nil 'markdown-lisp)
-            (mmm-add-mode-ext-class 'markdown-mode nil 'markdown-shell))
-  :init (setq mmm-global-mode 'maybe))
+  (req-package mmm-auto
+    :ensure mmm-mode
+    :config (progn
+              (mmm-add-classes
+               '((php-sql
+                  :submode sql-mode
+                  :front "<<<SQL[\r\n]+"
+                  :back "SQL;?"
+                  :face mmm-code-submode-face)))
+              (mmm-add-mode-ext-class 'php-mode "\\.php$" 'php-sql)
+              (mmm-add-classes
+               '((markdown-toml
+                  :submode toml-mode
+                  :face mmm-declaration-submode-face
+                  :front "\\`+++[\n\r]+"
+                  :back "^+++$")
+                 (markdown-lisp
+                  :submode common-lisp-mode
+                  :face mmm-code-submode-face
+                  :front "^{{% highlight cl %}}[\r\n]+"
+                  :back "^{{% /highlight %}}$")
+                 (markdown-shell
+                  :submode shell-script-mode
+                  :face mmm-code-submode-face
+                  :front "^{{% highlight sh %}}[\r\n]+"
+                  :back "^{{% /highlight %}}$")))
+              (mmm-add-mode-ext-class 'markdown-mode nil 'markdown-toml)
+              (mmm-add-mode-ext-class 'markdown-mode nil 'markdown-lisp)
+              (mmm-add-mode-ext-class 'markdown-mode nil 'markdown-shell))
+    :init (setq mmm-global-mode 'maybe))
 #+END_SRC
 
 **** TODO Setup for javascript + SQL
@@ -2136,12 +2091,13 @@ Emacs has an editor within.
 The most important one for me is JSON property alignment.
 
 #+BEGIN_SRC emacs-lisp
-(req-package align
-  :config (progn
-            (add-to-list 'align-rules-list
-                         '(colon-key-value
-                           (regexp . ":\\(\\s-*\\)")
-                           (modes  . '(js2-mode))))))
+  (req-package align
+    :defer 10
+    :config (progn
+              (add-to-list 'align-rules-list
+                           '(colon-key-value
+                             (regexp . ":\\(\\s-*\\)")
+                             (modes  . '(js2-mode))))))
 #+END_SRC
 
 ** Clipboard
@@ -2215,77 +2171,11 @@ I like using typographic symbols, but I don’t always remember (how) to
 type them.
 
 #+BEGIN_SRC emacs-lisp
-(req-package typopunct
-  :config (progn
-            (typopunct-change-language 'english t)
-            (defconst typopunct-minus (decode-char 'ucs #x2212))
-            (defadvice typopunct-insert-typographical-dashes
-                (around minus-or-pm activate)
-              (cond
-               ((or (eq (char-before) typopunct-em-dash)
-                    (looking-back "\\([[:blank:]]\\|^\\)\\^"))
-                (delete-char -1)
-                (insert typopunct-minus))
-               ((looking-back "[^[:blank:]]\\^")
-                (insert typopunct-minus))
-               (t ad-do-it)))
-
-            (defconst typopunct-ellipsis (decode-char 'ucs #x2026))
-            (defconst typopunct-middot   (decode-char 'ucs #xB7)) ; or 2219
-            (defun typopunct-insert-ellipsis-or-middot (arg)
-              "Change three consecutive dots to a typographical ellipsis mark."
-              (interactive "p")
-              (cond
-               ((and (= 1 arg)
-                     (eq (char-before) ?^))
-                (delete-char -1)
-                (insert typopunct-middot))
-               ((and (= 1 arg)
-                     (eq this-command last-command)
-                     (looking-back "\\.\\."))
-                (replace-match "")
-                (insert typopunct-ellipsis))
-               (t
-                (self-insert-command arg))))
-            (define-key typopunct-map "." 'typopunct-insert-ellipsis-or-middot)
-
-            (defconst typopunct-times (decode-char 'ucs #xD7))
-            (defun typopunct-insert-times (arg)
-              (interactive "p")
-              (if (and (= 1 arg) (looking-back "\\([[:blank:]]\\|^\\)\\^"))
-                  (progn (delete-char -1)
-                         (insert typopunct-times))
-                (self-insert-command arg)))
-            (define-key typopunct-map "x" 'typopunct-insert-times)
-
-            (defadvice typopunct-insert-quotation-mark (around wrap-region activate)
-              (let* ((lang (or (get-text-property (point) 'typopunct-language)
-                               typopunct-buffer-language))
-                     (omark (if single
-                                (typopunct-opening-single-quotation-mark lang)
-                              (typopunct-opening-quotation-mark lang)))
-                     (qmark (if single
-                                (typopunct-closing-single-quotation-mark lang)
-                              (typopunct-closing-quotation-mark lang))))
-                (cond
-                 (mark-active
-                  (let ((skeleton-end-newline nil)
-                        (singleo (typopunct-opening-single-quotation-mark lang))
-                        (singleq (typopunct-closing-single-quotation-mark lang)))
-                    (if (> (point) (mark))
-                        (exchange-point-and-mark))
-                    (save-excursion
-                      (while (re-search-forward (regexp-quote (string omark)) (mark) t)
-                        (replace-match (regexp-quote (string singleo)) nil nil)))
-                    (save-excursion
-                      (while (re-search-forward (regexp-quote (string qmark)) (mark) t)
-                        (replace-match (regexp-quote (string singleq)) nil nil)))
-                    (skeleton-insert (list nil omark '_ qmark) -1)))
-                 ((looking-at (regexp-opt (list (string omark) (string qmark))))
-                  (forward-char 1))
-                 (t ad-do-it)))))
-  :init (progn
-          (add-hook 'text-mode-hook #'typopunct-mode)))
+  (req-package typo
+    :config (progn
+              (typo-global-mode 1))
+    :init (progn
+            (add-hook 'text-mode-hook #'typo-mode)))
 #+END_SRC
 
 ** avy