diff options
-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 7372891..ea33edf 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 1cc19f9..aad74be 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 545b82a..4c0e259 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 |