From 48e3f32497d16a3c39596194a1928679eb9a6ad0 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 19 May 2017 14:42:56 +0200 Subject: zsh: Remove $HOME/bin from path --- zsh/.config/zsh/.zshenv | 5 ----- 1 file changed, 5 deletions(-) diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 87276bd0..51323f10 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -53,11 +53,6 @@ then ;; esac - if [[ ${path[(I)$HOME/bin ]} ]] - then - path+=($HOME/bin) - fi - if [[ ${path[(I)$HOME/.local/bin ]} ]] then path+=($HOME/.local/bin) -- cgit 1.4.1 From 5216f41ddf542f3cebb530730b56bfb4acb9e7a8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 21 May 2017 11:07:50 +0200 Subject: Emacs: Don't set Linux fonts on Windows/WSL/X11 --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 628c90ec..78c51e58 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -220,7 +220,8 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource (if (eq displays 1) (ap/set-fonts "Lekton" 20 "Lucida Grande" 16 t) (ap/set-fonts "Monaco" 14 "Lucida Grande" 14 nil 0.1)))) - ((eq window-system 'x) + ((and (eq window-system 'x) + (not (getenv "windows"))) (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 14)) (ap/set-fonts "Fixed" 14 "Lucida" 14 nil)))) -- cgit 1.4.1 From 8cb99ca85533e3252289e0ccb5ebe1dc8c98fa15 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 21 May 2017 11:08:17 +0200 Subject: zsh: Set umask manually on Windows/WSL Previously, I ran the WSL environment as root, calling `login` to ensure all the right login stuff happens (mostly the setting of umask). Unfortunately, this complicated running commands from outside the environment and was a bit slower. --- zsh/.config/zsh/.zshenv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/.config/zsh/.zshenv b/zsh/.config/zsh/.zshenv index 114e5ce9..d1ea38e4 100644 --- a/zsh/.config/zsh/.zshenv +++ b/zsh/.config/zsh/.zshenv @@ -42,7 +42,8 @@ then read osrelease < /proc/sys/kernel/osrelease if [[ $osrelease =~ Microsoft$ ]] then - windows=1 + export windows=1 + umask 002 fi fi -- cgit 1.4.1 From 256624894ef9a1c23ae7dc5464029542398ca7ca Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 12:40:18 +0200 Subject: Fix display of readme on GitHub --- README.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.org b/README.org index 3acd8b22..6c85344c 100644 --- a/README.org +++ b/README.org @@ -20,7 +20,7 @@ It should work on: ** Installation -Clone the project anywhere, e.g. with =[[https://github.com/motemen/ghq][ghq]]= +Clone the project anywhere, e.g. with [[https://github.com/motemen/ghq][ghq]] #+BEGIN_SRC sh :exports code ghq get git://git.alanpearce.eu/dotfiles -- cgit 1.4.1 From 0e56fb4d2f283fa5548e205dcd6e0e924f98c91c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 12:40:42 +0200 Subject: Emacs: Load company-nixos-options later --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index fe3c6435..c4022517 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1035,6 +1035,7 @@ seems to work perfectly well for me. #+BEGIN_SRC emacs-lisp (use-package company-nixos-options + :defer 30 :config (progn (add-to-list 'company-backends 'company-nixos-options))) #+END_SRC -- cgit 1.4.1 From a4598d8f46876743549f31c3582e3209da8991ec Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 15:29:21 +0200 Subject: Emacs: Install imenu-anywhere --- emacs/.emacs.d/init.org | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index c4022517..c7935c19 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1791,6 +1791,15 @@ guess a definition. :config (setq dumb-jump-selector 'ivy)) #+END_SRC +** imenu-anywhere + +This is like imenu, but shows functions (or similar top-level +entities) across buffers in the same project. Neat! + +#+BEGIN_SRC emacs-lisp +(use-package imenu-anywhere + :bind ("C-x C-." . ivy-imenu-anywhere)) +#+END_SRC ** Lisps *** All -- cgit 1.4.1 From 7235841ea4cd6477ffe414a9065bf4e99bd05c1d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 15:29:35 +0200 Subject: Emacs: Load flycheck-flow after js2-mode --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index c7935c19..90aef783 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1727,6 +1727,7 @@ On-the-fly error checking in programming modes? Yes please. #+BEGIN_SRC emacs-lisp (use-package flycheck-flow + :after js2-mode :config (progn (flycheck-add-next-checker 'javascript-eslint 'javascript-flow))) #+END_SRC -- cgit 1.4.1 From 1ddfc50b1e25f757f6e40602d204b3a5ca7db91e Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 15:29:49 +0200 Subject: Emacs: Install flow-minor-mode --- emacs/.emacs.d/init.org | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 90aef783..451806da 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2047,6 +2047,15 @@ the project. This will allows emacs to find their executables. (add-hook 'js2-mode-hook #'add-node-modules-path))) #+END_SRC +**** Flow + +#+BEGIN_SRC emacs-lisp +(use-package flow-minor-mode + :after js2-mode + :config (progn + (add-hook 'js2-mode-hook #'flow-minor-enable-automatically))) +#+END_SRC + **** Indium Javascript with an inferior node.js process and a debugger? Awesome. -- cgit 1.4.1 From b64fafdae9c71648ffd0ac01446f1bcc7aa2c2e6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 16:48:45 +0200 Subject: Emacs: Don't flycheck on new-lines This slows down the editor --- emacs/.emacs.d/init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 451806da..9974cb85 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1718,7 +1718,7 @@ On-the-fly error checking in programming modes? Yes please. :defer 5 :config (progn (global-flycheck-mode) - (setq flycheck-check-syntax-automatically '(save new-line mode-enabled)) + (setq flycheck-check-syntax-automatically '(save mode-enabled)) (if (executable-find "eslint_d") (setq flycheck-javascript-eslint-executable "eslint_d")))) #+END_SRC -- cgit 1.4.1 From 6ae56a3dd7686a6b6d2f815e4478b4abd3f4b114 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 16:49:02 +0200 Subject: Emacs: Show flycheck messages as tooltips --- emacs/.emacs.d/init.org | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 9974cb85..a9344a7f 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1723,6 +1723,18 @@ On-the-fly error checking in programming modes? Yes please. (setq flycheck-javascript-eslint-executable "eslint_d")))) #+END_SRC +*** flycheck-pos-tip + +Show flycheck errors in a little popup, so I don't lose my place + +#+BEGIN_SRC emacs-lisp +(use-package flycheck-pos-tip + :after flycheck + :config (progn + (setq flycheck-display-errors-delay 0.5) + (flycheck-pos-tip-mode 1))) +#+END_SRC + *** flycheck-flow #+BEGIN_SRC emacs-lisp -- cgit 1.4.1 From 7846fd944c13a09578316924a1365a5b369a96b7 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 16:49:13 +0200 Subject: Emacs: Remove useless call to use-package-verbose --- emacs/.emacs.d/init.org | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index a9344a7f..85697fe3 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -76,8 +76,7 @@ the buffer to be empty. (use-package use-package :commands (use-package-autoload-keymap) :defer 5)) -(setq use-package-verbose t - use-package-always-ensure t +(setq use-package-always-ensure t package-enable-at-startup nil) #+END_SRC -- cgit 1.4.1 From bbf952dce8bfa1e6c6fffb576d93f5fad7bb24b4 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 16:51:47 +0200 Subject: Emacs: Make git-gutter look nicer --- emacs/.emacs.d/init.org | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 85697fe3..4b2303a5 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -172,7 +172,10 @@ Eziam looks nice, too :defines (eziam-scale-headings) :config (progn (setq eziam-scale-headings nil) - (load-theme 'eziam-light t))) + (load-theme 'eziam-light t) + (set-face-foreground 'git-gutter-fr:added "#96a4ab") + (set-face-foreground 'git-gutter-fr:modified "#96a4ab") + (set-face-foreground 'git-gutter-fr:deleted "#96a4ab"))) #+END_SRC Highlighting quasi-quoted expressions in lisps is quite useful, but I @@ -575,8 +578,19 @@ fringe so it doesn’t interfere with flycheck. :diminish git-gutter-mode :config (progn (global-git-gutter-mode 1) - (set-face-foreground 'git-gutter:modified "grey") - (setq git-gutter-fr:side 'right-fringe))) + ;; places the git gutter outside the margins. + (setq-default fringes-outside-margins t) + ;; thin fringe bitmaps + (fringe-helper-define 'git-gutter-fr:added '(center repeated) + "XXX.....") + (fringe-helper-define 'git-gutter-fr:modified '(center repeated) + "XXX.....") + (fringe-helper-define 'git-gutter-fr:deleted 'bottom + "X......." + "XX......" + "XXX....." + "XXXX....") + (setq git-gutter-fr:side 'left-fringe))) #+END_SRC ** magit -- cgit 1.4.1 From f44fe9318f27659a278af650d11f7e87e211fd6d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 22 May 2017 17:09:43 +0200 Subject: Emacs: Improve flycheck fringe indication Show a flat block of colour on the right fringe --- emacs/.emacs.d/init.org | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 4b2303a5..7cc2c99e 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1732,6 +1732,9 @@ On-the-fly error checking in programming modes? Yes please. :config (progn (global-flycheck-mode) (setq flycheck-check-syntax-automatically '(save mode-enabled)) + (setq flycheck-indication-mode 'right-fringe) + (fringe-helper-define 'flycheck-fringe-bitmap-double-arrow '(center repeated) + ".XXXXXXX") (if (executable-find "eslint_d") (setq flycheck-javascript-eslint-executable "eslint_d")))) #+END_SRC -- cgit 1.4.1 From 0932ad09f394290acf40c3dfffbcd1f61821b16b Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 10:27:07 +0200 Subject: Emacs: Simplify code display in eziam --- emacs/.emacs.d/init.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 7cc2c99e..2163361f 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -173,6 +173,8 @@ Eziam looks nice, too :config (progn (setq eziam-scale-headings nil) (load-theme 'eziam-light t) + (set-face-underline 'js2-function-call nil) + (set-face-bold 'font-lock-keyword-face nil) (set-face-foreground 'git-gutter-fr:added "#96a4ab") (set-face-foreground 'git-gutter-fr:modified "#96a4ab") (set-face-foreground 'git-gutter-fr:deleted "#96a4ab"))) -- cgit 1.4.1 From 0b7675b33faefe7463ca61048e7e4ebd35e54157 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 10:27:29 +0200 Subject: Emacs: Truncate lines instead of wrapping --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 2163361f..a8f9dc05 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2402,7 +2402,8 @@ Emacs has an editor within. (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) (setq sentence-end-double-space t - line-move-visual nil) + line-move-visual nil + truncate-lines t) #+END_SRC ** align -- cgit 1.4.1 From 7414f92ac921f40e4a5d785f31f79a436b62d3e6 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 15:47:28 +0200 Subject: Emacs: Install flycheck-vale, to check my English --- emacs/.emacs.d/init.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index a8f9dc05..3ed0e72b 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2314,6 +2314,17 @@ Sometimes I might want to show off my emacs usage. (add-hook 'prog-mode-hook #'flyspell-prog-mode))) #+END_SRC +** Style checking + +[[https://github.com/ValeLint/vale][Vale]] is a linter, but for prose. Neat idea! Salesman is a bad term. + +#+BEGIN_SRC emacs-lisp +(use-package flycheck-vale + :config (progn + (add-to-list 'flycheck-vale-modes 'org-mode) + (flycheck-vale-setup))) +#+END_SRC + * Scripting Make a shell-script buffer executable after saving it, if it has a shebang. -- cgit 1.4.1 From 1a8e5fd41a563b996745b0f66bfd5b9f86e7208f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 15:47:42 +0200 Subject: Emacs: Set truncate-lines correctly --- emacs/.emacs.d/init.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 3ed0e72b..8391ff73 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2413,8 +2413,8 @@ Emacs has an editor within. (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) (setq sentence-end-double-space t - line-move-visual nil - truncate-lines t) + line-move-visual nil) +(setq-default truncate-lines t) #+END_SRC ** align -- cgit 1.4.1 From 32ff2aca5ff86a2a024948dcb135ae946f9eba17 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 15:49:15 +0200 Subject: Emacs: Make the fringe smaller --- emacs/.emacs.d/init.org | 2 -- 1 file changed, 2 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 8391ff73..9e4a0552 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -292,12 +292,10 @@ Sometimes I like to hide clutter. Other times, it's useful. (defun hide-clutter () (interactive) - (fringe-mode '(4 . 8)) (hide-mode-line)) (defun show-clutter () (interactive) - (fringe-mode '(8 . 8)) (show-mode-line)) (hide-clutter) -- cgit 1.4.1 From bebf6f939455755b24528b64c171ce453c3a3e03 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 15:49:26 +0200 Subject: Emacs: Configure window-divider-mode on macOS It didn't work on previous releases using the NextStep window system, but with a new version of emacs-mac-port, it's good. Fortunately, Emacs knows the difference: window-system is either `ns` or `mac` --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 9e4a0552..d63803ba 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -311,7 +311,8 @@ Sometimes I like to hide clutter. Other times, it's useful. (add-to-list 'default-frame-alist '(border-width . 0)) (add-to-list 'default-frame-alist '(internal-border-width . 0)) -(when (eq window-system 'x) +(when (or (eq window-system 'x) + (eq window-system 'mac)) (setq window-divider-default-bottom-width 1 window-divider-default-right-width 1 window-divider-default-places t) -- cgit 1.4.1 From 02b31add360e8ecb529683f0c476b6627eae933f Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 23 May 2017 15:50:50 +0200 Subject: Emacs: Don't run hide-clutter by default --- emacs/.emacs.d/init.org | 1 - 1 file changed, 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index d63803ba..b28a06de 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -297,7 +297,6 @@ Sometimes I like to hide clutter. Other times, it's useful. (defun show-clutter () (interactive) (show-mode-line)) -(hide-clutter) (when mode-line-default-hidden (call-interactively #'hide-mode-line)) -- cgit 1.4.1 From 8830fc2affb29bdc47252ee9ef7a80b35b59344a Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 May 2017 10:56:43 +0200 Subject: Emacs: Fix error customising faces --- emacs/.emacs.d/init.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index b28a06de..ac42949e 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -173,11 +173,12 @@ Eziam looks nice, too :config (progn (setq eziam-scale-headings nil) (load-theme 'eziam-light t) - (set-face-underline 'js2-function-call nil) - (set-face-bold 'font-lock-keyword-face nil) - (set-face-foreground 'git-gutter-fr:added "#96a4ab") - (set-face-foreground 'git-gutter-fr:modified "#96a4ab") - (set-face-foreground 'git-gutter-fr:deleted "#96a4ab"))) + (custom-theme-set-faces 'user + '(js2-function-call ((t (:underline nil)))) + '(font-lock-keyword-face ((t (:weight normal)))) + '(git-gutter-fr:added ((t (:foreground "#96a4ab")))) + '(git-gutter-fr:modified ((t (:foreground "#96a4ab")))) + '(git-gutter-fr:deleted ((t (:foreground "#96a4ab"))))))) #+END_SRC Highlighting quasi-quoted expressions in lisps is quite useful, but I -- cgit 1.4.1 From 65072b5fb67e2f7e6a1761b12e799f68404f9cdb Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 May 2017 10:57:10 +0200 Subject: Emacs: Fix byte-compile errors/warnings --- emacs/.emacs.d/init.org | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index ac42949e..764b950c 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -513,7 +513,7 @@ based upon some folder conventions I use. :demand t :diminish projectile-mode :config (progn - (projectile-global-mode) + (projectile-mode 1) (add-to-list 'projectile-globally-ignored-directories ".stversions") (defun yarn-install (&optional arg) @@ -1277,7 +1277,7 @@ workplace, so I keep it in a host-specific, GPG-encrypted file. send-mail-function #'smtpmail-send-it message-send-mail-function #'smtpmail-send-it))) -(with-eval-after-load 'gnus-mime +(with-eval-after-load "gnus-mime" (define-key gnus-mime-button-map " " #'gnus-mime-view-part-externally)) (with-eval-after-load "mailcap" @@ -1734,8 +1734,9 @@ On-the-fly error checking in programming modes? Yes please. (global-flycheck-mode) (setq flycheck-check-syntax-automatically '(save mode-enabled)) (setq flycheck-indication-mode 'right-fringe) - (fringe-helper-define 'flycheck-fringe-bitmap-double-arrow '(center repeated) - ".XXXXXXX") + (with-eval-after-load 'git-gutter-fringe + (fringe-helper-define 'flycheck-fringe-bitmap-double-arrow '(center repeated) + ".XXXXXXX")) (if (executable-find "eslint_d") (setq flycheck-javascript-eslint-executable "eslint_d")))) #+END_SRC @@ -2353,6 +2354,7 @@ nice, when I remember to use it. #+BEGIN_SRC emacs-lisp (use-package eshell :bind ("C-c s" . eshell) + :functions (eshell/pwd) :config (progn (setq eshell-directory-name "~/.emacs.d/eshell" eshell-prompt-function (lambda () @@ -2437,7 +2439,7 @@ The most important one for me is JSON property alignment. I like to use the clipboard more than the primary selection in X11. #+BEGIN_SRC emacs-lisp -(setq x-select-enable-clipboard t +(setq select-enable-clipboard t save-interprogram-paste-before-kill t) (if (functionp 'x-cut-buffer-or-selection-value) (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)) -- cgit 1.4.1 From 444586dc3d9433659aa7aea40c665f7c088746ec Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 May 2017 10:57:26 +0200 Subject: Emacs: Don't hide mode-line --- emacs/.emacs.d/init.org | 1 - 1 file changed, 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 764b950c..6ab2fa9c 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -316,7 +316,6 @@ Sometimes I like to hide clutter. Other times, it's useful. (setq window-divider-default-bottom-width 1 window-divider-default-right-width 1 window-divider-default-places t) - (setq mode-line-default-hidden t) (window-divider-mode +1)) (add-hook 'after-change-major-mode-hook #'hide-mode-line-if-default-hidden) -- cgit 1.4.1 From 3dbb464cc6c70bcc43caf53c4460c253801f687a Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 May 2017 10:57:41 +0200 Subject: Emacs: Auto-load eshell when idle --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 6ab2fa9c..f4d1b6e8 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2353,6 +2353,7 @@ nice, when I remember to use it. #+BEGIN_SRC emacs-lisp (use-package eshell :bind ("C-c s" . eshell) + :defer 10 :functions (eshell/pwd) :config (progn (setq eshell-directory-name "~/.emacs.d/eshell" -- cgit 1.4.1 From eae9dacbdb09ca1b0274a23d0ebe97a5a3235db7 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 May 2017 15:10:51 +0200 Subject: Emacs: Fix exec-path warning --- emacs/.emacs.d/init.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index f4d1b6e8..6392f5cf 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -387,7 +387,9 @@ variables from whatever my shell configuration is. #+BEGIN_SRC emacs-lisp (use-package exec-path-from-shell :if (eq system-type 'darwin) - :config (exec-path-from-shell-initialize)) + :config (progn + (setq exec-path-from-shell-arguments '("-l")) + (exec-path-from-shell-initialize))) #+END_SRC * Keybindings -- cgit 1.4.1 From 43bca738588a0e1b3cc2719fde3203561f9aaabd Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 24 May 2017 15:11:05 +0200 Subject: Emacs: Fix undefined fringe-helper error --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 6392f5cf..b13f4e71 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -575,6 +575,7 @@ changed. This package colours the fringe. I have it set to the right fringe so it doesn’t interfere with flycheck. #+BEGIN_SRC emacs-lisp +(eval-when-compile (require 'fringe-helper)) (use-package git-gutter-fringe :defer 2 :diminish git-gutter-mode -- cgit 1.4.1 From 00bc25dbebf035f003e73f64c6a856cd0acf09a1 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:46:21 +0200 Subject: Emacs: Remove copy-as-format --- emacs/.emacs.d/init.org | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index b13f4e71..99978c3d 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2450,22 +2450,6 @@ I like to use the clipboard more than the primary selection in X11. (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))) #+END_SRC -*** Copy formatted code - -#+BEGIN_SRC emacs-lisp -(bind-key* "C-c w" (define-prefix-command 'copy-as-map)) -(use-package copy-as-format - :bind (("C-c C-w" . copy-as-format) - :map copy-as-map - ("b" . copy-as-format-bitbucket) - ("g" . copy-as-format-github) - ("h" . copy-as-format-hipchat) - ("w" . copy-as-format-html) - ("j" . copy-as-format-jira) - ("m" . copy-as-format-markdown) - ("s" . copy-as-format-slack))) -#+END_SRC - ** Selection I’m quite used to deleting text by selecting it and typing. Emacs has -- cgit 1.4.1 From c82f34646cba655b49d2bc2a2247efb46e01d518 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:46:38 +0200 Subject: Emacs: Use rg instead of ag for counsel-projectile --- emacs/.emacs.d/init.org | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 99978c3d..1bac4eff 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -549,7 +549,9 @@ based upon some folder conventions I use. projectile-completion-system 'ivy))) (use-package counsel-projectile - :config (counsel-projectile-on)) + :config (progn + (counsel-projectile-on) + (define-key projectile-mode-map [remap counsel-projectile-ag] #'counsel-projectile-rg))) #+END_SRC ** vc -- cgit 1.4.1 From e9049339b060d464e60374c22b918ba94fd78b69 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:47:06 +0200 Subject: Emacs: Tweak the fringe --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 1bac4eff..8d8f8441 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -302,7 +302,8 @@ Sometimes I like to hide clutter. Other times, it's useful. (when mode-line-default-hidden (call-interactively #'hide-mode-line)) -(setq-default indicate-buffer-boundaries 'left) +(setq-default indicate-buffer-boundaries nil) +(fringe-mode '(4 . 4)) (defun hide-mode-line-if-default-hidden () (if mode-line-default-hidden -- cgit 1.4.1 From d355dc10d2ff85f4bd07bf55d773d135832ef07d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:47:22 +0200 Subject: Emacs: Only load theme if it makes sense --- emacs/.emacs.d/init.org | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 8d8f8441..25a399a2 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -169,6 +169,8 @@ Eziam looks nice, too #+BEGIN_SRC emacs-lisp (use-package eziam-light-theme :ensure eziam-theme + :if (or window-system + server-name) :defines (eziam-scale-headings) :config (progn (setq eziam-scale-headings nil) -- cgit 1.4.1 From fc3d5ed0d20890cbb4350a7b774cd49269f91ebd Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 30 May 2017 11:47:39 +0200 Subject: Emacs: Always make the background white --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 25a399a2..6a904362 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -176,6 +176,7 @@ Eziam looks nice, too (setq eziam-scale-headings nil) (load-theme 'eziam-light t) (custom-theme-set-faces 'user + '(default ((t (:background "#ffffff")))) '(js2-function-call ((t (:underline nil)))) '(font-lock-keyword-face ((t (:weight normal)))) '(git-gutter-fr:added ((t (:foreground "#96a4ab")))) -- cgit 1.4.1 From e2cd7e8101cab293469deb21eb6758ba6b48a9dc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 17:37:50 +0200 Subject: Emacs: Set fonts on Windows --- emacs/.emacs.d/init.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index dbe38d64..a6aecc5a 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -229,7 +229,10 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource ((and (eq window-system 'x) (not (getenv "windows"))) (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 18)) - (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)))) + (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)) + ((and (eq window-system 'x) + (getenv "windows")) + (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil)))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1 From d2347ab4129a975b226aaab0d1d3aba806c5a766 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 17:52:17 +0200 Subject: Emacs: Detect Windows even outside of zsh environment --- emacs/.emacs.d/init.org | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index a6aecc5a..0719ad8c 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -18,6 +18,13 @@ Open Emacs with just a plain window. No graphics or messages, please! (remove-hook 'find-file-hooks #'vc-refresh-state) #+END_SRC +Are we running on Windows via the WSL? + +#+BEGIN_SRC emacs-lisp +(when (string-match "Microsoft$" (file-to-string "/proc/sys/kernel/osrelease")) + (setq system-type 'gnu/linux/windows)) +#+END_SRC + ** Compatibility #+BEGIN_SRC emacs-lisp @@ -227,12 +234,12 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource (ap/set-fonts "Monaco" 16 "Lucida Grande" 16 t 0.2) (ap/set-fonts "Monoid" 12 "Helvetica Neue" 12 t 0.1)))) ((and (eq window-system 'x) - (not (getenv "windows"))) + (not (eq system-type 'gnu/linux/windows))) (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 18)) (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)) ((and (eq window-system 'x) - (getenv "windows")) - (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil)))) + (eq system-type 'gnu/linux/windows)) + (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1 From f2f351569ffac639d5773d52f7482e77528eeb2c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 17:53:52 +0200 Subject: Emacs: Add missing paren --- emacs/.emacs.d/init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 0719ad8c..070f48c2 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -239,7 +239,7 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)) ((and (eq window-system 'x) (eq system-type 'gnu/linux/windows)) - (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil))) + (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil)))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1 From 3ee51fe5f1110072b345638b1fc8d91af92c8c85 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 21:32:18 +0200 Subject: Emacs: Swap fringes used by git-gutter/flycheck --- emacs/.emacs.d/init.org | 45 ++++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 6a904362..b9cbef9b 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -591,15 +591,15 @@ fringe so it doesn’t interfere with flycheck. (setq-default fringes-outside-margins t) ;; thin fringe bitmaps (fringe-helper-define 'git-gutter-fr:added '(center repeated) - "XXX.....") + ".XXX....") (fringe-helper-define 'git-gutter-fr:modified '(center repeated) - "XXX.....") + ".XXX....") (fringe-helper-define 'git-gutter-fr:deleted 'bottom - "X......." - "XX......" - "XXX....." - "XXXX....") - (setq git-gutter-fr:side 'left-fringe))) + ".......X" + "......XX" + ".....XXX" + "....XXXX") + (setq git-gutter-fr:side 'right-fringe))) #+END_SRC ** magit @@ -619,6 +619,17 @@ time. Make sure to set it up with a nice =completing-read-function= :init (add-hook 'magit-mode-hook #'magit-load-config-extensions)) #+END_SRC +** git-messenger + +Popup the last commit that changed the line at point. + +#+BEGIN_SRC emacs-lisp +(use-package git-messenger + :bind* (("C-x v p" . git-messenger:popup-message)) + :config (progn + (setq git-messenger:use-magit-popup t))) +#+END_SRC + ** git-timemachine This package allow me to go through a file’s history with just a few @@ -1305,7 +1316,7 @@ information here as well. #+BEGIN_SRC emacs-lisp (use-package bbdb :config (progn - (bbdb-initialize 'gnus 'mail 'message 'pgp) + (bbdb-initialize 'gnus 'message 'pgp) (bbdb-mua-auto-update-init 'gnus 'message) (setq bbdb-send-mail-style 'gnus bbdb-complete-mail-allow-cycling t @@ -1607,13 +1618,15 @@ works really nicely. (ledger-report "Budget (Cumulative)" nil))) :config (progn (setq ledger-use-iso-dates t - ledger-post-use-completion-engine :built-in + ledger-post-use-completion-engine :ido ledger-reconcile-default-commodity "€" ledger-clear-whole-transactions t ledger-narrow-on-reconcile t - ledger-default-date-format "%Y-%m-%d" - ledger-reports '(("Monthly Expenses" "ledger -f %(ledger-file) reg -M Expenses --real -l \"payee != 'Opening Balances'\"") - ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Expenses -p \"this month\"") + ledger-reports `(("Monthly Expenses" "ledger -f %(ledger-file) reg -M \\^Flex --real -X EUR -l \"payee != 'Opening Balances'\"") + ("Average Monthly Expenses (Past 12 Months)" ,(concat "ledger -f %(ledger-file) -b " + (format-time-string "%Y-%m" (time-add (current-time) (days-to-time -365))) + " --monthly --average balance ^Flex")) + ("Expenses:This Month" "ledger -f %(ledger-file) bal \\^Flex -p \"this month\"") ("On-budget Balances" "ledger -f %(ledger-file) bal --current -R :Budget: Assets:Receivable Liabilities:Personal") ("All Account Balances" "ledger -f %(ledger-file) bal --current -R \\^Assets \\^Liabilities") ("Budget Values (Current Month)" "ledger -f %(ledger-file) bal -p \"this month\" --limit \"payee=~/budget/\" \\^Funds") @@ -1646,7 +1659,9 @@ Org is wünderbar. (use-package org :bind (("C-c C-a" . org-agenda-list) ("C-c a" . org-agenda) - ("C-c l" . org-store-link)) + ("C-c l" . org-store-link) + :map org-src-mode-map + ("C-x C-s" . org-edit-src-exit)) :defer 8 :init (setq org-replace-disputed-keys t org-ellipsis "…") @@ -1741,10 +1756,10 @@ On-the-fly error checking in programming modes? Yes please. :config (progn (global-flycheck-mode) (setq flycheck-check-syntax-automatically '(save mode-enabled)) - (setq flycheck-indication-mode 'right-fringe) + (setq flycheck-indication-mode 'left-fringe) (with-eval-after-load 'git-gutter-fringe (fringe-helper-define 'flycheck-fringe-bitmap-double-arrow '(center repeated) - ".XXXXXXX")) + ".XXX....")) (if (executable-find "eslint_d") (setq flycheck-javascript-eslint-executable "eslint_d")))) #+END_SRC -- cgit 1.4.1 From 3a26b26766454af43ea39018a0ba1890bec99630 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 21:53:40 +0200 Subject: Emacs: Fix windows check file-to-string isn't actually a built-in function, even though it's named like one. --- emacs/.emacs.d/init.org | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 070f48c2..da476582 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -21,8 +21,11 @@ Open Emacs with just a plain window. No graphics or messages, please! Are we running on Windows via the WSL? #+BEGIN_SRC emacs-lisp -(when (string-match "Microsoft$" (file-to-string "/proc/sys/kernel/osrelease")) - (setq system-type 'gnu/linux/windows)) +(with-temp-buffer + (insert-file-contents-literally "/proc/sys/kernel/osrelease") + (decode-coding-region (point-min) (point-max) 'utf-8 t) + (when (string-match "Microsoft$" (buffer-string)) + (setq system-type 'gnu/linux/windows))) #+END_SRC ** Compatibility -- cgit 1.4.1 From 6ab6e58ab30e3e96210099151ae365fa79477b56 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 21:54:07 +0200 Subject: Emacs: Use exec-path-from-shell on gnu/windows --- emacs/.emacs.d/init.org | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index da476582..8ccca9a4 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -398,9 +398,13 @@ read them automatically any more. So, let’s use the [[https://github.com/purcell/exec-path-from-shell][exec-path-from-shell]] package to set up ~exec-path~ and similar variables from whatever my shell configuration is. +On Windows, I like to run Emacs from the system tray menu of VcXsrv. +It starts up without an environment in this case as well. + #+BEGIN_SRC emacs-lisp (use-package exec-path-from-shell - :if (eq system-type 'darwin) + :if (or (eq system-type 'darwin) + (eq system-type 'gnu/linux/windows)) :config (progn (setq exec-path-from-shell-arguments '("-l")) (exec-path-from-shell-initialize))) -- cgit 1.4.1 From 0086666d6d5f43ef8042a2efcf34c6405681406d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 22:27:52 +0200 Subject: Emacs: Tweak gnu/windows font sizes --- emacs/.emacs.d/init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 8ccca9a4..0bcacb1e 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -242,7 +242,7 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)) ((and (eq window-system 'x) (eq system-type 'gnu/linux/windows)) - (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil)))) + (ap/set-fonts "Noto Mono" 12 "Sans" 12 nil)))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1 From fee42496ab1efd7267578d40f844c55014f6c260 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 2 Jun 2017 09:58:09 +0200 Subject: Emacs: Setup dired-du-mode --- emacs/.emacs.d/init.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 9b814ecf..4917c4bd 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1198,6 +1198,17 @@ Expand subfolders like a tree inside the parent (bind-key "i" #'dired-subtree-toggle dired-mode-map)))) #+END_SRC +** Disk usage + +Combine dired and du (disk usage). + +#+BEGIN_SRC emacs-lisp +(use-package dired-du + :after dired + :config (progn + (setq dired-du-size-format t))) +#+END_SRC + ** Dired-narrow One can already use dired with wildcards to browse a filtered directory listing, but it opens a new buffer. Dired-narrow is a -- cgit 1.4.1 From c215cfcd4d857aba68b70fbf5c8f3131d2763911 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 3 Jun 2017 19:58:46 +0200 Subject: Emacs: Ensure osrelease file exists before reading --- emacs/.emacs.d/init.org | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 1529a6d2..5675f56c 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -21,11 +21,12 @@ Open Emacs with just a plain window. No graphics or messages, please! Are we running on Windows via the WSL? #+BEGIN_SRC emacs-lisp -(with-temp-buffer - (insert-file-contents-literally "/proc/sys/kernel/osrelease") - (decode-coding-region (point-min) (point-max) 'utf-8 t) - (when (string-match "Microsoft$" (buffer-string)) - (setq system-type 'gnu/linux/windows))) +(when (file-exists-p "/proc/sys/kernel/osrelease") + (with-temp-buffer + (insert-file-contents-literally "/proc/sys/kernel/osrelease") + (decode-coding-region (point-min) (point-max) 'utf-8 t) + (when (string-match "Microsoft$" (buffer-string)) + (setq system-type 'gnu/linux/windows)))) #+END_SRC ** Compatibility -- cgit 1.4.1 From 8eeadd7d1930abb31a330f14f2735a10584998da Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 4 Jun 2017 14:46:40 +0200 Subject: Emacs: Configure easy-hugo --- emacs/.emacs.d/init.org | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 5675f56c..34f24c42 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1040,6 +1040,17 @@ Directional window movement ("S-" . windmove-up) ("S-" . windmove-down))) #+END_SRC +* Blogging + +I have a [[https://alanpearce.uk][blog]] that I publish with hugo. + +#+BEGIN_SRC emacs-lisp +(use-package easy-hugo + :config (setq easy-hugo-basedir (car (split-string (shell-command-to-string "ghq list --full-path alanpearce.uk"))) + easy-hugo-url "https://alanpearce.uk" + easy-hugo-default-ext ".md")) +#+END_SRC + * Completion Make built-in completion a bit more intelligent, by adding substring -- cgit 1.4.1 From 6eaab8ee32bae08831da5040d1f0bf13e815ce65 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 4 Jun 2017 15:52:23 +0200 Subject: Emacs: Fix org-src keymap init --- emacs/.emacs.d/init.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 34f24c42..c6a59340 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -1700,9 +1700,7 @@ Org is wünderbar. (use-package org :bind (("C-c C-a" . org-agenda-list) ("C-c a" . org-agenda) - ("C-c l" . org-store-link) - :map org-src-mode-map - ("C-x C-s" . org-edit-src-exit)) + ("C-c l" . org-store-link)) :defer 8 :init (setq org-replace-disputed-keys t org-ellipsis "…") @@ -1746,6 +1744,12 @@ Org is wünderbar. (set-register ?o `(file . ,(expand-file-name "organiser.org" org-directory))) (add-hook 'org-mode-hook #'turn-on-auto-fill) (org-load-modules-maybe t))) + +(use-package org-src + :ensure nil + :after org + :config (progn + (bind-key "C-x C-s" #'org-edit-src-exit org-src-mode-map))) #+END_SRC **** org-babel -- cgit 1.4.1 From 7cbe8257a61d6bedb942d0fd15ad7aa018447012 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 4 Jun 2017 15:52:46 +0200 Subject: Emacs: Load flycheck-vale only if vale is executable --- emacs/.emacs.d/init.org | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index c6a59340..b3458c13 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -2388,6 +2388,7 @@ Sometimes I might want to show off my emacs usage. #+BEGIN_SRC emacs-lisp (use-package flycheck-vale + :if (executable-find "vale") :config (progn (add-to-list 'flycheck-vale-modes 'org-mode) (flycheck-vale-setup))) -- cgit 1.4.1