diff options
author | Alan Pearce | 2016-07-07 20:35:18 +0200 |
---|---|---|
committer | Alan Pearce | 2016-07-07 20:35:18 +0200 |
commit | 4e3692216b416c7128ea7d580ffd87b61332487a (patch) | |
tree | d08aefcd4e7ea66bab90c32ae604eef8e885866a | |
parent | a7d0f41f8f9b676b7a9be4fe8cf760db8ed8ad47 (diff) | |
parent | 6afa8022aa833d2452cf16b4161f5258276b4688 (diff) | |
download | nixfiles-4e3692216b416c7128ea7d580ffd87b61332487a.tar.lz nixfiles-4e3692216b416c7128ea7d580ffd87b61332487a.tar.zst nixfiles-4e3692216b416c7128ea7d580ffd87b61332487a.zip |
Merge branch 'master' of git.alanpearce.uk:alan/dotfiles
-rw-r--r-- | .gitignore | 2 | ||||
-rwxr-xr-x | hooks/post-up/emacs | 1 | ||||
-rw-r--r-- | tag-emacs/emacs.d/init.org | 72 |
3 files changed, 52 insertions, 23 deletions
diff --git a/.gitignore b/.gitignore index 7372891b..ea33edfb 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,6 @@ .#* # Byte-compiled files -*.elc *.zwc *.zwc.old .DS_Store -/tag-emacs/emacs.d/init.el* diff --git a/hooks/post-up/emacs b/hooks/post-up/emacs index 1cc19f9f..aad74be7 100755 --- a/hooks/post-up/emacs +++ b/hooks/post-up/emacs @@ -4,6 +4,7 @@ if [[ -s $commands[emacs] ]] then pushd ~/.emacs.d emacs --batch --eval "(progn +(setq vc-follow-symlinks nil) (find-file \"init.org\") (require 'ob-tangle) (org-babel-tangle nil \"init.el\") diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 545b82aa..4c0e2593 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -36,6 +36,51 @@ the buffer to be empty. ** Use-package #+BEGIN_SRC emacs-lisp + (defvar melpa-include-packages '(minimal-theme + highlight-stages + relative-buffers + dired+ + dired-subtree + dired-hacks-utils + dired-narrow + org-caldav + go-projectile + go-rename + go-guru + redshank + restclient + visual-regexp) + "Don't install any MELPA packages except these packages") + + (defvar package-filter-function nil + "Optional predicate function used to internally filter packages used by package.el. + + The function is called with the arguments PACKAGE VERSION ARCHIVE, where + PACKAGE is a symbol, VERSION is a vector as produced by `version-to-list', and + ARCHIVE is the string name of the package archive.") + + ;; Don't take MELPA versions of certain packages + (setq package-filter-function + (lambda (package version archive) + (or (not (string-equal archive "melpa")) + ;; install package in whitelist + (memq package melpa-include-packages) + ;; use all color themes + (string-match (format "%s" package) "-theme")))) + + (defadvice package--add-to-archive-contents + (around filter-packages (package archive) activate) + "Add filtering of available packages using `package-filter-function', if non-nil." + (when (or (null package-filter-function) + (funcall package-filter-function + (car package) + (funcall (if (fboundp 'package-desc-version) + 'package--ac-desc-version + 'package-desc-vers) + (cdr package)) + archive)) + ad-do-it)) + (eval-and-compile (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") ("marmalade" . "http://marmalade-repo.org/packages/") @@ -585,17 +630,6 @@ I only use this occasionally, but it’s nice for files outside of projects. (recentf-mode 1))) #+END_SRC -** spotlight - -An awesome way to open files on OS X. - -#+BEGIN_SRC emacs-lisp - (use-package spotlight - :defer 10 - :if (eq system-type 'darwin) - :config (setq spotlight-tmp-file "/tmp/.emacs-spotlight-tmp-file")) -#+END_SRC - ** Tramp Tramp is awesome. It makes SSH feel Unix-y. The proxy setup is so @@ -1849,7 +1883,12 @@ it though :interpreter ("node" . js2-mode) :functions js2-next-error :config (progn - (unbind-key [menu-bar javascript] js2-mode-map) + (define-key js2-mode-map [menu-bar Javascript] nil) + (defun js2--imenu-around (do-it name) + "Don't create a menu from js2-mode" + (unless (string-equal name "IM-Javascript-IDE") + (do-it name))) + (advice-add 'imenu-add-to-menubar :around #'js2--imenu-around) (setq js2-skip-preprocessor-directives t) (defun ap/javascript-setup () (auto-indent-mode -1)) @@ -2032,15 +2071,6 @@ nice, when I remember to use it. #+END_SRC -#+BEGIN_SRC emacs-lisp - (with-eval-after-load 'eshell - (use-package esh-buf-stack - :init (progn - (add-hook 'eshell-load-hook (lambda () - (setup-eshell-buf-stack) - (bind-key "M-q" #'eshell-push-command eshell-mode-map)))))) -#+END_SRC - *** Shells #+BEGIN_SRC emacs-lisp |