From 0b6acd37d6d60a624ce6a469ae552b30d65dce31 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Jul 2016 13:23:34 +0200 Subject: Emacs: Remove correct javascript menu --- tag-emacs/emacs.d/init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 545b82a..5c3a14c 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1849,7 +1849,7 @@ 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) (setq js2-skip-preprocessor-directives t) (defun ap/javascript-setup () (auto-indent-mode -1)) -- cgit 1.4.1 From ea6f0d0b28a6a4a31954e463077715580fc53145 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Jul 2016 13:23:50 +0200 Subject: Emacs: Remove js2 imenu menu --- tag-emacs/emacs.d/init.org | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 5c3a14c..6217e9a 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1850,6 +1850,11 @@ it though :functions js2-next-error :config (progn (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)) -- cgit 1.4.1 From eaff8a793480afc2e3f9f27d1c0c6280091c9fdb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Jul 2016 16:23:16 +0200 Subject: Fix init.el being generated in dotfiles --- hooks/post-up/emacs | 1 + 1 file changed, 1 insertion(+) 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\") -- cgit 1.4.1 From bce550f39714f5581540413b9fa0e6f8f21fa35b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Jul 2016 16:23:40 +0200 Subject: Remove now-unnecessary gitignore rules --- .gitignore | 2 -- 1 file changed, 2 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* -- cgit 1.4.1 From 94489bb8ce88f65c6a440f4f0953ad00248a1ab9 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Jul 2016 16:23:55 +0200 Subject: Remove unused packages --- tag-emacs/emacs.d/init.org | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 6217e9a..45d2ae7 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -585,17 +585,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 @@ -2037,15 +2026,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 -- cgit 1.4.1 From 6afa8022aa833d2452cf16b4161f5258276b4688 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 7 Jul 2016 16:24:11 +0200 Subject: Emacs: Avoid using MELPA for packages Create a whitelist of desired packages that are not (at the current time) available elsewhere --- tag-emacs/emacs.d/init.org | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 45d2ae7..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/") -- cgit 1.4.1