From 2ae305459c747e70e39b23af4f92e9faf398126d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 6 May 2016 12:51:34 +0200 Subject: Install volatile-highlights-mode --- tag-emacs/emacs.d/init.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 695fef92..b9518d34 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -203,6 +203,17 @@ By default, Emacs displays page breaks as ^L. Lines look much nicer. '("%f" (dired-directory dired-directory))) #+END_SRC +** Highlight Changes + +Highlight what just changed when I undo, yank, and so on. + +#+BEGIN_SRC emacs-lisp + (use-package volatile-highlights + :diminish volatile-highlights-mode + :config (progn + (volatile-highlights-mode t))) +#+END_SRC + ** Renaming major modes Diminishing major modes does not happen in the same manner as minor -- cgit 1.4.1 From daeb01f134721b5a6b75c5578ed7cf5309727d02 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 6 May 2016 12:51:50 +0200 Subject: Emacs: Make dtrt and editorconfig play together --- tag-emacs/emacs.d/init.org | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index b9518d34..65a1c437 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -738,9 +738,12 @@ guesses the correct settings for me. #+BEGIN_SRC emacs-lisp (use-package dtrt-indent :config (progn - (dtrt-indent-mode 1) - (add-hook 'editorconfig-custom-hooks (lambda () - (dtrt-indent-undo))) + (defun ap/dtrt-adapt-if-needed () + (unless editorconfig-mode + (dtrt-adapt))) + (if (fboundp #'editorconfig-mode) + (add-hook 'after-change-major-mode-hook #'ap/dtrt-adapt-if-needed) + (add-hook 'after-change-major-mode-hook #'dtrt-indent-adapt)) (defadvice dtrt-indent-try-set-offset (after toggle-smart-tabs activate) (smart-tabs-mode (or indent-tabs-mode -1))))) #+END_SRC -- cgit 1.4.1 From 2641165a32b4fb77257e9e8e37c1bd44e1ad919f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 9 May 2016 14:27:12 +0200 Subject: Emacs: Remove projectile-direnv --- tag-emacs/emacs.d/init.org | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 65a1c437..85a7df38 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -361,14 +361,6 @@ based upon some folder conventions I use. projectile-completion-system 'ivy))) #+END_SRC -I use [[https://github.com/direnv/direnv][direnv]] to automatically assign environment variables in project -directories. Now I can have them set inside emacs too. - -#+BEGIN_SRC emacs-lisp - (use-package projectile-direnv - :config (add-hook 'projectile-mode-hook #'projectile-direnv-export-variables)) -#+END_SRC - ** perspective This package makes buffer-switching inside of projects make sense, by -- cgit 1.4.1 From e63cfd0ddf6ada99bec0aca50c9d5be84a69f23b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 9 May 2016 14:28:49 +0200 Subject: Emacs: Remove unused functions --- tag-emacs/emacs.d/init.org | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 85a7df38..14e700ec 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -336,14 +336,7 @@ based upon some folder conventions I use. projectile-project-root-files-functions)) (-filter #'file-directory-p (directory-files dir t "\\<"))))) - (defun ap/-add-known-subfolder-projects (dir) - (-map #'projectile-add-known-project (--map (concat (file-name-as-directory dir) it) (ap/subfolder-projects dir)))) - - (defun ap/add-known-subfolder-projects () - (interactive) - (ap/-add-known-subfolder-projects (read-directory-name "Add projects under: "))) - - (defun ap/open-subfolder-project (from-dir &optional arg) + (defun ap/open-subfolder-project (from-dir &optional arg) (let ((project-dir (projectile-completing-read "Open project: " (ap/subfolder-projects from-dir)))) (projectile-switch-project-by-name (expand-file-name project-dir from-dir) arg))) -- cgit 1.4.1 From c870a66b1b9f6ea4c4c933e36367ebc31fe86196 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 9 May 2016 14:31:01 +0200 Subject: Emacs: Remove todos --- tag-emacs/emacs.d/init.org | 3 --- 1 file changed, 3 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 14e700ec..08145111 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1980,7 +1980,6 @@ good for embedded SQL though. :init (setq mmm-global-mode 'maybe)) #+END_SRC -**** TODO Setup for javascript + SQL * Spelling #+BEGIN_SRC emacs-lisp @@ -1991,8 +1990,6 @@ good for embedded SQL though. ispell-dictionary "british"))) #+END_SRC -*** TODO Set up some functions to switch between en-GB and de-DE - * Scripting Make a shell-script buffer executable after saving it, if it has a shebang. -- cgit 1.4.1 From c093c25d34a12f2f41dd5aa08435475c0451225b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 9 May 2016 14:31:26 +0200 Subject: Emacs: Remove mmm-mode --- tag-emacs/emacs.d/init.org | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 08145111..09de07d5 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1941,45 +1941,6 @@ I derived a mode for twig, in order to use its =mode-hook=. (add-to-list 'auto-mode-alist '("\\.html\\.twig\\'" . twig-mode)) #+END_SRC -*** mmm-mode - -With =web-mode= being so good, I don’t really use this much. It’s -good for embedded SQL though. - -#+BEGIN_SRC emacs-lisp - (use-package mmm-auto - :ensure mmm-mode - :defer 20 - :config (progn - (mmm-add-classes - '((php-sql - :submode sql-mode - :front "<<") :init (progn - (if (functionp 'web-mode) - (add-hook 'web-mode-hook #'emmet-mode)))) + (add-hook 'web-mode-hook #'emmet-mode))) #+END_SRC *** web-mode -- cgit 1.4.1 From 9e5c9b5d4a768679640c85f7b3a05f61a912b3fb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 9 May 2016 14:33:19 +0200 Subject: Emacs: Open tern-project files in json-mode --- tag-emacs/emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index d539b8a0..88eb9d23 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1871,7 +1871,8 @@ completions, besides other IDE-like things. (use-package json-mode :mode (("\\.json\\'" . json-mode) ("\\.sailsrc\\'" . json-mode) - ("composer\\.lock\\'" . json-mode))) + ("composer\\.lock\\'" . json-mode) + ("\\.tern-project\\'" . json-mode))) #+END_SRC *** restclient -- cgit 1.4.1 From edc8c93b6a569a39ed159117814e14c5da514ab3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 11 May 2016 15:40:46 +0200 Subject: Emacs: Remove keybind for undefined function --- tag-emacs/emacs.d/init.org | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 88eb9d23..dcb4f4e9 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -988,8 +988,7 @@ Don’t show uninteresting files in dired listings. :defer 5 :config (progn (diredp-toggle-find-file-reuse-dir 1) - (unbind-key "C-h C-m" dired-mode-map) - (bind-key "." #'diredp-describe-file dired-mode-map))) + (unbind-key "C-h C-m" dired-mode-map))) #+END_SRC Expand subfolders like a tree inside the parent -- cgit 1.4.1 From a6a79446121d2ac54d1ce462383998222e92e40d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 11 May 2016 15:41:13 +0200 Subject: Emacs: Fix byte-compiler warnings --- tag-emacs/emacs.d/init.org | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index dcb4f4e9..5426feb0 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1500,6 +1500,8 @@ I can use this to keep a journal. I should use it. **** org-mobile #+BEGIN_SRC emacs-lisp + (defun ap/org-mobile-pull (descriptor action file) + (org-mobile-pull)) (use-package org-mobile :defer 30 :ensure nil @@ -1533,8 +1535,6 @@ I can use this to keep a journal. I should use it. (concat (file-name-as-directory org-mobile-directory) org-mobile-capture-file)))) - (defun ap/org-mobile-pull (descriptor action file) - (org-mobile-pull)) (setq org-mobile-watcher (file-notify-add-watch org-file '(change) #'ap/org-mobile-pull)))))))) #+END_SRC @@ -1749,6 +1749,7 @@ A REPL thing (and more) for Lisp. (use-package clj-refactor :defer t + :functions (clj-refactor-mode cljr-add-keybindings-with-prefix) :config (progn (cljr-add-keybindings-with-prefix "C-c C-m")) :init (progn -- cgit 1.4.1 From 2807e16d1726f203dc9a9d9f7eb5bcf3accdc9d3 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 11 May 2016 15:41:33 +0200 Subject: Emacs: Fix typo in function name --- 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 5426feb0..a1561fc8 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -725,7 +725,7 @@ guesses the correct settings for me. :config (progn (defun ap/dtrt-adapt-if-needed () (unless editorconfig-mode - (dtrt-adapt))) + (dtrt-indent-adapt))) (if (fboundp #'editorconfig-mode) (add-hook 'after-change-major-mode-hook #'ap/dtrt-adapt-if-needed) (add-hook 'after-change-major-mode-hook #'dtrt-indent-adapt)) -- cgit 1.4.1 From 8e381df2b74ec9f854ef4a52ac6f87513212f545 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 11 May 2016 15:41:58 +0200 Subject: Emacs: Disable org-mobile --- tag-emacs/emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index a1561fc8..0fe83fd4 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -1505,6 +1505,7 @@ I can use this to keep a journal. I should use it. (use-package org-mobile :defer 30 :ensure nil + :disabled t :config (progn (setq org-mobile-directory "~/Mobile/Org" org-mobile-inbox-for-pull "~/Mobile/Org/from-mobile.org") -- cgit 1.4.1 From aceb35a7305b36a7be4b5f10bdd15e21d079b948 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 11 May 2016 15:42:09 +0200 Subject: Emacs: Fix typo in function name --- tag-emacs/emacs.d/init.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 0fe83fd4..23d07543 100644 --- a/tag-emacs/emacs.d/init.org +++ b/tag-emacs/emacs.d/init.org @@ -2120,8 +2120,8 @@ type them. (add-hook 'text-mode-hook #'typo-mode) (defun typo-mode-turn-off () (typo-mode -1)) - (add-hook 'yaml-mode-hook #'turn-off-typo-mode) - (add-hook 'jinja2-mode-hook #'turn-off-typo-mode))) + (add-hook 'yaml-mode-hook #'typo-mode-turn-off) + (add-hook 'jinja2-mode-hook #'typo-mode-turn-off))) #+END_SRC ** avy -- cgit 1.4.1