├── .gitignore
├── HISTORY.md
├── LICENSE
├── README.md
├── config
├── conf-inferior.el
├── conf-mail.el
├── conf-work.el
├── custom.el
└── eshell
│ ├── alias
│ └── profile
├── init.el
├── layers
├── mjl-org
│ ├── README.org
│ ├── config.el
│ ├── img
│ │ ├── mjl-org.png
│ │ └── mjl-org.xcf
│ ├── layers.el
│ └── packages.el
├── mjl
│ ├── README.org
│ ├── config.el
│ ├── funcs.el
│ ├── img
│ │ └── icon-milo.png
│ └── keybindings.el
├── org-journal
│ ├── README.org
│ └── packages.el
└── squiz
│ ├── README.org
│ ├── config.el
│ ├── funcs.el
│ ├── img
│ └── squiz.png
│ └── keybindings.el
└── snippets
├── README.md
├── c-mode
└── source-header
├── emacs-lisp-mode
└── source-header
├── fundamental-mode
└── source-header
└── message-mode
├── 24x7
├── handover
└── this-week
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore KDE/Mac/Windows meta files
2 | .directory
3 | .DS_Store
4 | Thumbs.db
5 | probes.json
6 | /config/eshell/history
7 | /config/eshell/lastdir
8 |
--------------------------------------------------------------------------------
/HISTORY.md:
--------------------------------------------------------------------------------
1 | # OLD HISTORY
2 |
3 | I used to keep Change Log sections in my files, but with git (and especially
4 | Magit), this practice is increasingly dated.
5 |
6 | So At this point (after Tag 0.200) I will now only maintain the DVCS log. Also
7 | I'm removing the Change Log section from all the files that have one, and
8 | keeping that history here (however incomplete it is).
9 |
10 | NO FURTHER CHANGES TO HISTORY.md ARE PLANNED. It's just for old history while I
11 | was exploring Spacemacs (and git/magit)
12 |
13 | ## init.el
14 |
15 | ```elisp
16 | ;; MJL20151215 - Created, all user config done in `dotspacemacs/user-config' to
17 | ;; begin with
18 | ;; MJL20151220 - Added personal snippets - not working
19 | ;; - moved mu4e config out to a `required' feature file
20 | ;; - load the PHP layer, but without the `php-extras' package,
21 | ;; which is having Quelpa compilation issues
22 | ;; MJL20151220 - tidy variables declarations in layers list
23 | ;; MJL20151221 - added my personal layer `mjl' to the layers list
24 | ;; MJL20160104 - source code header added, with change log
25 | ;; - added `time-stamp' and `copyright-update'to 'before-save-hook
26 | ;; MJL20160106 - use the `mu4e' layer from Spacemacs, rather than my own.
27 | ;; MJL20160107 - added xkcd layer
28 | ;; MJL20160111 - turned off display-time-mode because it doesn't always appear,
29 | ;; and it stops the HUD from showing on the far right.
30 | ;; MJL20160124 - Updated to spacemacs-0.105.9 : new variables
31 | ;; MJL20160125 - clojure layer
32 | ;; MJL20160128 - configure inferior shells, and rename mue4e-config
33 | ;; MJL20160129 - squiz layer (just shove it in the variable for now)
34 | ;; - Re-order the Layers list with host-specific stuff at the end
35 | ;; MJL20160130 - Put shells on top (also left/right will work...)
36 | ;; MJL20160201 - Fixed the ugly ~ in the fringe
37 | ;; MJL20160203 - moved Emacs metadata (after ^L at bottom)
38 | ;; - right-shift the fringe bits one bit to better space for vsplit
39 | ;; - set scroll-bar-mode left (but don't turn it on)
40 | ;; MJL20160205 - Maximize at startup
41 | ;; MJL20160206 - Customize `dotspacemacs-configuration-layers' by
42 | ;; `system-type' and `system-name'
43 | ;; - Group `dotspacemacs/user-config' variables logically
44 | ;; - only require simple config code if relevant Layer is loaded
45 | ;; MJL20160207 - Fix smooth-scroll (`dotspacemacs-smooth-scrolling' didn't?)
46 | ;; - Set `global-prettify-symbols-mode' for lambda etc.
47 | ;; - Load Clojure layer only on Linux and Mac
48 | ;; MJL20160208 - use Spacemacs naming convention for private variables
49 | ;; MJL20160210 - require the mu4e config for work systems, rather than test
50 | ;; for the layer, because my layer config is a list
51 | ;; - UI tweeks (emacs-leader-key, whitespace, powerline, Customize)
52 | ;; MJL20160212 - weirdly after I moved the `squiz' later, I have to expand the
53 | ;; script filename myself now for my $HOME
54 | ;; MJL20160220 - Org-mode configured as a Layer
55 | ;; - Updated to spacemacs-0.105.10: nothing new
56 | ;; MJL20160226 - I've got a new workstation - a MacBook Air called mutsu
57 | ;; MJL20160301 - mu4e location for brew on Mac. Not ideal
58 | ;; MJL20160313 - turn line numbers on
59 | ;; MJL20160319 - deft note taking
60 | ;; MJL20160323 - Puppet layer
61 | ;; MJL20160328 - Updated to spacemacs-0.105.14: template comments
62 | ;; MJL20160412 - default shell height 66%
63 | ;; MJL20160419 - Enable menu-bar-mode on a Mac
64 | ;; MJL20160422 - Updated to spacemacs-0.105.19: template comments
65 | ;; - Experimenting with M-s-Space for the leader key
66 | ;; MJL20160427 - csv-mode package (no layer)
67 | ;; MJL20160504 - automatically copy mouse selection to kill ring
68 | ;; - M-s-Space as leader is not good, back to s-Space
69 | ;; - minimap package (no layer)
70 | ;; MJL20160512 - Google Chrome edit-server extension code
71 | ;; MJL20160528 - "Squiz" directory renamed to generic "Work"
72 | ;; MJL20160616 - install `request' because it's not loading in latest update?
73 | ;; MJL20160701 - org-journal
74 | ;; MJL20160808 - use a random ASCII banner
75 | ;; MJL20161105 - Upgraded to spacemacs-0.200.5: new/replaced variables
76 | ;; MJL20161117 - imenu-list
77 | ;; MJL20161126 - Graphviz
78 | ;; MJL20161213 - leave `dotspacemacs-configuration-layer-path' as default
79 | ;; MJL20161222 - smaller default face
80 | ;; MJL20170101 - add sql layer
81 | ;; - remove `org' and `org-journal' layers from `mjl--layers':
82 | ;; now declared by `mjl-org', which will also configure
83 | ;; MJL20170127 - add scheme and yaml layers, sicp
84 | ;; MJL20170201 - use Squiz style initials on a Mac, Nyan is back,
85 | ;; MJL20170202 - idle-highlight-mode
86 | ;; MJL20170221 - default shell: emacs, window width instead of full frame
87 | ;; MJL20170227 - eshell: set the config directory to load all control files
88 | ;; MJL20170306 - use chrome layer for edit-server, and add local config
89 | ;; - refactor layers lists (fixes issue #5)
90 | ```
91 |
92 | ## conig/conf-inferior.el
93 |
94 | ```elisp
95 | ;; MJL20160128 - Created
96 | ;; MJL20160129 - Renamed: mjl not really necessary. "conf" isn't either in the
97 | ;; filename, except to make it match the feature name
98 | ;; MJL20160203 - Emacs metadata
99 | ```
100 |
101 | ## config/conf-mail.el
102 |
103 | ```elisp
104 | ;; MJL20151210 - Created
105 | ;; MJL20160203 - Emacs metadata
106 | ;; MJL20160210 - eval after loading the mu4e package
107 | ;; MJL20160220 - Renamed to conf-mail
108 | ;; - hide the updates in minibuffer
109 | ;; - handle html emails better
110 | ;; MJL20160301 - Show thread-subject headers
111 | ;; MJL20160308 - ImageMagick register types
112 | ;; - remove INBOX.team shortcut
113 | ;; MJL20160316 - Mac Brew has no mbsync, use offlineimap to get mail
114 | ;; MJL20160415 - get mail less often, since it's so slow to clean up
115 | ;; MJL20160614 - Going all-google for Work. No more imap/index step
116 | ```
117 |
118 | ## config/conf-work.el
119 |
120 | ```elisp
121 | ;; MJL20170302 - Created (browse-url-browser-function)
122 | ;; MJL20170304 - edit-server (from `chrome' Layer) configuration
123 | ```
124 |
125 | ## layers/mjl/config.el
126 |
127 | ```elisp
128 | ;; MJL20151220 - Created
129 | ;; MJL20160104 - Added source code header with change log.
130 | ;; MJL20160203 - Emacs metadata
131 | ;; MJL20160206 - variables to switch keybinding groups off
132 | ;; - remove the Mac option/meta/super switch
133 | ;; MJL20170201 - variable to specify Work initials
134 | ```
135 |
136 | ## layers/mjl/funcs.el
137 |
138 | ```elisp
139 | ;; MJL200002?? - Created (Bash sub-shell settings and custom C modes)
140 | ;; MJL20030225 - Added function for inserting the ISO date
141 | ;; - Added function to insert a modification date prefix
142 | ;; MJL20030326 - New function `insert-date-dow' inserts current ISO date,
143 | ;; followed by the day of week, bound to S-F12
144 | ;; MJL20080715 - Refactor my date-insert functions to use `format-time-string'
145 | ;; MJL20080904 - `mjl/shell': use emacs as the editor
146 | ;; MJL20081101 - `mjl/shell': fewer (comint-send-input) calls.
147 | ;; MJL20090907 - Adopted Emacs Starter Kit -- relocated defuns here
148 | ;; MJL20091009 - Remember-mode pop-up (1st attempt, from Linux ideas)
149 | ;; MJL20100317 - `mjl/shell' now runs cygwin/bash on Windows
150 | ;; MJL20100324 - `copy-line' [http://www.emacswiki.org/emacs/CopyingWholeLines]
151 | ;; MJL20100512 - test for Windows using symbols instead of string=
152 | ;; MJL20100603 - `mjl/save-to-dos' `mjl/save-to-unix' and `mjl/save-to-mac'
153 | ;; MJL20100625 - `mjl/shell' introduced bug on Unix, fixed by setting vars
154 | ;; only on Windows
155 | ;; MJL20100726 - Fix bug in EDITOR var for `mjl/shell'
156 | ;; MJL20110705 - `mjl/calc-other-frame' for launching calc from clients
157 | ;; MJL20110829 - `mjl/dired-view-file' and friends to browse files in dired.
158 | ;; MJL20111130 - Zazra's cyberpunk cursor
159 | ;; MJL20111212 - changed namespace convertion to use `mjl/'
160 | ;; MJL20111213 - moved global key bingings to mjl/bindings.el
161 | ;; - relocated org functions here, from old mjl/org.old
162 | ;; - renamed to mjl/defuns.el
163 | ;; - use local vars in `mjl/calc-other-frame' and
164 | ;; `mjl/remember-frame'
165 | ;; - `mjl/insert-date-stamp' removed unneeded decode-time call
166 | ;; MJL20131127 - Use a variable for mjl/insert-date-stamp function
167 | ;; MJL20140710 - Added `mjl/edit-current-file-as-root'
168 | ;; MJL20140722 - Added `mjl/diff-buffer-with-file'
169 | ;; MJL20140724 - include (buffer-name) in difference buffers of
170 | ;; `mjl/duff-buffer-with-file'
171 | ;; MJL20140724 - Added `mjl/mu4e-headers-narrow-unread'
172 | ;; MJL20140724 - added `mjl/change-log'
173 | ;; MJL20140917 - added `mjl/client-save-kill-emacs'
174 | ;; MJL20140929 - fixed `mjl/open-org-files' to be non-hard-coded
175 | ;; MJL20150106 - added `mjl/titlebar' from init.el code
176 | ;; MJL20151221 - Renamed to layers/mjl/funcs.el (spacemacs)
177 | ;; - removed functions no longer required in spacemacs
178 | ;; - adopted Spacemacs naming convention for "private",
179 | ;; non-command functions (two slashes)
180 | ;; MJL20151222 - Use Nyan Cat rainbow colours for the cyberpunk cursor
181 | ;; MJL20160318 - `mjl/pretty-print-xml-region' from old =tools.el=
182 | ;; MJL20160811 - `split-window-prefer-horizontally'
183 | ;; MJL20170201 - `mjl/insert-date-work' and `mjl/hacker-type'
184 | ;; - `mjl/ui-toggle-gui' also toggles scroll bars
185 | ```
186 |
187 | ## layers/mjl/keybindings.el
188 |
189 | ```elisp
190 | ;; MJL20151220 - Created, copied from osx layer, then imported much from my own
191 | ;; ~/.emacs.d/mjl/boot/bindings.el
192 | ;; MJL20151222 - Added rest of Sun keys and my F-keys
193 | ;; MJL20160102 - bind font scaling to C-+/- as well (easy to type, doesn't
194 | ;; break much)
195 | ;; MJL20160104 - Swap F2 and F3 to better match physical key labels
196 | ;; - bind font scaling to s-\ and s-] as well (these are in roughly
197 | ;; traditional places on the TEK 209)
198 | ;; MJL20160111 - bind `helm-M-x' to the
/ key, it's better, now I
199 | ;; know how to use it.
200 | ;; - map s-f, s-r, and within isearch-mode-map
201 | ;; - remove C-z binding: it causes more trouble than it's worth
202 | ;; MJL20160118 - C-z and C-v: make them modern bindings: I don't use the defaults
203 | ;; MJL20160203 - Emacs metadata
204 | ;; MJL20160206 - variables control whether to bind key groupings
205 | ;; - take out the Mac meta/option/super stuff -- osx layer can better
206 | ;; handle this, and now I'm not conflicting the bindings
207 | ;; MJL20160316 - (temporary hack) `wdired-change-to-wdired-mode' binding
208 | ;; MJL20160318 - binding for helm-M-x on my TEK229/PC mode, plugged into a Mac Air
209 | ;; MJL20160319 - M-n and M-p for paging with a Mac
210 | ;; MJL20160420 - binding for helm-M-x on my TEK229/PC mode, plugged into a Mac Pro
211 | ;; MJL20160729 - bind org-toggle-checkbox in Markdown mode too, since it works.
212 | ;; MJL20160808 - Bind and to whatever C-a and C-e are bound to
213 | ;; (heh, almost exactly 16 years later, still fixing home/end)
214 | ;; MJL20160911 - super-shift-S Save-As
215 | ;; - super-shift-O Open directory
216 | ;; MJL20161014 - window split bindings like my iTerm2
217 | ;; MJL20161104 - different -keys bound to M-x, for different OS
218 | ;; MJL20170109 - Use super up/dn for paging up/down on a Mac (same as native)
219 | ;; MJL20170201 - Bind the super-UP/DOWN if we're NOT binding OSX keys
220 | ;; ourselves (because we're relying on the `osx' layer to do Mac
221 | ;; keys, but that layer doesn't include extras)
222 | ;; - `spacemacs/set-leader-keys' for date stamps (od*)
223 | ;; - `spacemacs/set-leader-keys' for toggling Ruler
224 | ;; (tR, which is not reserved, but available and sensible...)
225 | ;; - `spacemacs/set-leader-keys' for `mjl/ui-toggle-gui' (Tu)
226 | ;; MJL20170215 - `spacemacs/set-leader-keys' for `mjl/insert-timestamp-org' (odo)
227 | ```
228 |
229 | ## layers/mjl-org/canfig.el
230 |
231 | ```elisp
232 | ;; MJL20160129 - Created
233 | ;; MJL20160203 - Emacs metadata
234 | ```
235 |
236 | ## layers/mjl-org/layers.el
237 |
238 | ```elisp
239 | ;; MJL20170101 - Created. Specify org and org-journal layers as requirements.
240 | ```
241 |
242 | ## layers/mjl-org/packages.elisp
243 |
244 | ```elisp
245 | ;; MJL20160201 - Created
246 | ```
247 |
248 | ## layers/squiz/config.el
249 |
250 | ```elisp
251 | ;; MJL20160129 - Created, from old `squiz-funcs.el'
252 | ;; MJL20160203 - Emacs metadata
253 | ;; MJL20160805 - location of Pingdom Keys file.
254 | ;; - change the default directory location
255 | ```
256 |
257 | ## layers/squiz/funcs.el
258 |
259 | ```elisp
260 | ;; MJL20140703 - Created (wiid)
261 | ;; MJL20140808 - put the timestamp near front of buffer name
262 | ;; MJL20140819 - shorter aliases
263 | ;; MJL20160129 - Moved into a Spacemacs Layer "squiz"
264 | ;; - Changed the namespace to `squiz-` from `mjl/', per Spacemacs
265 | ;; practice, and the naming to - | / | //
266 | ;; MJL20160203 - Emacs metadata
267 | ;; MJL20160205 - Whitespace
268 | ;; MJL20160805 - source the Pingdom keys before calling the script
269 | ;; MJL20161013 - delete other windows, since I'm always doing that manually
270 | ```
271 |
272 | ## layers/squiz/keybindings.el
273 |
274 | ```elisp
275 | ;; MJL20160129 - Created
276 | ;; MJL20160203 - Emacs metadata (still no actual code)
277 | ```
278 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Michael Lockhart
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Personal Spacemacs configuration
2 | ====
3 |
4 | This is my [Spacemacs](http://spacemacs.org) configuration (see [Spacemacs on Github](https://github.com/syl20bnr/spacemacs)
5 | ).
6 |
7 | ---
8 |
9 | Note: This project is [Mastered at GitLab](https://gitlab.com/milohax/dotspacemacs) and [Pushed to Github](https://github.com/sinewalker/dotspacemacs)
10 |
11 | ---
12 |
13 | I've been an [Emacs](https://www.gnu.org/software/emacs/) user since the late 1990s and I've been keeping my emacs configuration ever since February 2000 when it was just a simple `.emacsrc` until it evolved over time to something quite complex and hairy. In recent months it's developed a will of its own, to the point where I cannot easily maintain it: if I make a change to something, three other things will unexpectedly break.
14 |
15 | So, I have declared ***Emacs Configuration Bankruptcy***.
16 |
17 | What to do!?
18 |
19 | Well, I recently discovered [use-package](https://github.com/jwiegley/use-package), which offers a way to replace my own ELPA-wrangling code (based off the [Emacs Starter Kit, version 2](https://github.com/technomancy/emacs-starter-kit/tree/v2)) with something much more sensible and simple. It's great, but I would still need to write many package configurations to tidy up what I've accumulated over the years and make it all make sense and work.
20 |
21 | Then I discovered ***Spacemacs***, which uses `use-package` and comes with *batteries included* in the form of *Layers*. Wow, this is so elegant and importantly, much of the package installations/configurations I've been doing on my own are already done for me (by people with much more skill than I). So, I'm getting in on it!
22 |
23 | Of course it still needs tweaking to personal taste (there's no accounting for personal taste), and that is what this project is for.
24 |
25 | I've made it Public because I will be [blogging as I go along](http://milosophical.me/tags/spacemacs.html). My main aims in configuring Spacemacs are:
26 |
27 | * Make it less like vim (I know, people tell me vim is great but I don't agree)
28 | * Add my personal utility `defun`s, where still required (in a Layer or two)
29 | * Configure personal preference variables
30 | * Add modern/super-keybindings (similar to the existing `osx` Layer plus
31 | some of the less radical ideas from [ErgoEmacs](http://ergoemacs.org/))
32 | * Configure separate Layers for different groupings of settings
33 | * Contrive to add different groups of Layers for different hosts I install Spacemacs to (e.g. some Layers for Windows/Cygwin settings that are only added when on a Windows host, or a settings for Work that are only loaded on hosts with a specific name)
34 |
35 | That should pretty well be all I do with this, aside from adding/removing layers as I want, and the perpetual fiddling that comes with acquired OCECD (Obsessive Compulsive Emacs Configuration Disorder).
36 |
37 | I'm learning as I go, always. You might find what I do here instructive, or at least interesting, or you might find it crazy. That's okay.
38 |
--------------------------------------------------------------------------------
/config/conf-inferior.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: conf-inferior.el
4 | ;; Created: 2016-01-28
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:38:32 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: GNU
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2016, 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Configure inferior shells for GNU environment
14 | ;;
15 | ;; This simply sets up all the inferior mode settings to work with runtimes
16 | ;; that are typically available in GNU/Linux
17 | ;;
18 | ;; HISTORY
19 | ;;
20 | ;; Old logs up to tag 0.200 are in HISTORY.md
21 | ;; See git log after for changes after 2017-03-06
22 | ;;
23 |
24 | (setq inferior-lisp-program "clisp"
25 | scheme-program-name "guile"
26 | python-shell-interpreter "python")
27 |
28 | (defun mjl//run-some-python (interpreter &optional dedicated show)
29 | "wrapper for `run-python' which sets `python-shell-interpreter'
30 | to the specified program INTERPRETER and then runs it. If the
31 | program cannot be found, then just exit with a message."
32 | (if (executable-find interpreter)
33 | (run-python interpreter dedicated show)
34 | (message (format "No %s interpreter found" interpreter))))
35 |
36 |
37 | ;; I'm deliberately mimicking the naming of `run-python' here
38 |
39 | (defun run-ipython3 ()
40 | "Runs ipython3 as the inferior python shell"
41 | (interactive)
42 | (mjl//run-some-python "ipython3" nil t))
43 |
44 |
45 | (defun run-ipython ()
46 | "Runs ipython as the inferior python shell"
47 | (interactive)
48 | (mjl//run-some-python "ipython" nil t))
49 |
50 | (defun run-ipython2 ()
51 | "Runs ipython as the inferior python shell"
52 | (interactive)
53 | (run-ipython))
54 |
55 | (defun run-python3 ()
56 | "Runs python3 as the inferior python shell"
57 | (interactive)
58 | (mjl//run-some-python "python3" nil t))
59 |
60 | (defun run-python2 ()
61 | "Runs python2 as the inferior python shell"
62 | (interactive)
63 | (mjl//run-some-python "python2" nil t))
64 |
65 | (provide 'conf-inferior)
66 |
67 | ;;; Local Variables: ***
68 | ;;; mode:Emacs-lisp ***
69 | ;;; fill-column: 79 ***
70 | ;;; comment-column: 0 ***
71 | ;;; End: ***
72 |
--------------------------------------------------------------------------------
/config/conf-mail.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: conf-mail.el
4 | ;; Created: 2015-12-20
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:39:30 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2015-2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Personal Mu 4 Emacs settings
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; This sets up mu4e for my email (currently for Squiz only)
20 | ;;
21 | ;; note:- this is not all the configuration for emails. I also have account
22 | ;; details:
23 | ;;
24 | ;; - IMAP sync (mbsync) in ~/.mbsyncrc
25 | ;; - IMAP password in ~/keys/password.imap
26 | ;; - SMTP: in ~/.authinfo
27 | ;; - Signature: in ~/.signature
28 | ;;
29 | ;; the two password/auth files MUST be protected at the operating system
30 | ;; level (i.e. owner-only file access) and MUST NOT be added to revision
31 | ;; control.
32 | ;;
33 | ;;
34 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
35 | ;;
36 | ;;; Change Log:
37 | ;;
38 | ;; Old logs up to tag 0.200 are in HISTORY.md
39 | ;; See git log after for changes after 2017-03-06
40 | ;;
41 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
42 | ;;
43 | ;;; Code:
44 |
45 | (with-eval-after-load 'mu4e
46 |
47 | (setq mu4e-headers-include-related t
48 | mu4e-headers-skip-duplicates t
49 | mu4e-headers-visible-lines 18
50 | mu4e-use-fancy-chars t
51 | ;mu4e-view-mode-hook '((turn-on-visual-line-mode)) ;MJL20151213 gives errors
52 | mu4e-headers-date-format "%Y-%m-%d %T%z"
53 | mu4e-headers-fields
54 | '( (:date . 25)
55 | (:flags . 6)
56 | (:from . 22)
57 | (:thread-subject . nil))
58 | mu4e-sent-folder "/sent"
59 | mu4e-drafts-folder "/drafts"
60 | mu4e-trash-folder "/trash"
61 | mu4e-refile-folder "/archive"
62 | mu4e-maildir-shortcuts
63 | '(("/archive" . ?a)
64 | ("/INBOX" . ?i)
65 | ("/sent" . ?s)
66 | ("/oldmail" . ?o))
67 |
68 |
69 | ;;mu4e-html2text-command "html2text -utf8 -width 72"
70 | mu4e-html2text-command "w3m -dump -T text/html"
71 | mu4e-show-images t
72 | mu4e-view-show-images t
73 | mu4e-view-prefer-html t
74 | mu4e-use-fancy-chars t
75 |
76 |
77 | mu4e-user-mail-address-list '("mlockhart@squiz.net"
78 | "lockhart.mic@gmail.com")
79 | mu4e-reply-to-address "mlockhart@squiz.net"
80 |
81 | ; mu4e-get-mail-command "offlineimap"
82 | ; mu4e-get-mail-command "true" ; TODO: determine a faster way to index
83 | ; mu4e-update-interval 600
84 | ; mu4e-hide-index-messages t
85 |
86 |
87 | mail-user-agent 'mu4e-user-agent
88 | user-mail-address "mlockhart@squiz.net"
89 | user-full-name "Mike Lockhart"
90 | message-signature t ; use -/.signature
91 |
92 | message-send-mail-function 'smtpmail-send-it ; for gnus/message/mu4e
93 | send-mail-function 'smtpmail-send-it ; for 'mail' -- just in case
94 | smtpmail-smtp-server "mail-staff.squiz.net"
95 | smtpmail-local-domain "squiz.net"
96 | smtpmail-smtp-service 587
97 | smtpmail-stream-type 'starttls
98 | smtpmail-debug-info t)
99 |
100 | (when (fboundp 'imagemagick-register-types)
101 | (imagemagick-register-types))
102 |
103 | ;; note the magic numbers: these are the ASCII codes for the bookmark
104 | ;; shortcuts, I think, set by Emacs Customize when I created the bookmarks on
105 | ;; my old Emacs setup. Actually, can just put ?A for the A character, rather
106 | ;; than work out the number. That's not so bad
107 |
108 | (setq mu4e-bookmarks '(("flag:unread AND NOT
109 | flag:trashed" "Unread messages" ?u)
110 | ("date:today..now" "Today's messages" ?t)
111 | ("flag:flagged" "Flagged messages" ?f)
112 | ("date:7d..now" "Last 7 days" ?w)
113 | ("mime:image/*" "Messages with images" ?p)
114 | ("subject:24x7" "24x7 activity reports" ?2)
115 | ;("subject:Open NR" "Open NR reports" 79)
116 | ("from:support@squiz.com.au AND subject:Comment Added " "Zendesk Reply Ticket Lists" ?z)
117 | ;("subject:P3 Report" "P1/2/3 Reports" 80)
118 | ("from:support@squiz.com.au Ticket OR from:support@squiz.com.au" "Tickets" ?T)
119 | ;("subject:Stats Records" "Status Reports" 83)
120 | ("subject:Support Handover" "Handover emails" ?H)
121 | ("subject:svn commit" "Subversion Commits" ?V)
122 | ("NOT subject:svn* AND NOT subject:Spacewalk* AND NOT subject:HIPO* AND NOT subject:*Handover* AND NOT subject:\"Zendesk end-user removal notice\" AND (to:everyone@squiz.net OR to:everyone@squiz.com.au OR from:jloh OR from:dgraver OR from:parmstrong OR from:ncallahan OR from:kdavison OR from:mgough OR from:dbelcher OR from:dbenfield OR from:asharpe OR from:mwalker OR from:jmao OR from:ndavis OR from:atwin OR from:jalomes OR from:jalvares OR from:alagrange OR from:acarrucan OR from:mlockhart OR from:bbanda OR from:dschoern OR from:smcinerney OR to:cru@squiz.com.au OR to:cru@squiz.net OR to:cru-au@squiz.net OR cru-au@squiz.com.au OR to:sysadmin OR to:sysadmin-au OR to:security OR to:support OR to:support-team-global to:australia OR to:hobart-office OR to:australia@squiz.net OR cc:mlockhart)" "from Squiz Team" ?q)
123 | ("(subject:DOWN OR subject:alert OR subject:PROBLEM OR subject:RECOVERY OR from:alert@pingdom.com OR from:bb@nre.vic.gov.au OR from:outages@wholesale.eftel.com OR from:noreply@eftel.com OR to:support-monitor) AND NOT from:support@squiz.com.au" "Alerts" ?A)
124 | ("to:mlockhart AND NOT from:support AND NOT from:nagios AND NOT from:service-requests AND NOT subject:Zendesk end-user removal notice AND NOT subject:[JIRA]* AND NOT subject:24x7 Activity*" "to ME" ?m)
125 | ("subject:This Week in Support" "This Week in Support" ?7)
126 | ("to:jokes@squiz.com.au OR to:jokes@squiz.net" "Squiz jokes" ?J)))
127 | )
128 |
129 | (provide 'conf-mail)
130 |
131 | ;;; Local Variables: ***
132 | ;;; mode:Emacs-lisp ***
133 | ;;; fill-column: 79 ***
134 | ;;; comment-column: 0 ***
135 | ;;; End: ***
136 |
--------------------------------------------------------------------------------
/config/conf-work.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: conf-work.el
4 | ;; Created: 2017-03-02
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:40:09 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: Apple Macintosh OS X
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Personal Work settings
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; This sets personal preferences for Squiz.
20 | ;;
21 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 | ;;
23 | ;;; Change Log:
24 | ;;
25 | ;; Old logs up to tag 0.200 are in HISTORY.md
26 | ;; See git log after for changes after 2017-03-06
27 | ;;
28 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29 | ;;
30 | ;;; Code:
31 |
32 |
33 | ;; Chrome layer configuration
34 |
35 | ;; Open specific web site text areas in different modes
36 | ;; or as markdown buffers by default
37 | (when (member 'chrome dotspacemacs-configuration-layers)
38 | ; (require 'edit-server)
39 | (setq edit-server-url-major-mode-alist
40 | '(("github\\.com" . org-mode))
41 | ;;TODO confim or install modes for moin and jira
42 | ;;'(("opswiki\\.squiz\\.net" . moin-moin-mode))
43 | ;;'(("jira\\.squiz\\.net" . jira-mode))
44 | '(("." . markdown-mode)))
45 |
46 | (add-to-list 'edit-server-new-frame-alist '(width . 140))
47 | (add-to-list 'edit-server-new-frame-alist '(height . 60))
48 |
49 | ;;switch focus to Chrome after done editing
50 | (add-hook 'edit-server-done-hook (lambda () (shell-command
51 | "open -a \"Google Chrome\"")))
52 | ;(edit-server-start)
53 | )
54 |
55 | ;; use browser depending on url
56 | ;; (default to firefox overriding the OS default)
57 | ;;
58 | ;; Note:- the requires wrapper scripts on macOS to open the browser. e.g.
59 | ;; ~/bin/forefox:
60 | ;;;;
61 | ;; #!/usr/bin/env bash
62 | ;;
63 | ;; open -a "FirefoxDeveloperEdition" $@
64 |
65 |
66 | (setq
67 | browse-url-browser-function
68 | '(
69 | ("squiz\\.net" . browse-url-default-browser)
70 | ("gitlab" . browse-url-chromium)
71 | ("google" . browse-url-chromium)
72 | ("github" . browse-url-firefox)
73 | ("thefreedictionary\\.com" . eww-browse-url)
74 | ("." . browse-url-firefox)
75 | ))
76 |
77 | (provide 'conf-work)
78 |
79 | ;;; Local Variables: ***
80 | ;;; mode:Emacs-lisp ***
81 | ;;; fill-column: 79 ***
82 | ;;; comment-column: 0 ***
83 | ;;; End: ***
84 |
--------------------------------------------------------------------------------
/config/custom.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: ~/.spacemacs.d/config/custom.el
4 | ;; Created: 2018-04-04
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2018-04-05 09:07:59 mjl>
7 | ;; Platform: Emacs (Spacemacs)
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2018 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Emacs(Spacemacs) Customize configuration file
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; Moved from ~/.spacemacs.d/init.el by setting `custom-file' in the
20 | ;; `dotspacemacs/user-config' function.
21 | ;;
22 | ;; Do not write anything past this comment. This is where Emacs will
23 | ;; auto-generate custom variable definitions.
24 | ;;
25 |
26 | (custom-set-variables
27 | ;; custom-set-variables was added by Custom.
28 | ;; If you edit it by hand, you could mess it up, so be careful.
29 | ;; Your init file should contain only one such instance.
30 | ;; If there is more than one, they won't work right.
31 | '(confirm-kill-emacs nil))
32 | (custom-set-faces
33 | ;; custom-set-faces was added by Custom.
34 | ;; If you edit it by hand, you could mess it up, so be careful.
35 | ;; Your init file should contain only one such instance.
36 | ;; If there is more than one, they won't work right.
37 | )
38 |
--------------------------------------------------------------------------------
/config/eshell/alias:
--------------------------------------------------------------------------------
1 | alias -- cd -
2 | alias .. cd ..
3 | alias ... cd ../..
4 | alias .... cd ../../..
5 | alias ..... cd ../../../..
6 | alias ...... cd ../../../../..
7 | alias ....... cd ../../../../../..
8 | alias ........ cd ../../../../../../..
9 | alias ......... cd ../../../../../../../..
10 | alias .......... cd ../../../../../../../../..
11 | alias ........... cd ../../../../../../../../../..
12 | alias admin open https://$1/_admin
13 | alias df df -h
14 | alias diff ediff $1 $2
15 | alias diffrev ediff-revision $1
16 | alias dsfluch dscacheutil -flushcache
17 | alias dsstore find . -name '*.DS_Store' -type f -ls -delete
18 | alias ec e
19 | alias ed e
20 | alias edit e
21 | alias emacs e
22 | alias ff e
23 | alias fo find-file-other-window $1
24 | alias gd magit-diff-unstaged
25 | alias gdd magit-diff-dwim
26 | alias gds magit-diff-staged
27 | alias gdu magit-diff-unstaged
28 | alias ged magit-ediff-unstaged
29 | alias gedS magit-ediff-show-stash $1
30 | alias gedd magit-ediff-dwim
31 | alias geds magit-ediff-show-staged $1
32 | alias gedu magit-ediff-show-unstaged $1
33 | alias gep magit-ediff-popup
34 | alias glh magit-log-head
35 | alias gll magit-log-all
36 | alias gs magit-status
37 | alias gss magit-stage-modified ALL
38 | alias httpdump sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E \"Host\: .*|GET \/.*\"
39 | alias keys ls ~/key
40 | alias khelp khelpcenter help:/$1 2> /dev/null
41 | alias kinfo khelpcenter info:/$1 2> /dev/null
42 | alias kman khelpcenter man:/$1 2> /dev/null
43 | alias l ls
44 | alias less view
45 | alias lh llh
46 | alias ll ls -l
47 | alias lla ls -a
48 | alias llh ls -lh
49 | alias lll ls -alh
50 | alias lr ll -tr
51 | alias lt ll -t
52 | alias md mkdir -p $1; cd $1
53 | alias nocache open https://$1/_nocache
54 | alias path echo $PATH
55 | alias probes find . -name 'probes.json' -type f -ls -delete
56 | alias q exit
57 | alias recache open https://$1/_recache
58 | alias revert magit-file-checkout HEAD $1
59 | alias showip curl http://ipecho.net/plain; echo
60 | alias squizup pushd ~/Work/svn; svn update; popd
61 | alias ssh-ls ssh-master
62 | alias ssh-master ls -so ~/.ssh/*master*
63 | alias v for i in ${eshell-flatten-list $*} {find-file-read-only $i}
64 | alias view for i in ${eshell-flatten-list $*} {find-file-read-only $i}
65 | alias vso curl -vso /dev/null
66 | alias vsoc curl -vso /dev/null -H "Cache-Control: no-cache"
67 | alias vsol curl -vso /dev/null -L
68 | alias wanip dig +short myip.opendns.com @resolver1.opendns.com
69 | alias x exit
70 |
--------------------------------------------------------------------------------
/config/eshell/profile:
--------------------------------------------------------------------------------
1 | # -*- mode:emacs-lisp -*-
2 | # set a $CDPATH if we didn't inherrit it from Emacs' parent process environment
3 | (when (= 0 (length (getenv "CDPATH")))
4 | (setq-local _CDPATH '())
5 | (mapcar (lambda (dir) (when (file-executable-p dir) (push dir _CDPATH)))
6 | '("~/Uploads" "~/Downloads" "~/dev" "~/tmp"
7 | "~/Work" "~/Work/svn" "~/Work/lab" "~/Work/Projects" "~/Work/Documents"
8 | "~/hax" "~/Projects" "~/Documents" "~/net" "~/Grid" "~" "."))
9 | (setenv "CDPATH" (mapconcat 'identity _CDPATH path-separator))
10 | (setq-local _CDPATH nil))
11 |
12 | (setenv "PAGER" "cat") > /dev/null
13 | (setenv "BROWSER" "firefox") > /dev/null
14 |
15 | #OS-specific initialisations
16 | echo OS Kernel: $system-type
17 |
18 | alias open
19 | (when (eq system-type 'gnu/linux)
20 | (eshell/alias 'open "xdg-open $*"))
21 | (when (eq system-type 'windows-nt)
22 | (eshell/alias 'open "start $*"))
23 |
24 |
--------------------------------------------------------------------------------
/init.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- mode: emacs-lisp -*-
2 | ;;
3 | ;; File: ~/.spacemacs.d/init.el
4 | ;; Created: 2015-12-15
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2018-04-04 23:30:52 mjl>
7 | ;; Platform: Emacs (Spacemacs)
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2015-2018 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Personal Spacemacs configuration file
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; This file is loaded by Spacemacs at startup.
20 | ;; It must be stored in one of these locations:
21 | ;;
22 | ;; - in your home directory as ~/.spacemacs
23 | ;; - in ~/.spacemacs.d/init.el
24 | ;; - in $SPACEMACSDIR/init.el if that environment variable is set
25 | ;;
26 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 | ;;
28 | ;;; Change Log:
29 | ;;
30 | ;; Old logs up to tag 0.200 are in HISTORY.md
31 | ;; See git log after for changes after 2017-03-06
32 | ;;
33 | ;;; BUGS
34 | ;;
35 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
36 | ;;
37 | ;;; Code:
38 |
39 |
40 |
41 | (defun dotspacemacs/layers ()
42 | "Configuration Layers declaration.
43 | You should not put any user code in this function besides modifying the variable
44 | values."
45 | (setq-default
46 | ;; Base distribution to use. This is a layer contained in the directory
47 | ;; `+distribution'. For now available distributions are `spacemacs-base'
48 | ;; or `spacemacs'. (default 'spacemacs)
49 | dotspacemacs-distribution 'spacemacs
50 | ;; Lazy installation of layers (i.e. layers are installed only when a file
51 | ;; with a supported type is opened). Possible values are `all', `unused'
52 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers
53 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will
54 | ;; lazy install any layer that support lazy installation even the layers
55 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy
56 | ;; installation feature and you have to explicitly list a layer in the
57 | ;; variable `dotspacemacs-configuration-layers' to install it.
58 | ;; (default 'unused)
59 | dotspacemacs-enable-lazy-installation 'unused
60 | ;; If non-nil then Spacemacs will ask for confirmation before installing
61 | ;; a layer lazily. (default t)
62 | dotspacemacs-ask-for-lazy-installation t
63 | ;; If non-nil layers with lazy install support are lazy installed.
64 | ;; List of additional paths where to look for configuration layers.
65 | ;; Paths must have a trailing slash (i.e. `~/.mycontribs/')
66 | dotspacemacs-configuration-layer-path '()
67 | ;; List of configuration layers to load.
68 | ;; ----------------------------------------------------------------
69 | ;; List of useful layers to have in Spacemacs. This should only list
70 | ;; layers to be loaded on /every/ system I install Spacemacs to. If a
71 | ;; layer should be loaded only on some of the systems, or loaded
72 | ;; everywhere but configured differently, then it belongs in /each/ of the
73 | ;; /other/ lists as appropriate, which follow.
74 | ;; ----------------------------------------------------------------
75 | dotspacemacs-configuration-layers
76 | '(
77 | (auto-completion :variables
78 | auto-completion-private-snippets-directory
79 | "~/.spacemacs.d/snippets/")
80 | better-defaults
81 | (colors :variables
82 | colors-enable-nyan-cat-progress-bar (display-graphic-p))
83 | deft
84 | emacs-lisp
85 | erc
86 | git
87 | lua
88 | markdown
89 | mjl-org
90 | puppet
91 | python
92 | semantic
93 | (shell :variables
94 | shell-default-shell 'eshell
95 | shell-default-full-span t
96 | shell-default-height 33
97 | shell-default-position 'bottom)
98 | spell-checking
99 | sql
100 | syntax-checking
101 | vagrant
102 | version-control
103 | xkcd
104 | yaml
105 | )
106 | )
107 |
108 | ;; ----------------------------------------------------------------
109 | ;; These list layers to load on specific platforms or systems
110 | ;; ----------------------------------------------------------------
111 | (setq
112 | ;; Layers to be loaded only on Microsoft Windows
113 | mjl--windows-nt-layers
114 | '(
115 | (mjl :variables
116 | mjl-bind-osx-keys t
117 | mjl-bind-unix-keys nil) ; don't work in Windows
118 | )
119 | ;; Layers to be loaded only on Macintosh
120 | mjl--darwin-layers
121 | '(
122 | osx
123 | (mjl :variables
124 | mjl-bind-osx-keys nil ; bound by osx layer
125 | mjl-bind-unix-keys nil ; don't exist on a Mac
126 | mjl-work-initials "MLo") ; Squiz-style initials
127 | )
128 | ;; Layers to be loaded only on GNU/Linux
129 | mjl--gnu/linux-layers
130 | '(
131 | (mjl :variables
132 | mjl-bind-osx-keys t
133 | mjl-bind-unix-keys t)
134 | )
135 | ;; Layers common to Unix systems
136 | mjl--nix-layers
137 | '(
138 | (clojure :variables
139 | clojure-enable-fancify-symbols t)
140 | graphviz
141 | scheme
142 | )
143 | ;; Layers to be loaded only on Work computers
144 | mjl--work-layers
145 | '(
146 | chrome
147 | (squiz :variables
148 | squiz-wiid-script (expand-file-name
149 | "~/Work/lab/whyisitdown/whyisitdown")
150 | squiz-wiid-keys (expand-file-name
151 | "~/Work/lab/whyisitdown/keys"))
152 | )
153 | ;; A list of system-names I use at work
154 | ;; Whenever I install spacemacs to a new system, add it's `system-name'
155 | mjl--work-systems
156 | '("milo"
157 | "mutsu")
158 | )
159 | ;; ----------------------------------------------------------------
160 | ;; now append the layers lists depending on what the system is
161 | ;; ----------------------------------------------------------------
162 |
163 | ;; arrange layers lists first
164 | (setq mjl--layers dotspacemacs-configuration-layers)
165 | (setq mjl--darwin-layers
166 | (append mjl--darwin-layers mjl--nix-layers)
167 | mjl--gnu/linux-layers
168 | (append mjl--gnu/linux-layers mjl--nix-layers))
169 |
170 | (cond ((eq system-type 'windows-nt)
171 | (setq mjl--layers (append mjl--layers mjl--windows-nt-layers)))
172 | ((eq system-type 'darwin)
173 | (setq mjl--layers (append mjl--layers mjl--darwin-layers)))
174 | ((eq system-type 'gnu/linux)
175 | (setq mjl--layers (append mjl--layers mjl--gnu/linux-layers))))
176 | (when (member (car (split-string system-name "\\.")) mjl--work-systems)
177 | (setq mjl--layers (append mjl--layers mjl--work-layers)))
178 |
179 | (setq-default
180 | ;; ----------------------------------------------------------------
181 | ;; Now just set the master layers list from `mjl-layers' appended above
182 | ;; ----------------------------------------------------------------
183 | dotspacemacs-configuration-layers mjl--layers
184 | ;; List of additional packages that will be installed without being
185 | ;; wrapped in a layer. If you need some configuration for these
186 | ;; packages, then consider creating a layer. You can also put the
187 | ;; configuration in `dotspacemacs/user-config'.
188 | dotspacemacs-additional-packages '(
189 | csv-mode
190 | idle-highlight-mode
191 | imenu-list
192 | minimap
193 | sicp
194 | transpose-frame
195 | )
196 | ;; A list of packages that cannot be updated.
197 | dotspacemacs-frozen-packages '()
198 | ;; A list of packages that will not be installed and loaded.
199 | dotspacemacs-excluded-packages '(
200 | php-extras ; MJL20151220 compilation errors
201 | )
202 | ;; Defines the behaviour of Spacemacs when installing packages.
203 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'.
204 | ;; `used-only' installs only explicitly used packages and uninstall any
205 | ;; unused packages as well as their unused dependencies.
206 | ;; `used-but-keep-unused' installs only the used packages but won't uninstall
207 | ;; them if they become unused. `all' installs *all* packages supported by
208 | ;; Spacemacs and never uninstall them. (default is `used-only')
209 | dotspacemacs-install-packages 'used-only))
210 |
211 | (defun dotspacemacs/init ()
212 | "Initialization function.
213 | This function is called at the very startup of Spacemacs initialization
214 | before layers configuration.
215 | You should not put any user code in there besides modifying the variable
216 | values."
217 | ;; This setq-default sexp is an exhaustive list of all the supported
218 | ;; spacemacs settings.
219 | (setq-default
220 | ;; If non nil ELPA repositories are contacted via HTTPS whenever it's
221 | ;; possible. Set it to nil if you have no way to use HTTPS in your
222 | ;; environment, otherwise it is strongly recommended to let it set to t.
223 | ;; This variable has no effect if Emacs is launched with the parameter
224 | ;; `--insecure' which forces the value of this variable to nil.
225 | ;; (default t)
226 | dotspacemacs-elpa-https t
227 | ;; Maximum allowed time in seconds to contact an ELPA repository.
228 | dotspacemacs-elpa-timeout 5
229 | ;; If non nil then spacemacs will check for updates at startup
230 | ;; when the current branch is not `develop'. Note that checking for
231 | ;; new versions works via git commands, thus it calls GitHub services
232 | ;; whenever you start Emacs. (default nil)
233 | dotspacemacs-check-for-update nil
234 | ;; If non-nil, a form that evaluates to a package directory. For example, to
235 | ;; use different package directories for different Emacs versions, set this
236 | ;; to `emacs-version'.
237 | dotspacemacs-elpa-subdirectory nil
238 | ;; One of `vim', `emacs' or `hybrid'.
239 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the
240 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list
241 | ;; with `:variables' keyword (similar to layers). Check the editing styles
242 | ;; section of the documentation for details on available variables.
243 | ;; (default 'vim)
244 | dotspacemacs-editing-style 'emacs
245 | ;; If non nil output loading progress in `*Messages*' buffer. (default nil)
246 | dotspacemacs-verbose-loading nil
247 | ;; Specify the startup banner. Default value is `official', it displays
248 | ;; the official spacemacs logo. An integer value is the index of text
249 | ;; banner, `random' chooses a random text banner in `core/banners'
250 | ;; directory. A string value must be a path to an image format supported
251 | ;; by your Emacs build.
252 | ;; If the value is nil then no banner is displayed. (default 'official)
253 | dotspacemacs-startup-banner 'official
254 | ;; List of items to show in startup buffer or an association list of
255 | ;; the form `(list-type . list-size)`. If nil then it is disabled.
256 | ;; Possible values for list-type are:
257 | ;; `recents' `bookmarks' `projects' `agenda' `todos'."
258 | ;; List sizes may be nil, in which case
259 | ;; `spacemacs-buffer-startup-lists-length' takes effect.
260 | dotspacemacs-startup-lists '((recents . 5)
261 | (projects . 7))
262 | ;; True if the home buffer should respond to resize events.
263 | dotspacemacs-startup-buffer-responsive t
264 | ;; Default major mode of the scratch buffer (default `text-mode')
265 | dotspacemacs-scratch-mode 'text-mode
266 | ;; List of themes, the first of the list is loaded when spacemacs starts.
267 | ;; Press T n to cycle to the next theme in the list (works great
268 | ;; with 2 themes variants, one dark and one light)
269 | dotspacemacs-themes '(spacemacs-dark
270 | spacemacs-light
271 | monokai
272 | leuven
273 | solarized-dark
274 | solarized-light)
275 | ;; If non nil the cursor color matches the state color in GUI Emacs.
276 | dotspacemacs-colorize-cursor-according-to-state t
277 | ;; Default font, or prioritized list of fonts. `powerline-scale' allows to
278 | ;; quickly tweak the mode-line size to make separators look not too crappy.
279 | dotspacemacs-default-font '("Anonymous Pro"
280 | :size 13
281 | :weight normal
282 | :width normal
283 | :powerline-scale 1.1)
284 | ;; The leader key
285 | dotspacemacs-leader-key "SPC"
286 | ;; The key used for Emacs commands (M-x) (after pressing on the leader key).
287 | ;; (default "SPC")
288 | dotspacemacs-emacs-command-key "SPC"
289 | ;; The key used for Vim Ex commands (default ":")
290 | dotspacemacs-ex-command-key ":"
291 | ;; The leader key accessible in `emacs state' and `insert state'
292 | ;; (default "M-m")
293 | dotspacemacs-emacs-leader-key "s-SPC"
294 | ;; Major mode leader key is a shortcut key which is the equivalent of
295 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",")
296 | dotspacemacs-major-mode-leader-key ","
297 | ;; Major mode leader key accessible in `emacs state' and `insert state'.
298 | ;; (default "C-M-m")
299 | dotspacemacs-major-mode-emacs-leader-key "s-,"
300 |
301 | ;; These variables control whether separate commands are bound in the GUI to
302 | ;; the key pairs C-i, TAB and C-m, RET.
303 | ;; Setting it to a non-nil value, allows for separate commands under
304 | ;; and TAB or and RET.
305 | ;; In the terminal, these pairs are generally indistinguishable, so this only
306 | ;; works in the GUI. (default nil)
307 | dotspacemacs-distinguish-gui-tab nil
308 | ;; If non nil `Y' is remapped to `y$' in Evil states. (default nil)
309 | dotspacemacs-remap-Y-to-y$ t
310 | ;; If non-nil, the shift mappings `<' and `>' retain visual state if used
311 | ;; there. (default t)
312 | dotspacemacs-retain-visual-state-on-shift t
313 | ;; If non-nil, J and K move lines up and down when in visual mode.
314 | ;; (default nil)
315 | dotspacemacs-visual-line-move-text nil
316 | ;; If non nil, inverse the meaning of `g' in `:substitute' Evil ex-command.
317 | ;; (default nil)
318 | dotspacemacs-ex-substitute-global nil
319 | ;; Name of the default layout (default "Default")
320 | dotspacemacs-default-layout-name "Default"
321 | ;; If non nil the default layout name is displayed in the mode-line.
322 | ;; (default nil)
323 | dotspacemacs-display-default-layout nil
324 | ;; If non nil then the last auto saved layouts are resume automatically upon
325 | ;; start. (default nil)
326 | dotspacemacs-auto-resume-layouts nil
327 | ;; Size (in MB) above which spacemacs will prompt to open the large file
328 | ;; literally to avoid performance issues. Opening a file literally means that
329 | ;; no major mode or minor modes are active. (default is 1)
330 | dotspacemacs-large-file-size 1
331 | ;; Location where to auto-save files. Possible values are `original' to
332 | ;; auto-save the file in-place, `cache' to auto-save the file to another
333 | ;; file stored in the cache directory and `nil' to disable auto-saving.
334 | ;; (default 'cache)
335 | dotspacemacs-auto-save-file-location 'cache
336 | ;; Maximum number of rollback slots to keep in the cache. (default 5)
337 | dotspacemacs-max-rollback-slots 5
338 | ;; If non nil, `helm' will try to minimize the space it uses. (default nil)
339 | dotspacemacs-helm-resize nil
340 | ;; if non nil, the helm header is hidden when there is only one source.
341 | ;; (default nil)
342 | dotspacemacs-helm-no-header nil
343 | ;; define the position to display `helm', options are `bottom', `top',
344 | ;; `left', or `right'. (default 'bottom)
345 | dotspacemacs-helm-position 'right
346 | ;; Controls fuzzy matching in helm. If set to `always', force fuzzy matching
347 | ;; in all non-asynchronous sources. If set to `source', preserve individual
348 | ;; source settings. Else, disable fuzzy matching in all sources.
349 | ;; (default 'always)
350 | dotspacemacs-helm-use-fuzzy 'always
351 | ;; If non nil the paste micro-state is enabled. When enabled pressing `p`
352 | ;; several times cycle between the kill ring content. (default nil)
353 | dotspacemacs-enable-paste-transient-state t
354 | ;; Which-key delay in seconds. The which-key buffer is the popup listing
355 | ;; the commands bound to the current keystroke sequence. (default 0.4)
356 | dotspacemacs-which-key-delay 0.4
357 | ;; Which-key frame position. Possible values are `right', `bottom' and
358 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the
359 | ;; right; if there is insufficient space it displays it at the bottom.
360 | ;; (default 'bottom)
361 | dotspacemacs-which-key-position 'bottom
362 | ;; If non nil a progress bar is displayed when spacemacs is loading. This
363 | ;; may increase the boot time on some systems and emacs builds, set it to
364 | ;; nil to boost the loading time. (default t)
365 | dotspacemacs-loading-progress-bar t
366 | ;; If non nil the frame is fullscreen when Emacs starts up. (default nil)
367 | ;; (Emacs 24.4+ only)
368 | dotspacemacs-fullscreen-at-startup nil
369 | ;; If non nil `spacemacs/toggle-fullscreen' will not use native fullscreen.
370 | ;; Use to disable fullscreen animations in OSX. (default nil)
371 | dotspacemacs-fullscreen-use-non-native nil
372 | ;; If non nil the frame is maximized when Emacs starts up.
373 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil.
374 | ;; (default nil) (Emacs 24.4+ only)
375 | dotspacemacs-maximized-at-startup t
376 | ;; A value from the range (0..100), in increasing opacity, which describes
377 | ;; the transparency level of a frame when it's active or selected.
378 | ;; Transparency can be toggled through `toggle-transparency'. (default 90)
379 | dotspacemacs-active-transparency 90
380 | ;; A value from the range (0..100), in increasing opacity, which describes
381 | ;; the transparency level of a frame when it's inactive or deselected.
382 | ;; Transparency can be toggled through `toggle-transparency'. (default 90)
383 | dotspacemacs-inactive-transparency 90
384 | ;; If non nil show the titles of transient states. (default t)
385 | dotspacemacs-show-transient-state-title t
386 | ;; If non nil show the color guide hint for transient state keys. (default t)
387 | dotspacemacs-show-transient-state-color-guide t
388 | ;; If non nil unicode symbols are displayed in the mode line. (default t)
389 | dotspacemacs-mode-line-unicode-symbols t
390 | ;; If non nil smooth scrolling (native-scrolling) is enabled. Smooth
391 | ;; scrolling overrides the default behavior of Emacs which recenters point
392 | ;; when it reaches the top or bottom of the screen. (default t)
393 | dotspacemacs-smooth-scrolling t
394 | ;; Control line numbers activation.
395 | ;; If set to `t' or `relative' line numbers are turned on in all `prog-mode' and
396 | ;; `text-mode' derivatives. If set to `relative', line numbers are relative.
397 | ;; This variable can also be set to a property list for finer control:
398 | ;; '(:relative nil
399 | ;; :disabled-for-modes dired-mode
400 | ;; doc-view-mode
401 | ;; markdown-mode
402 | ;; org-mode
403 | ;; pdf-view-mode
404 | ;; text-mode
405 | ;; :size-limit-kb 1000)
406 | ;; (default nil)
407 | dotspacemacs-line-numbers t
408 | ;; Code folding method. Possible values are `evil' and `origami'.
409 | ;; (default 'evil)
410 | dotspacemacs-folding-method 'evil
411 | ;; If non-nil smartparens-strict-mode will be enabled in programming modes.
412 | ;; (default nil)
413 | dotspacemacs-smartparens-strict-mode nil
414 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes
415 | ;; over any automatically added closing parenthesis, bracket, quote, etc…
416 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil)
417 | dotspacemacs-smart-closing-parenthesis nil
418 | ;; Select a scope to highlight delimiters. Possible values are `any',
419 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and
420 | ;; emphasis the current one). (default 'all)
421 | dotspacemacs-highlight-delimiters 'all
422 | ;; If non nil, advise quit functions to keep server open when quitting.
423 | ;; (default nil)
424 | dotspacemacs-persistent-server t
425 | ;; List of search tool executable names. Spacemacs uses the first installed
426 | ;; tool of the list. Supported tools are `ag', `pt', `ack' and `grep'.
427 | ;; (default '("ag" "pt" "ack" "grep"))
428 | dotspacemacs-search-tools '("ag" "pt" "ack" "grep")
429 | ;; The default package repository used if no explicit repository has been
430 | ;; specified with an installed package.
431 | ;; Not used for now. (default nil)
432 | dotspacemacs-default-package-repository nil
433 | ;; Delete whitespace while saving buffer. Possible values are `all'
434 | ;; to aggressively delete empty line and long sequences of whitespace,
435 | ;; `trailing' to delete only the whitespace at end of lines, `changed'to
436 | ;; delete only whitespace for changed lines or `nil' to disable cleanup.
437 | ;; (default nil)
438 | dotspacemacs-whitespace-cleanup 'changed
439 | ))
440 |
441 | (defun dotspacemacs/user-init ()
442 | "Initialization function for user code.
443 | It is called immediately after `dotspacemacs/init', before layer configuration
444 | executes.
445 | This function is mostly useful for variables that need to be set
446 | before packages are loaded. If you are unsure, you should try in setting them in
447 | `dotspacemacs/user-config' first."
448 | )
449 |
450 | (defun dotspacemacs/user-config ()
451 | "Configuration function for user code.
452 | This function is called at the very end of Spacemacs initialization after
453 | layers configuration.
454 | This is the place where most of your configurations should be done. Unless it is
455 | explicitly specified that a variable should be set before a package is loaded,
456 | you should place your code here."
457 |
458 | (server-start)
459 |
460 | (setq make-backup-files t
461 | backup-by-copying t ; don't clobber symlinks
462 | backup-directory-alist
463 | '(("." . "~/bak")) ; don't litter filesystems
464 | delete-old-versions t
465 | version-control t
466 | kept-old-versions 2 ; keep at least this many backups,
467 | kept-new-versions 6 ; but no more than this many
468 | )
469 |
470 | (setq frame-title-format '(buffer-file-name "%f" ("%b"))
471 | mouse-autoselect-window t
472 | display-time-24hr-format t
473 | vi-tilde-fringe-bitmap-array [0 0 8 20 42 85 42 20 8 0 0]
474 | indicate-unused-lines t
475 | scroll-bar-mode 'left
476 | scroll-conservatively 10000 ; MJL20160206 not sure why not already set?
477 | powerline-default-separator 'utf-8
478 | eshell-directory-name "~/.spacemacs.d/config/eshell"
479 | mouse-drag-copy-region t
480 | org-support-shift-select t
481 | deft-directory "~/net/notes"
482 | org-journal-dir "~/net/private/journal"
483 | org-journal-date-format "%A, %Y-%m-%d"
484 | split-width-threshold 0
485 | split-height-threshold nil
486 | avy-all-windows 'all-frames
487 | )
488 |
489 | (blink-cursor-mode t)
490 | (global-prettify-symbols-mode t)
491 | (delete-selection-mode t)
492 |
493 | (add-hook 'before-save-hook 'time-stamp)
494 | (setq copyright-limit 1024)
495 | (add-hook 'before-save-hook 'copyright-update)
496 |
497 | (when (eq system-type 'darwin)
498 | (menu-bar-mode))
499 |
500 | ;; simple configs. Try to keep short and sweet. If it's complex, use
501 | ;; `with-eval-after-load', or make a separate Layer.
502 | (push "~/.spacemacs.d/config/" load-path)
503 | (when (member system-name mjl--work-systems)
504 | (require 'conf-mail nil t)
505 | (require 'conf-work nil t)
506 | (append yas-snippet-dirs "/Users/mjl/Work/git/fieldnotes/snippets"))
507 | (when (member 'python dotspacemacs-configuration-layers)
508 | (require 'conf-inferior nil t))
509 |
510 | ;; This is where Emacs will auto-generate custom variable definitions.
511 | (setq custom-file "~/.spacemacs.d/config/custom.el")
512 | (load custom-file)
513 | )
514 |
515 |
516 | ;;; Local Variables: ***
517 | ;;; mode:Emacs-lisp ***
518 | ;;; fill-column: 79 ***
519 | ;;; comment-column: 0 ***
520 | ;;; End: ***
521 |
--------------------------------------------------------------------------------
/layers/mjl-org/README.org:
--------------------------------------------------------------------------------
1 | #+TITLE: mjl-org layer
2 | #+HTML_HEAD_EXTRA:
3 |
4 | [[file:img/mjl-org.png]]
5 |
6 | * Table of Contents :TOC_4_org:noexport:
7 | - [[Description][Description]]
8 | - [[Philosophy][Philosophy]]
9 | - [[Install][Install]]
10 | - [[Key bindings][Key bindings]]
11 | - [[Work in progress][Work in progress]]
12 | - [[All the things][All the things]]
13 |
14 | * Description
15 | This layer configures org mode on top of what is included in the built-in layer
16 | =org=. You should also enable the =org= layer, which is a great general base to
17 | start from but doesn't set or impose any preferences. That's what this layer
18 | does.
19 |
20 | - Personal preferences (this layer is /not/ intended for contribution to
21 | Spacemacs core)
22 | - Org Agenda
23 | - MobileOrg
24 | - org-gcal sync between Org calendar and Google Calendar
25 | - calfw to display the calendar nicely
26 |
27 | It'd also be nice to sync TODO items with one of the Google tasks tools (either
28 | Tasks, or Keep). But this is low priority because I can use MobileOrg for now to
29 | view, and manually recapture from Keep (Keep is great for capturing late-night
30 | thoughts)
31 |
32 | ** Philosophy
33 | This layer is for personal preferences only, not to be contributed to Spacemacs
34 | itself. It is shared on a public repository though, so there MUST NOT be any
35 | secrets in it.
36 |
37 | While it's specific to me, I want to keep my settings as simple and general as
38 | possible. Any setup or preference that is for certain record types SHOULD be
39 | configured within the individual org files, using =#+STARTUP=, =#+TAGS=,
40 | =#+PROPERTY= or simila (except where it can't, such as faces for tags). So
41 | especially this means the =#+SEQ_TODO= states, which might be different for
42 | Tasks, Projects, Tickets etc.
43 |
44 | I also have a thing I want to do to sync/capture Ticket details from work's
45 | ticketing system, but that really belongs in a separate layer so that I only
46 | enable it on work computers.
47 |
48 |
49 | * Install
50 | To use this contribution add it to your =~/.spacemacs=
51 |
52 | #+begin_src emacs-lisp
53 | (setq-default dotspacemacs-configuration-layers '(mjl-org-conf))
54 | #+end_src
55 |
56 | * Key bindings
57 |
58 | | Key Binding | Description |
59 | |-----------------+----------------|
60 | | ~ x x x~ | Does thing01 |
61 |
62 | * Work in progress
63 | * TODO All the things
64 | Nothing has been implemented yet
65 |
--------------------------------------------------------------------------------
/layers/mjl-org/config.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: conf-org.el
4 | ;; Created: 2016-01-29
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:48:17 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2016, 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Personal Global Org-mode options
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; I aim to keep a lot of settings within org files directly, but anything
20 | ;; that I want to set globally belongs in here.
21 | ;;
22 | ;; Note:- I have a lot of baggage from old Emacs configs. I won't bring
23 | ;; that in, but I might refer to the old SVN/hg repo's for ideas and
24 | ;; how-to... Mostly though I'm hoping for a fresh start.
25 | ;;
26 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
27 | ;;
28 | ;;; Change Log:
29 | ;;
30 | ;; Old logs up to tag 0.200 are in HISTORY.md
31 | ;; See git log after for changes after 2017-03-06
32 | ;;
33 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34 | ;;
35 | ;;; Code:
36 |
37 | (with-eval-after-load 'org
38 | ;; put org config within this block to avoid loading the built-in org.
39 | ;; (see the "Important Note" in =org= Layer's README)
40 |
41 | ;;TODO configure things, such as the agenda list, for a start
42 | )
43 |
44 | (provide 'conf-org)
45 |
46 | ;;; Local Variables: ***
47 | ;;; mode:Emacs-lisp ***
48 | ;;; fill-column: 79 ***
49 | ;;; comment-column: 0 ***
50 | ;;; End: ***
51 |
52 |
--------------------------------------------------------------------------------
/layers/mjl-org/img/mjl-org.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sinewalker/dotspacemacs/33cfabb7c528457f0cab679c0fafbffecc362d45/layers/mjl-org/img/mjl-org.png
--------------------------------------------------------------------------------
/layers/mjl-org/img/mjl-org.xcf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sinewalker/dotspacemacs/33cfabb7c528457f0cab679c0fafbffecc362d45/layers/mjl-org/img/mjl-org.xcf
--------------------------------------------------------------------------------
/layers/mjl-org/layers.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/mjl-org/layers.el
4 | ;; Created: 2017-01-01
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:49:10 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Declare Spacemacs Layers needed by mjl-org layer
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; For the longest time in 2016 I was putting off work on this layer
20 | ;; because I couldn't figure out how to safely isolate my settings from the
21 | ;; general `org' layer, which should own most of the general packages. But
22 | ;; still I wanted to be able to say "install the `org' Layer too, just add
23 | ;; this stuff after".
24 | ;;
25 | ;; At last after re-reading the docementation some time after upgrading to
26 | ;; Spacemacs 0.200.x I discovered layers.el...
27 | ;;
28 | ;; The `org' layer does actually have a lot of variables that you can set
29 | ;; to turn on plug-ins (such as `org-enable-github-support' to enable the
30 | ;; `ox-gfm' export for Github flavoured markdown). Whether to set them here
31 | ;; or in my `init.el' is something I'll need to consider.
32 | ;;;
33 | ;;
34 | ;; History:
35 | ;;
36 | ;; Old logs up to tag 0.200 are in HISTORY.md
37 | ;; See git log after for changes after 2017-03-06
38 |
39 | (configuration-layer/declare-layers '(org org-journal))
40 |
--------------------------------------------------------------------------------
/layers/mjl-org/packages.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/mjl-org/packages.el
4 | ;; Created: 2016-02-01
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:49:48 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2016, 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;; License: GPLv3
13 | ;; URL: https://github.com/sinewalker/dotspacemacs
14 | ;;
15 | ;; PURPOSE: Personal mjl-org layer packages file for Spacemacs.
16 | ;;
17 | ;; This file is not part of GNU Emacs, or Spacemacs.
18 | ;;
19 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20 | ;;
21 | ;;; Commentary:
22 | ;;
23 | ;; See the Spacemacs documentation and FAQs for instructions on how to implement
24 | ;; a new layer:
25 | ;;
26 | ;; SPC h SPC layers RET
27 | ;;
28 | ;;
29 | ;; Briefly, each package to be installed or configured by this layer should be
30 | ;; added to `mjl-org-packages'. Then, for each package PACKAGE:
31 | ;;
32 | ;; - If PACKAGE is not referenced by any other Spacemacs layer, define a
33 | ;; function `mjl-org/init-PACKAGE' to load and initialize the package.
34 | ;;
35 | ;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so
36 | ;; define the functions `mjl-org/pre-init-PACKAGE' and/or
37 | ;; `mjl-org/post-init-PACKAGE' to customize the package as it is loaded.
38 | ;;
39 | ;;; TODO
40 | ;;
41 | ;; - [ ] Move my org config from my un-Layered `conf-org' feature into this
42 | ;; layer's config.el
43 | ;; - [ ] Additional Packages installation (org-gcal and calfw)
44 | ;; - [ ] Review my old org cruft, but probably most of that can be thrown away
45 | ;;
46 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
47 | ;;
48 | ;;; Change Log:
49 | ;;
50 | ;; Old logs up to tag 0.200 are in HISTORY.md
51 | ;; See git log after for changes after 2017-03-06
52 | ;;
53 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54 | ;;
55 | ;;; Code:
56 |
57 | (defconst mjl-org-packages
58 | '()
59 | "The list of Lisp packages required by the mjl-org layer.
60 |
61 | Each entry is either:
62 |
63 | 1. A symbol, which is interpreted as a package to be installed, or
64 |
65 | 2. A list of the form (PACKAGE KEYS...), where PACKAGE is the
66 | name of the package to be installed or loaded, and KEYS are
67 | any number of keyword-value-pairs.
68 |
69 | The following keys are accepted:
70 |
71 | - :excluded (t or nil): Prevent the package from being loaded
72 | if value is non-nil
73 |
74 | - :location: Specify a custom installation location. The
75 | following values are legal:
76 |
77 | - The symbol `elpa' (default) means PACKAGE will be
78 | installed using the Emacs package manager.
79 |
80 | - The symbol `local' directs Spacemacs to load the file at
81 | `./local/PACKAGE/PACKAGE.el'
82 |
83 | - A list beginning with the symbol `recipe' is a melpa
84 | recipe. See:
85 | https://github.com/milkypostman/melpa#recipe-format"
86 | )
87 |
88 |
89 | ;;; packages.el ends here
90 |
91 | ;;; Local Variables: ***
92 | ;;; mode:Emacs-lisp ***
93 | ;;; fill-column: 79 ***
94 | ;;; comment-column: 0 ***
95 | ;;; End: ***
96 |
--------------------------------------------------------------------------------
/layers/mjl/README.org:
--------------------------------------------------------------------------------
1 | #+TITLE: Mike's customisation layer for Spacemacs
2 |
3 | [[file:img/icon-milo.png]]
4 |
5 | * Table of Contents :TOC@4:
6 | - [[#description][Description]]
7 | - [[#philosophy][Philosophy]]
8 | - [[#install][Install]]
9 | - [[#layer][Layer]]
10 | - [[#use-with-non-us-keyboard-layouts][Use with non-US keyboard layouts]]
11 | - [[#mac-os-x-gnu-coreutils][Mac OS X GNU Coreutils]]
12 | - [[#key-bindings][Key Bindings]]
13 | - [[#future-work-todo][Future Work (TODO)]]
14 |
15 | * Description
16 |
17 | Spacemacs is not just emacs+vim. It can have modern keybindings too! This layer
18 | globally defines common OSX/GUI keybindings, as well as making use of the
19 | extended function and edit keys on a [[http://deskthority.net/wiki/Sun_Type_6][Sun Type 6]] keyboard.
20 |
21 | It also includes Mike's personal Emacs functions from over 15 years of
22 | customising emacs.
23 |
24 | * Philosophy
25 |
26 | While this layer enables common GUI-style bindings, it does not implement OSX
27 | navigation keybindings. Spacemacs is meant to be used with evil and helm.
28 |
29 | The layer should work stand-alone without other layers. Any non-standard
30 | functions which are bound to global keys must be defined in this layer, or in
31 | packages which this layer installs (for instance this precludes putting
32 | keybindings for application modes such as dired-ex, which should be done in a
33 | layer that installs and configures that package, and related packages).
34 |
35 | This layer was based on the Spacemacs built-in layer =osx= and copies that
36 | layer's functionality. As of early 2016 it has not been tested together with
37 | that layer and will probably clash. I should use this layer in preference to
38 | =osx=, even on a Mac. =osx= also switches to use gls instead of ls in dired.
39 |
40 | * Install
41 |
42 | ** Layer
43 |
44 | To use this configuration layer, add it to your =~/.spacemacs=
45 |
46 | #+BEGIN_SRC emacs-lisp
47 | (setq-default dotspacemacs-configuration-layers '(mjl))
48 | #+END_SRC
49 |
50 | *** Use with non-US keyboard layouts
51 |
52 | If you need the ~⌥~ key to type common characters such as `{[]}~` which is usual
53 | for e.g. Finnish and Swedish keyboard layouts, you'll probably want to leave the
54 | ~⌥~ key unchanged by setting the =mjl-use-option-as-meta= variable to =nil=:
55 |
56 | #+BEGIN_SRC emacs-lisp
57 | (setq-default dotspacemacs-configuration-layers '(
58 | (mjl :variables mjl-use-option-as-meta nil)))
59 | #+END_SRC
60 |
61 | ** Mac OS X GNU Coreutils
62 |
63 | To get =gls= install coreutils homebrew:
64 |
65 | #+BEGIN_SRC sh
66 | brew install coreutils
67 | #+END_SRC
68 |
69 | * Key Bindings
70 |
71 | (Super is denoted by ~⌘~ in the table below, though the actual modifier key to
72 | hold will be dependant on the operating system, and the value of
73 | =mjl-use-option-as-meta= on a Mac)
74 |
75 | | Key Binding | Description |
76 | |-------------+-------------------|
77 | | ~⌘ +~ | Scale up text |
78 | | ~⌘ -~ | Scale down text |
79 | | ~⌘ q~ | Quit |
80 | | ~⌘ v~ | Paste |
81 | | ~⌘ c~ | Copy |
82 | | ~⌘ x~ | Cut |
83 | | ~⌘ a~ | Select all |
84 | | ~⌘ w~ | Close window |
85 | | ~⌘ W~ | Close frame |
86 | | ~⌘ n~ | New frame |
87 | | ~⌘ z~ | Undo |
88 | | ~⌘ Z~ | Redo |
89 | | ~Ctrl ⌘ f~ | Toggle fullscreen |
90 |
91 | * Future Work (TODO)
92 |
93 | - Install and configure [[http://ergoemacs.org/emacs/xmsi-math-symbols-input.html][xah-math-input]] minor mode
94 | - explore the use of emacs abbrev for inserting common symbols
95 | - explore a modifier layer for common repeat-symbols
96 | - review the F-key bindings some more
97 | - finish documentation for this =mjl= layer (keybindings list).
98 |
--------------------------------------------------------------------------------
/layers/mjl/config.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/mjl/config.el
4 | ;; Created: 2015-12-20
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:42:41 mjl>
7 | ;; Platform: Emacs (Spacemacs)
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2015, 2016, 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Configuration variables for the layer
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; This file is copied from the stock `osx' layer that comes with
20 | ;; Spacemacs. All I have done is change the variable's name to match the
21 | ;; layer. To begin with, there's no configuration to be done since this is
22 | ;; a personal layer, not something I intend would be useful to others.
23 | ;;
24 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25 | ;;
26 | ;;; Change Log:
27 | ;;
28 | ;; Old logs up to tag 0.200 are in HISTORY.md
29 | ;; See git log after for changes after 2017-03-06
30 | ;;
31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 | ;;
33 | ;;; Code:
34 | ;;
35 |
36 | (defvar mjl-bind-osx-keys t
37 | "If non nill the OS X style keys will be bound to their usual functions")
38 |
39 | (defvar mjl-bind-unix-keys t
40 | "If non nill, the Unix/Sun keys will be bound to useful functions")
41 |
42 | (defvar mjl-work-initials "MJL"
43 | "Initials/abbreviation to use when inserting a timestap with `mjl/insert-date-work'. Can be anything, but is designed to conform with local work practices")
44 |
45 |
46 | ;;; Local Variables: ***
47 | ;;; mode:Emacs-lisp ***
48 | ;;; fill-column: 79 ***
49 | ;;; comment-column: 0 ***
50 | ;;; End: ***
51 |
--------------------------------------------------------------------------------
/layers/mjl/funcs.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/mjl/funcs.el
4 | ;; Created: 2000-02-??
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:44:20 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2000-2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: GNU Emacs functions
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; Personal emacs utility functions.
20 | ;;
21 | ;; The functions in this file date from 2000. There have been changes over
22 | ;; many years, but some of these are still integral to my personal
23 | ;; workflow.
24 | ;;
25 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
26 | ;;
27 | ;;; Change Log:
28 | ;;
29 | ;; This file contains custom utility functions that have been carried over
30 | ;; from ages past. At various times the init file has been renamed. A rough
31 | ;; chronology of these changes is:
32 | ;;
33 | ;; 2000: ~/.emacsrc
34 | ;; 2003: ~/.emacs.el
35 | ;; 2008: ~/.emacs.d/init.el
36 | ;; 2009: ~/.emacs.d/defuns.el
37 | ;; 2011: ~/.emacs.d/mjl/defuns.el
38 | ;; 2015: ~/.spacemacs.d/layers/mjl/funcs.el
39 | ;;
40 | ;; What follows is the change log for all this history, minus items that have
41 | ;; been removed/relocated/deprecated by advances in Emacs itself, or by
42 | ;; Spacemacs' configurations (particularly UI and also loading mechanics)
43 | ;;
44 | ;; Old logs up to tag 0.200 are in HISTORY.md
45 | ;; See git log after for changes after 2017-03-06
46 | ;;
47 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
48 | ;;
49 | ;;; Code:
50 | ;;
51 |
52 | ;;;; Logging / Date-insertion functions
53 |
54 |
55 | (defun mjl/insert-date-iso ()
56 | "Inserts the current local date and time (to the minute) into
57 | the current buffer before Point. The date is formatted per ISO
58 | 8601 specification. This is useful for prefixing entries in a log
59 | book."
60 | (interactive)
61 | (insert (format-time-string "%Y-%m-%dT%R%z")))
62 |
63 | (defun mjl/insert-date-stamp ()
64 | "Inserts the current local date into the current buffer before
65 | Point. The date is formatted per ISO 8601 Short specification and
66 | prefixed with my initials 'MJL'. This is useful for inserting mod
67 | comments into code files.
68 |
69 | Note:- if you set `mjl/initials' to a non-null value, it'll use
70 | that value instead"
71 | (interactive)
72 | (if (not (boundp 'mjl/initials))
73 | (insert (format-time-string "MJL%Y%m%d"))
74 | (insert (format-time-string (concat mjl/initials "%Y%m%d")))))
75 |
76 | (defun mjl/insert-date-work ()
77 | "Inserts the current local date in ISO 8601 format prefixed
78 | with Work-specific initials specified in mjl/work-initials Layer
79 | variable"
80 | (interactive)
81 | (insert (format-time-string (concat mjl-work-initials "%Y%m%d"))))
82 |
83 | (defun mjl/insert-date-dow ()
84 | "Inserts the current local date and the day of the week into
85 | the current buffer before Point. The date is formatted per ISO
86 | 8601 specification. The DOW is expanded to the full name. This is
87 | useful for prefixing day entries in a log book."
88 | (interactive)
89 | (insert (format-time-string "%Y-%m-%d %A")))
90 |
91 |
92 | ;;;; Custom mode functions
93 |
94 |
95 | (defun mjl/linux-c-mode ()
96 | "C mode with adjusted defaults for use with the Linux kernel."
97 | (interactive)
98 | (c-mode)
99 | (c-set-style "K&R")
100 | (setq c-basic-offset 8))
101 |
102 | (defun mjl/EDS-c-mode ()
103 | "C mode with adjusted defaults for use with EDS source code."
104 | (interactive)
105 | (c-mode)
106 | (c-set-style "bsd"))
107 |
108 | (defun mjl/EDS-cpp-mode ()
109 | "C++ mode with adjusted defaults for use with EDS source code."
110 | (interactive)
111 | (c++-mode)
112 | (c-set-style "bsd"))
113 |
114 | (defun mjl/shell ()
115 | "Inferior shell wrapper, with fixes.
116 |
117 | This function starts Emacs' inferior shell and then runs some
118 | elisp functions to configure the shell environment for running
119 | within Emacs.
120 |
121 | The first fix is to use Cygwin/bash under Windows. It assumes
122 | Cygwin is installed and that bash is in the system %PATH%.
123 |
124 | The second fix is for an issue with the default GNU pager less,
125 | which doesn't support running in an Emacs buffer. Because pagers
126 | are redundant in an Emacs buffer anyway, the PAGER environment
127 | variable is set to /usr/bin/cat, so that multi-page
128 | output (e.g. from the man command) is dumped directly to the
129 | buffer. You can use Emacs' cursor movement commands to review the
130 | output once it is completed.
131 |
132 | The third fix is for the EDITOR variable, to load the file using
133 | emacsclient so that it's edited in emacs. Also the edit alias is
134 | set to the same value."
135 | (interactive)
136 | (setq buff-name "*shell*")
137 | (when (eq 'windows-nt system-type)
138 | (if explicit-shell-file-name
139 | (setq orig-shell-file-name explicit-shell-file-name)
140 | (setq orig-shell-file-name "nill-shell"))
141 | (setq buff-name "*cygwin*")
142 | (setq explicit-shell-file-name "bash"))
143 | (shell buff-name)
144 | (when (and (eq 'windows-nt system-type)
145 | (not (string-equal orig-shell-file-name "nill-shell")))
146 | (setq explicit-shell-file-name orig-shell-file-name) ; no side-effects please
147 | (setq orig-shell-file-name nil))
148 |
149 | (insert "export PAGER=cat; ") ; assuming bash/sh here...
150 |
151 | ; use emacsclient, shouldn't need alternate-editor...
152 | (insert "export EDITOR=\"emacsclient\"; ")
153 | (insert "alias edit=\"emacsclient -n \"; ")
154 |
155 | (comint-send-input)
156 | (erase-buffer))
157 |
158 | ;;;; Make Emacs work better
159 | (defun mjl/copy-line (arg)
160 | "Copy lines (as many as prefix argument) in the kill ring"
161 | (interactive "p")
162 | (kill-ring-save (line-beginning-position)
163 | (line-beginning-position (+ 1 arg)))
164 | (message "%d line%s copied" arg (if (= 1 arg) "" "s")))
165 |
166 | (defun mjl/ui-toggle-gui ()
167 | "Toggle Emacs' GUI elements (menu bar and tool bar) on and off.
168 |
169 | The GUI elements are a crutch for new users. Even after 10 years
170 | I still sometimes feel like a new user, so I want a convinient
171 | way to turn the menus and tool-bar on and off in one hit...
172 |
173 | Some might argue that the scroll-bar should also be toggled with
174 | this function: I find it useful as a navigation tool so leave it
175 | on.
176 |
177 | Bind this function to a key (like M-F10, since F10 activates the
178 | menu normally)."
179 | (interactive)
180 | (cond ((null menu-bar-mode)
181 | (menu-bar-mode t)
182 | (tool-bar-mode t)
183 | (scroll-bar-mode t)
184 | (setq mouse-autoselect-window 1))
185 | (t
186 | (menu-bar-mode -1)
187 | (tool-bar-mode -1)
188 | (scroll-bar-mode -1)
189 | (setq mouse-autoselect-window t))))
190 |
191 | (defun mjl/ui-toggle-rulers ()
192 | "Toggle Emacs' Ruler elements (line number and column guides) on and off.
193 | "
194 | (interactive)
195 | (cond ((null ruler-mode)
196 | (linum-mode t)
197 | (ruler-mode t))
198 | (t
199 | (linum-mode -1)
200 | (ruler-mode -1))))
201 |
202 | (defun mjl/save-to-dos (arg)
203 | "Sets buffer's file-encoding to DOS line-endings (CRLF). If
204 | optional argument is greater than 1, also saves the buffer."
205 | (interactive "p")
206 | (set-buffer-file-coding-system 'undecided-dos)
207 | (when (> (prefix-numeric-value arg) 1) (save-buffer)))
208 |
209 | (defun mjl/save-to-unix (arg)
210 | "Sets buffer's file-encoding to Unix line-endings (LF). If
211 | optional argument is greater than 1, also saves the buffer."
212 | (interactive "p")
213 | (set-buffer-file-coding-system 'undecided-unix)
214 | (when (> (prefix-numeric-value arg) 1) (save-buffer)))
215 |
216 | (defun mjl/save-to-mac (arg)
217 | "Sets buffer's file-encoding to Macintosh line-endings (CR). If
218 | optional argument is greater than 1, also saves the buffer."
219 | (interactive "p")
220 | (set-buffer-file-coding-system 'undecided-mac)
221 | (when (> (prefix-numeric-value arg) 1) (save-buffer)))
222 |
223 | (defun mjl/edit-current-file-as-root ()
224 | "Edit the file that is associated with the current buffer as
225 | root. Probably only works for local files"
226 | (interactive)
227 | (if (buffer-file-name)
228 | (progn
229 | (setq file (concat "/sudo::" (buffer-file-name)))
230 | (find-file file))
231 | (message "Current buffer does not have an associated file.")))
232 | (defalias 'gotroot 'mjl/edit-current-file-as-root)
233 |
234 | (defun mjl/calc-other-frame ()
235 | "launches calc in another frame. For use when running calc as
236 | an application from host OS."
237 | (interactive)
238 | (require 'calc)
239 | (let ((f (make-frame)))
240 | (raise-frame f)
241 | (select-frame f)
242 | (calc-other-window)
243 | (delete-window)))
244 |
245 | (defun mjl/wordpressify ()
246 | "replaces strings to fix WordPress' habit of smart-quoting blog
247 | posts. Use this function after generating html with
248 | htmlize-region or htmlize-buffer"
249 | (interactive)
250 | (while (search-forward "'" nil t)
251 | (replace-match "&x27;"))
252 | (while (search-forward "..." nil t)
253 | (replace-match "&x2e;&x2e;&x2e;"))
254 | (query-replace "\"" """))
255 |
256 | (defun mjl/remember-frame ()
257 | "Create a small popup frame for remember mode; this is meant to
258 | be called with emacsclient -c -e '(mjl/remember-frame)'"
259 | (interactive)
260 | (let ( (f (make-frame)) )
261 | (select-frame f))
262 | (modify-frame-parameters nil
263 | '( (name . "*Remember*") ;; must be same as in mode-hook below
264 | (width . 80)
265 | (height . 20)
266 | (vertical-scroll-bars . nil)
267 | (menu-bar-lines . nil)
268 | (tool-bar-lines . nil)))
269 | (raise-frame)
270 | (delete-other-windows)
271 | (org-remember)
272 | (when (fboundp 'x-focus-frame) (x-focus-frame nil))) ;; X only....
273 |
274 |
275 | ;; when we're in such a remember-frame, close it when done.
276 | ;; (add-hook 'org-remember-mode-hook
277 | ;; (lambda()
278 | ;; (define-key org-remember-mode-map (kbd "C-c C-c")
279 | ;; '(lambda()(interactive)
280 | ;; (let ((remember-frame-p
281 | ;; (string= (frame-parameter nil 'name) "*Remember*")))
282 | ;; (when remember-frame-p (make-frame-invisible)) ;; hide quickly
283 |
284 | ;; (org-remember-finalize)
285 | ;; (when remember-frame-p (delete-frame)))))))
286 |
287 |
288 | (defcustom remember-frame-alist nil
289 | "Additional frame parameters for pop-up remember frame."
290 | :type 'alist
291 | :group 'remember)
292 |
293 | (defadvice remember (around remember-frame-parameters activate)
294 | "Set some frame parameters for the remember frame."
295 | (let ((default-frame-alist (append remember-frame-alist default-frame-alist)))
296 | ad-do-it))
297 |
298 |
299 |
300 | (defun mjl/isearch-other-window ()
301 | "perform interactive search on other window"
302 | (save-selected-window
303 | (other-window 1)
304 | (isearch-forward)))
305 |
306 | ;; Cyberpunk cursor http://www.emacswiki.org/emacs/Zarza
307 |
308 | ;(defvar blink-cursor-colors (list "#92c48f" "#6785c5" "#be369c" "#d9ca65")
309 | (defvar blink-cursor-colors
310 | ; (list "#381d30" "#79171b" "#9c2a14" "#a95f1b" "#ae7d20" "#ac9c25" "#848b1f" "#416b16" "#328b24" "#2d904f" "#1f758a" "#265da0" "#40399c" "#3f2e89" "#202860")
311 | (list "#9c2a14" "#a95f1b" "#ac9c25" "#328b24" "#1f758a" "#265da0" "#40399c")
312 | "On each blink the cursor will cycle to the next color in this list.")
313 |
314 | (setq blink-cursor-count 0)
315 | (defun blink-cursor-timer-function ()
316 | "Cyberpunk variant of timer `blink-cursor-timer'. OVERWRITES original version in `frame.el'.
317 |
318 | This one changes the cursor color on each blink. Define colors in `blink-cursor-colors'."
319 | (when (not (internal-show-cursor-p))
320 | (when (>= blink-cursor-count (length blink-cursor-colors))
321 | (setq blink-cursor-count 0))
322 | (set-cursor-color (nth blink-cursor-count blink-cursor-colors))
323 | (setq blink-cursor-count (1+ blink-cursor-count)))
324 | (internal-show-cursor nil (not (internal-show-cursor-p))))
325 |
326 | ;; see https://www.emacswiki.org/emacs/HorizontalSplitting
327 | (defun mjl/split-window-prefer-horizonally (window)
328 | "If there's only one window (excluding any possibly active
329 | minibuffer), then split the current window horizontally."
330 | (if (one-window-p t);(and (one-window-p t)
331 | ; (not (active-minibuffer-window)))
332 | (let ((split-height-threshold nil))
333 | (split-window-horizontally window))
334 | (split-window-sensibly window)))
335 |
336 | ;(setq split-window-preferred-function 'split-window-horizonally)
337 |
338 | (defun mjl/split-horizontally-for-temp-buffers ()
339 | "Split the window horizontally for temp buffers."
340 | (when (one-window-p t)
341 | (split-window-horizontally)))
342 |
343 | ;(add-hook 'temp-buffer-setup-hook 'split-window-horizontally)
344 |
345 | ;; org stuff
346 |
347 | (defun mjl/insert-log-entry-org ()
348 | "Inserts the current local date and time (to the minute) into
349 | the current buffer before Point. The date is formatted to suit
350 | Org mode's agenda and highlighting functions.
351 |
352 | Additionally puts 3 asterisks to indicate a 3rd-level heading
353 | in Org. Useful for starting log entries"
354 | (interactive)
355 | (insert (format-time-string (concat "*** " (org-time-stamp-format t t) " "))))
356 |
357 | (defun mjl/insert-timestamp-org ()
358 | "Inserts the current local date and time (to the minute) into
359 | the current buffer before Point. The date is formatted to suit
360 | Org mode's agenda and highlighting functions. This is like
361 | org-time-stamp-inactive, but does not prompt for date/time."
362 | (interactive)
363 | (insert (format-time-string (concat (org-time-stamp-format t t) " "))))
364 |
365 | (defun mjl/open-org-files ()
366 | "Opens all my ORG Agenda files in a new frame"
367 | (interactive)
368 | (mapc 'find-file (org-agenda-files))
369 | (new-frame)
370 | (switch-to-buffer (file-name-nondirectory (car (org-agenda-files)))))
371 |
372 | ;; (defun mjl/remember-review-file ()
373 | ;; "Open `remember-data-file'."
374 | ;; (interactive)
375 | ;; (find-file-other-window remember-data-file))
376 |
377 |
378 | (defun mjl/diff-buffer-with-file ()
379 | "Compares current buffer with its file, using ediff. This is like ibuffer's difference function (C-=), only with ediff"
380 | (interactive)
381 | (let ((tempfileA (make-temp-file (concat (buffer-name) "-FILE-saved-")))
382 | (tempfileB (make-temp-file (concat (buffer-name) "-BUFFER-ram-"))))
383 | (when buffer-file-name
384 | (unwind-protect
385 | (progn
386 | (copy-file buffer-file-name tempfileA t)
387 | (write-region nil nil tempfileB nil 'nomessage)
388 | (ediff-files tempfileA tempfileB)))
389 | (sit-for 0)
390 | (when (file-exists-p tempfileA)
391 | (delete-file tempfileA))
392 | (when (file-exists-p tempfileB)
393 | (delete-file tempfileB)))))
394 |
395 | (defun mjl/mu4e-headers-narrow-unread ()
396 | "Narrow the Mu4e Headers view to just unread email. I use
397 | this rather than having a separate 'AND flag:unread' search for
398 | everything"
399 | (interactive)
400 | (mu4e-headers-search-narrow "flag:unread"))
401 |
402 | (defalias 'mjl/unread 'mjl/mu4e-headers-narrow-unread)
403 |
404 | (defun mjl/change-log (summary)
405 | "inserts a change summary to the end of the changes list on a source file"
406 | (interactive "sSummary> ")
407 | (save-excursion
408 | (end-of-buffer)
409 | (search-backward-regexp " [A-Z][A-Z][A-Z|a-z]20[0-9][0-9][0-9][0-9][0-9][0-9] - ")
410 | (move-beginning-of-line 2)
411 | (insert (concat comment-start " "))
412 | (mjl/insert-date-stamp)
413 | (insert (concat " - " summary))
414 | (newline)))
415 |
416 | (defun mjl/client-save-kill-emacs(&optional display)
417 | " This is a function that can bu used to shutdown save buffers and
418 | shutdown the emacs daemon. It should be called using
419 | emacsclient -e '(client-save-kill-emacs)'. This function will
420 | check to see if there are any modified buffers or active clients
421 | or frame. If so an x window will be opened and the user will
422 | be prompted.
423 | - from http://www.emacswiki.org/emacs/EmacsAsDaemon"
424 |
425 | (let (new-frame modified-buffers active-clients-or-frames)
426 |
427 | ; Check if there are modified buffers or active clients or frames.
428 | (setq modified-buffers (mjl//modified-buffers-exist))
429 | (setq active-clients-or-frames ( or (> (length server-clients) 1)
430 | (> (length (frame-list)) 1)
431 | ))
432 |
433 | ; Create a new frame if prompts are needed.
434 | (when (or modified-buffers active-clients-or-frames)
435 | (when (not (eq window-system 'x))
436 | (message "Initializing x windows system.")
437 | (x-initialize-window-system))
438 | (when (not display) (setq display (getenv "DISPLAY")))
439 | (message "Opening frame on display: %s" display)
440 | (select-frame (make-frame-on-display display '((window-system . x)))))
441 |
442 | ; Save the current frame.
443 | (setq new-frame (selected-frame))
444 |
445 |
446 | ; When displaying the number of clients and frames:
447 | ; subtract 1 from the clients for this client.
448 | ; subtract 2 from the frames this frame (that we just created) and the default frame.
449 | (when ( or (not active-clients-or-frames)
450 | (yes-or-no-p (format "There are currently %d clients and %d frames. Exit anyway?" (- (length server-clients) 1) (- (length (frame-list)) 2))))
451 |
452 | ; If the user quits during the save dialog then don't exit emacs.
453 | ; Still close the terminal though.
454 | (let((inhibit-quit t))
455 | ; Save buffers
456 | (with-local-quit
457 | (save-some-buffers))
458 |
459 | (if quit-flag
460 | (setq quit-flag nil)
461 | ; Kill all remaining clients
462 | (progn
463 | (dolist (client server-clients)
464 | (server-delete-client client))
465 | ; Exit emacs
466 | (kill-emacs)))
467 | ))
468 |
469 | ; If we made a frame then kill it.
470 | (when (or modified-buffers active-clients-or-frames) (delete-frame new-frame))
471 | )
472 | )
473 |
474 |
475 | (defun mjl//modified-buffers-exist()
476 | "This function will check to see if there are any buffers
477 | that have been modified. It will return true if there are
478 | and nil otherwise. Buffers that have buffer-offer-save set to
479 | nil are ignored."
480 | (let (modified-found)
481 | (dolist (buffer (buffer-list))
482 | (when (and (buffer-live-p buffer)
483 | (buffer-modified-p buffer)
484 | (not (buffer-base-buffer buffer))
485 | (or
486 | (buffer-file-name buffer)
487 | (progn
488 | (set-buffer buffer)
489 | (and buffer-offer-save (> (buffer-size) 0))))
490 | )
491 | (setq modified-found t)
492 | )
493 | )
494 | modified-found
495 | )
496 | )
497 |
498 | (defun mjl/titlebar()
499 | "Set the Emacs frame title bar the way I like, with active
500 | buffer filename, or buffer name if no file associated. I run
501 | this in my init.el but it's not sticking for daemons"
502 | (interactive)
503 | (when (or (display-graphic-p) (window-system)) ; display-graphic-p
504 | (global-hl-line-mode) ; not always bound?
505 | (mouse-wheel-mode t)
506 | (setq frame-title-format '(buffer-file-name "%f" ("%b")))))
507 |
508 | (defun mjl/pretty-print-xml-region (begin end)
509 | "Pretty format XML markup in region. You need to have nxml-mode
510 | http://www.emacswiki.org/cgi-bin/wiki/NxmlMode installed to do
511 | this. The function inserts linebreaks to separate tags that have
512 | nothing but whitespace between them. It then indents the markup
513 | by using nxml's indentation rules."
514 | (interactive "r")
515 | (save-excursion
516 | (nxml-mode)
517 | (goto-char begin)
518 | (while (search-forward-regexp "\>[ \\t]*\<" nil t)
519 | (backward-char) (insert "\n"))
520 | (indent-region begin end))
521 | (message "Ah, much better!"))
522 |
523 | ;; "Hacker Type" implementation, in Emacs
524 | ;; I'm unsure where exactly this came from?
525 | (defun mjl/hacker-type (arg)
526 | (interactive (list (read-file-name "Filename: ")))
527 | (setq mjl--fake-hacker-type-map (make-sparse-keymap))
528 | (setq mjl--ht-filename arg)
529 | (setq mjl--ht-start 0)
530 | (setq mjl--ht-insert-by 3)
531 |
532 | (define-key mjl--fake-hacker-type-map [remap self-insert-command]
533 | 'mjl//ht-inject-contents)
534 | (use-local-map mjl--fake-hacker-type-map)
535 | )
536 |
537 | (defun mjl//ht-inject-contents (&optional n)
538 | (interactive)
539 | (setq mjl--ht-end (+ mjl--ht-start mjl--ht-insert-by))
540 | (insert-file-contents mjl--ht-filename nil mjl--ht-start mjl--ht-end)
541 | (forward-char mjl--ht-insert-by)
542 | (setq mjl--ht-start (+ mjl--ht-start mjl--ht-insert-by))
543 | )
544 |
545 | (defun mjl/deactivate-hacker-type ()
546 | (interactive)
547 | (define-key mjl--fake-hacker-type-map [remap self-insert-command] nil)
548 | )
549 |
550 |
551 | ;;; Local Variables: ***
552 | ;;; mode:Emacs-lisp ***
553 | ;;; fill-column: 79 ***
554 | ;;; comment-column: 0 ***
555 | ;;; End: ***
556 |
--------------------------------------------------------------------------------
/layers/mjl/img/icon-milo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sinewalker/dotspacemacs/33cfabb7c528457f0cab679c0fafbffecc362d45/layers/mjl/img/icon-milo.png
--------------------------------------------------------------------------------
/layers/mjl/keybindings.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/mjl/keybindings.el
4 | ;; Created: 2015-12-20
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-09-05 06:43:45 mjl>
7 | ;; Platform: Emacs (Spacemacs)
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart
10 | ;;
11 | ;; Rights: Copyright © 2015-2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Keybindings for my personal layer "mjl"
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; Using the `osx' layer from Spacemacs as a starting point, this sets global
20 | ;; keybindings for the Super key (which SHOULD NOT be clobbered by emacs
21 | ;; modes). Also including bindings for special keys from the Sun Type 6, and
22 | ;; some f-key bindings (though I'm still debating if these belong in this
23 | ;; layer, or under special configs for specific Emacs applications)
24 | ;;
25 | ;; So there are 3 global keymap groupings here:
26 | ;;
27 | ;; - Modern/Common bindings, on Super-shifted keys (e.g. Cut/Copy/Paste)
28 | ;; - Function Keys F1-F12 for my personal high-use functions/commands
29 | ;; - Sun Keys Help, Attn/Open/Undo etc to make use of my Type 6
30 | ;;
31 | ;; All have been designed so as not to conflict with Spacemacs or Emacs
32 | ;; bindings. Some keys might be masked by the operating system.
33 | ;;
34 | ;; HISTORY
35 | ;;
36 | ;; Oh boy. My own bindings.el is a tail of woe and fail dating back to 20000807
37 | ;; when I first wanted something simple like PC-style editing keys for
38 | ;; cut/copy/paste. Little did I know back then how much wonder and pain I was
39 | ;; in for. There were hooks and tricks and other pieces of cruft which I don't
40 | ;; think warrant including into this Layer's configuration.
41 | ;;
42 | ;; Then, in 2014 when I did my major emacs config overhaul, I looked at my
43 | ;; global bindings with a view to make sense of them, especially for the
44 | ;; F-keys, but also in light of all the munging that ergoemacs did to the
45 | ;; control keys. It was a major mess again (in code, as well as the bindings
46 | ;; themselves).
47 | ;;
48 | ;; Part of my motivation to move to Spacemacs in late 2015/early 2016 was to
49 | ;; ditch ergoemacs and return to some sort of sanity in the code, while still
50 | ;; having the global bindings I want, with an opportunity for "modern"-style
51 | ;; keys bound on the Super modifier.
52 | ;;
53 | ;; For this layer, I'm adopting the philosophy that I will go with Spacemacs'
54 | ;; use of Helm for many things, and just use global key-bindings for the
55 | ;; "basic" editing functions that I know and love, plus Function Keys (being
56 | ;; the F-keys on the top of most keyboards, as well as the special keys on some
57 | ;; keyboards, like the Sun Type 6). All global settings should work for a
58 | ;; "vanilla" Spacemacs other than functions defined in this layer.
59 | ;;
60 | ;;
61 | ;; BUGS
62 | ;;
63 | ;; MJL20170201 - I'm using `spacemacs/set-leader-keys' for toggling the Ruler
64 | ;; on `tR', and the GUI on `Tu', which are not a reserved spaces in the
65 | ;; Spacemacs bindings, and may shadow a future Spacemacs update. But they
66 | ;; makes sense to me.
67 | ;;
68 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
69 | ;;
70 | ;;; Change Log:
71 | ;;
72 | ;; Old logs up to tag 0.200 are in HISTORY.org
73 | ;; See git log after for changes after 2017-03-06
74 | ;;
75 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
76 | ;;
77 | ;;; Code:
78 |
79 | ;; this is only applicable to GUI mode
80 | (when (display-graphic-p)
81 |
82 | ;; Keybindings (from OS-X)
83 | ;; (these are set by the `osx' layer, so if that's installed, you maybe want
84 | ;; to set `mjl-bind-osx-keys' to nil and avoid binding them again here)
85 | (when mjl-bind-osx-keys
86 | (global-set-key (kbd "s-=") 'spacemacs/scale-up-font)
87 | (global-set-key (kbd "s--") 'spacemacs/scale-down-font)
88 | (global-set-key (kbd "s-0") 'spacemacs/reset-font-size)
89 | (global-set-key (kbd "s-q") 'save-buffers-kill-terminal)
90 | (global-set-key (kbd "s-v") 'yank)
91 | (global-set-key (kbd "M-s-v") 'yank-pop)
92 |
93 | (global-set-key (kbd "s-c") 'evil-yank)
94 | (global-set-key (kbd "s-a") 'mark-whole-buffer)
95 | (global-set-key (kbd "s-x") 'kill-region)
96 | (global-set-key (kbd "s-w") 'delete-window)
97 | (global-set-key (kbd "s-W") 'delete-frame)
98 | (global-set-key (kbd "s-n") 'make-frame)
99 | (global-set-key (kbd "s-s") ; note:- this is shadowed by KDE Plasma Desktop
100 | (lambda () ; Shell "Stop Current Activity" default
101 | (interactive) ; global shortcut. Remap that
102 | (call-interactively (key-binding "\C-x\C-s"))))
103 | (global-set-key (kbd "s-z") 'undo-tree-undo)
104 | (global-set-key (kbd "s-Z") 'undo-tree-redo)
105 | (global-set-key (kbd "C-s-f") 'spacemacs/toggle-frame-fullscreen)
106 | )
107 |
108 | ;; These are standard macOS/OS X bindings but are missing from the `osx'
109 | ;; layer. So I always want to bind them on a Mac, but only on a Mac
110 | (when (equal system-type 'darwin)
111 | (global-set-key [(super down)] 'scroll-up-command) ;; Macs don't have
112 | (global-set-key [(super up)] 'scroll-down-command) ;; or keys!
113 | (global-set-key (kbd "M-s-√") 'yank-pop) ;; left-Option-V makes √ char
114 | )
115 |
116 | ;;;;;;;;;;;;;;;;;;;;
117 | ;; Mike's additions (common bindings in other programs)
118 | (global-unset-key (kbd "C-z")) ;; this binding only makes sense in a terminal
119 | (global-unset-key (kbd "C-v")) ;; this binding is silly anyway, use
120 | (global-set-key (kbd "C-z") 'undo-tree-undo) ;; might as well be normal undo
121 | (global-set-key (kbd "C-v") 'yank) ;; might as well be normal paste
122 | (global-set-key (kbd "s-") 'kill-word) ;; super-backspace is like M-d
123 |
124 |
125 | ;don't know if this is a Mac thing or not, but / do beginning /
126 | ;end of buffer instead of line? Make them do what C-a and C-e do...
127 | (global-set-key (kbd "") (lambda () (interactive)
128 | (call-interactively (key-binding "\C-a"))))
129 | (global-set-key (kbd "") (lambda () (interactive)
130 | (call-interactively (key-binding "\C-e"))))
131 |
132 | (global-set-key (kbd "M-") 'move-text-line-up)
133 | (global-set-key (kbd "M-") 'move-text-line-down)
134 |
135 | (global-set-key (kbd "C-+") 'spacemacs/scale-up-font)
136 | (global-set-key (kbd "C--") 'spacemacs/scale-down-font)
137 | (global-set-key (kbd "s-\\") 'spacemacs/scale-down-font)
138 | (global-set-key (kbd "s-]") 'spacemacs/scale-up-font)
139 | (global-set-key (kbd "s-o") ;; why is this not in osx? - Do what C-x C-f does
140 | (lambda ()
141 | (interactive)
142 | (call-interactively (key-binding "\C-x\C-f"))))
143 |
144 | ;; When Mastering Emacs, one learns no navigate by searching
145 | (global-set-key (kbd "s-f") 'isearch-forward)
146 | (define-key isearch-mode-map (kbd "s-f") 'isearch-repeat-forward)
147 | (define-key isearch-mode-map (kbd "") 'isearch-repeat-forward)
148 | (define-key isearch-mode-map [(find)] 'isearch-repeat-forward)
149 | (global-set-key (kbd "M-s-f") 'mjl/isearch-other-window)
150 | (global-set-key (kbd "s-r") 'isearch-backward)
151 | (define-key isearch-mode-map (kbd "s-r") 'isearch-repeat-backward)
152 | (define-key isearch-mode-map (kbd "") 'isearch-repeat-backward)
153 |
154 | ;; ideas from Atom
155 | (global-set-key (kbd "s-O") 'ido-dired) ;; open dir
156 | (global-set-key (kbd "s-S") 'ido-write-file) ;; save-as
157 | (global-set-key (kbd "s-b") 'helm-mini) ;; browse buffers
158 |
159 | (global-set-key (kbd "s-g") 'goto-line)
160 | (global-set-key (kbd "s-l") 'mjl/copy-line) ;; in Atom: select line hdk
161 | (global-set-key (kbd "s-/") 'comment-dwim) ;; default M-; gets shadowed
162 | (global-set-key (kbd "s-\\") 'neotree-toggle)
163 |
164 | ;; TODO: some others from Atom. E.g.
165 | ;; M-s-[/]{/} fold/unfold/all
166 | ;; M-s-s Save All
167 | ;; M-s-z git checkout head
168 | ;; s-j join lines
169 | ;; and consider:
170 | ;; s- new line below
171 | ;; s-T open term at file's directory (atom's atom-terminal plugin, non-core, spacemacs already has SPC ' )
172 | ;; M-T open term at Project's root directory
173 |
174 | ;; splits windows like my iTerm2
175 |
176 | (global-set-key (kbd "S-s-") 'split-window-right)
177 | (global-set-key (kbd "s-_") 'split-window-below)
178 | (global-set-key (kbd "S-s-") 'spacemacs/toggle-maximize-buffer)
179 |
180 | ;; window navigation like iTerm2
181 | (global-set-key (kbd "M-s-") 'evil-window-left)
182 | (global-set-key (kbd "M-s-") 'evil-window-right)
183 | (global-set-key (kbd "M-s-") 'evil-window-up)
184 | (global-set-key (kbd "M-s-") 'evil-window-down)
185 |
186 | ;; mode-specific mappings
187 | ;; TODO move these to layers, when I make them, probably...
188 | (with-eval-after-load 'dired
189 | (define-key dired-mode-map (kbd "E") 'wdired-change-to-wdired-mode)
190 | )
191 | (with-eval-after-load 'markdown
192 | (require 'org) ;; gotta load it now if it's not already
193 | (define-key markdown-mode-map (kbd "s-t") 'org-toggle-checkbox)
194 | )
195 |
196 | ;; Meta-x
197 | (cond ((eq system-type 'windows-nt)
198 | (global-set-key (kbd "") 'helm-M-x))
199 | ((eq system-type 'darwin) ;; on Mac, key maps to different keys:
200 | (global-set-key (kbd "C-j") 'helm-M-x)) ;; Railwaycat emacs-mac,
201 | ;(global-set-key (kbd "C-p") 'helm-M-x)) ;; vanilla brew emacs
202 | (t
203 | (global-set-key (kbd "") 'helm-M-x)))
204 |
205 | ; cannot use the kbd macro for these keys?
206 | ;(global-set-key [(super left)] 'windmove-left)
207 | ;(global-set-key [(super right)] 'windmove-right)
208 | ;(global-set-key [(super up)] 'windmove-up)
209 | ;(global-set-key [(super down)] 'windmove-down)
210 |
211 | (global-set-key [(super kp-subtract)] 'spacemacs/scale-down-font)
212 | (global-set-key [(super kp-add)] 'spacemacs/scale-up-font)
213 |
214 | ;;;;;;;;;;;;;;;;;;;;
215 | ;; Sun Type 6
216 |
217 | (when mjl-bind-unix-keys
218 | ;; (help) is bound to helm-help by default ; Help
219 | (global-set-key [(meta help)] 'woman) ; M-Help
220 | (global-set-key [(control help)] 'info) ; C-Help
221 |
222 | (global-set-key [(cancel)] 'keyboard-quit) ; Stop
223 | (global-set-key [(meta cancel)] 'keyboard-quit) ; M-Stop
224 | (global-set-key [(control cancel)] 'save-buffers-kill-terminal) ; C-Stop
225 |
226 | (global-set-key [(SupProps)] 'spacemacs/describe-char) ; Props
227 |
228 | (global-set-key [(SunFront)] 'spacemacs/next-useful-buffer) ; Front
229 | (global-set-key [(meta SunFront)] 'spacemacs/previous-useful-buffer) ; M-Front
230 | (global-set-key [(control SunFront)] 'ibuffer) ; C-Front
231 |
232 | (global-set-key [(SunOpen)] 'find-file) ; Open
233 | (global-set-key [(XF86Open)] 'find-file)
234 | (global-set-key [(meta SunOpen)] 'kill-buffer) ; M-Open
235 | (global-set-key [(meta XF86Open)] 'kill-buffer) ; M-Open
236 | (global-set-key [(control SunOpen)] 'save-buffer) ; C-Open
237 | (global-set-key [(control XF86Open)] 'save-buffer) ; C-Open
238 |
239 | (global-set-key [(find)] 'isearch-forward) ; Find
240 | (global-set-key [(meta find)] 'isearch-backward) ; M-Find
241 | (global-set-key [(control find)] 'isearch-forward-regexp) ; C-Find
242 |
243 |
244 | ;; (redo) is bound to 'repeat-complex-command by default ; Redo
245 | ;; (undo) is bound to undo by default ; Undo
246 | (global-set-key [(meta undo)] 'redo) ; M-Undo
247 |
248 | (global-set-key [(XF86Copy)] 'kill-ring-save) ; Copy
249 | (global-set-key [(meta XF86Copy)] 'mjl/copy-line) ; M-Copy
250 |
251 | (global-set-key [(XF86Paste)] 'yank) ; Paste
252 | (global-set-key [(meta XF86Paste)] 'yank-pop) ; M-Paste
253 |
254 | (global-set-key [(XF86Cut)] 'kill-region) ; Cut
255 | (global-set-key [(meta XF86Cut)] 'kill-line) ; M-Cut
256 | (global-set-key [(control XF86Cut)] 'kill-sexp) ; C-Cut
257 | )
258 |
259 | ;;;;;;;;;;;;;;;;;;;;
260 | ;;; MJL20140722 - New F-key bindings
261 |
262 | ;; F1: shells (TEK F1=Home, Mac=Dimmer)
263 | ;; f1 set by Spacemacs for Helm stuff. Leave it for now.
264 | ;global-set-key [f1] 'shell) ;help is Ctl-H or
265 | ;(global-set-key [(control f1)] 'ansi-term)
266 | ;(global-set-key [(meta f1)] 'eshell)
267 |
268 | ;; F2: apps () (TEK F2=email, Mac=Brighter)
269 | (global-set-key [f2] 'mu4e)
270 | (global-set-key [(control f2)] 'calc)
271 | (global-set-key [(meta f2)] 'ediff-directories)
272 |
273 | ;; F3: buffer switching (F3 TEK = Find, Mac = Exposé)
274 | (global-set-key [f3] 'ido-switch-buffer)
275 | (global-set-key [(control f3)] 'ibuffer)
276 | ;; meta-f3 masked by OS
277 | (global-set-key [(shift f3)] 'list-bookmarks)
278 |
279 |
280 | ;; F4: evaluate ? (alt-f4 delete-frame seems sensible)
281 | ;; (or maybe dired? TEK=folder, Mac=Spaces)
282 | (global-set-key [f4] 'eval-last-sexp)
283 | (global-set-key [(control f4)] 'eval-region)
284 | (global-set-key [(meta f4)] 'delete-frame)
285 |
286 | ;; F5: revert/refresh functions (TEK Calc)
287 | (global-set-key [f5] 'revert-buffer)
288 | (global-set-key [(control f5)] 'mjl/diff-buffer-with-file)
289 | (global-set-key [(meta f5)] 'vc-revert)
290 |
291 | ;; F6: Differences (TEK Media)
292 | (global-set-key [f6] 'ediff-buffers)
293 | (global-set-key [(meta f6)] 'ediff-revision)
294 |
295 | ;; F7: mark (TEK/Mac=Prev track)
296 | (global-set-key [f7] 'transient-mark-mode)
297 | (global-set-key [(control f7)] 'mark-work)
298 | (global-set-key [(meta f7)] 'mark-paragraph)
299 | (global-set-key [(shift f7)] 'mark-defun)
300 |
301 | ;; F8: search/highlight (TEK/Mac=Pause)
302 | (global-set-key [(control f8)] 'hl-line-mode)
303 | (global-set-key [(meta f8)] 'global-hl-line-mode)
304 | (global-set-key [(shift f8)] 'idle-highlight-mode)
305 |
306 | ;; F9: macros (TEK/Mac=Next track)
307 | (global-set-key [f9] 'kmacro-call-macro)
308 | (global-set-key [(control f9)] 'kmacro-start-macro)
309 | (global-set-key [(meta f9)] 'kmacro-end-macro)
310 | (global-set-key [(shift f9)] 'kmacro-name-last-macro)
311 |
312 | ;; F10: Menu/GUI control (TEK/Mac=Mute)
313 | ;; (Spacemacs does things with f10, leave it for now)
314 | (spacemacs/set-leader-keys "tR" 'ruler-mode)
315 | (spacemacs/set-leader-keys "Tu" 'mjl/ui-toggle-gui)
316 |
317 | ;; F11 date/time insertion (TEK/Mac=Quieter)
318 | (global-set-key [f11] 'mjl/insert-date-stamp)
319 | (global-set-key [(meta f11)] 'mjl/insert-date-work)
320 |
321 |
322 | ;;;;;;;;;;;;
323 | ;;; Spacemacs user keyspace
324 |
325 | (spacemacs/declare-prefix "o" "MJL user fns")
326 | (spacemacs/declare-prefix "od" "date insertion")
327 | (spacemacs/set-leader-keys
328 | "odd" 'mjl/insert-date-stamp
329 | "odw" 'mjl/insert-date-work
330 | "odi" 'mjl/insert-date-iso
331 | "odl" 'mjl/insert-log-entry-org
332 | "odD" 'mjl/insert-date-dow
333 | "odo" 'mjl/insert-timestamp-org)
334 | (spacemacs/declare-prefix "os" "shells")
335 | (spacemacs/set-leader-keys
336 | "ose" 'eshell
337 | "ost" 'ansi-term
338 | "osp" 'run-python
339 | "osi" 'run-ipython
340 | "osl" 'ielm)
341 |
342 |
343 | ;; F12 org capture/agenda (TEK/Mac=Louder)
344 | (global-set-key [f12] 'org-capture)
345 | (global-set-key [(meta f12)] 'org-agenda)
346 | (global-set-key [(shift f12)] 'org-ctrl-c-ctrl-c)
347 |
348 | )
349 |
350 | ;;; Local Variables: ***
351 | ;;; mode:Emacs-lisp ***
352 | ;;; fill-column: 79 ***
353 | ;;; comment-column: 0 ***
354 | ;;; End: ***
355 |
--------------------------------------------------------------------------------
/layers/org-journal/README.org:
--------------------------------------------------------------------------------
1 | #+TITLE: org-journal layer
2 | #+HTML_HEAD_EXTRA:
3 |
4 | #+CAPTION: logo
5 |
6 | # The maximum height of the logo should be 200 pixels.
7 | [[img/org-journal.png]]
8 |
9 | * Table of Contents :TOC_4_org:noexport:
10 | - [[Description][Description]]
11 | - [[Install][Install]]
12 | - [[Key bindings][Key bindings]]
13 |
14 | * Description
15 | This layer does wonderful things:
16 | - thing01
17 |
18 | * Install
19 | To use this contribution add it to your =~/.spacemacs=
20 |
21 | #+begin_src emacs-lisp
22 | (setq-default dotspacemacs-configuration-layers '(org-journal))
23 | #+end_src
24 |
25 | * Key bindings
26 |
27 | | Key Binding | Description |
28 | |-----------------+----------------|
29 | | ~ x x x~ | Does thing01 |
30 |
--------------------------------------------------------------------------------
/layers/org-journal/packages.el:
--------------------------------------------------------------------------------
1 | ;;; packages.el --- org-journal layer packages file for Spacemacs.
2 | ;;
3 | ;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
4 | ;;
5 | ;; Author: Mike Lockhart
6 | ;; URL: https://github.com/syl20bnr/spacemacs
7 | ;;
8 | ;; This file is not part of GNU Emacs.
9 | ;;
10 | ;;; License: GPLv3
11 |
12 | ;;; Commentary:
13 |
14 |
15 | ;;; Code:
16 |
17 | (defconst org-journal-packages
18 | '(org-journal))
19 |
20 | (defun org-journal/init-org-journal ()
21 | (use-package org-journal
22 | :defer t
23 | :init
24 | (progn
25 | (spacemacs/set-leader-keys "aj" 'org-journal-new-entry))
26 | ;; :config
27 | ;; (progn
28 | ;; (spacemacs/set-leader-keys-for-major-mode 'org-journal
29 | ;; "h" org-journal-open-previous-entry
30 | ;; "b" org-journal-open-previous-entry
31 | ;; "p" org-journal-open-previous-entry
32 | ;; "l" org-journal-open-next-entry
33 | ;; "f" org-journal-open-next-entry
34 | ;; "n" org-journal-open-next-entry
35 | ;; "j" org-journal-new-entry))
36 | ))
37 |
38 | ;;; packages.el ends here
39 |
--------------------------------------------------------------------------------
/layers/squiz/README.org:
--------------------------------------------------------------------------------
1 | #+TITLE: Squiz customisation layer for Spacemacs
2 |
3 | [[file:img/squiz.png]]
4 |
5 | * Table of Contents :TOC@4:
6 | - [[#description][Description]]
7 | - [[#install][Install]]
8 | - [[#why-is-it-down][Why is it Down]]
9 | - [[#layer][Layer]]
10 | - [[#key-bindings][Key Bindings]]
11 | - [[#future-work-todo][Future Work (TODO)]]
12 |
13 | * Description
14 |
15 | Squiz-specific functions and customisations
16 |
17 | * Install
18 |
19 | ** Why is it Down
20 | This is a custom squiz script used to check why services are broken. Install it
21 | by checking out the master repo from the Squiz gitlab.
22 | https://gitlab.squiz.net/cru/whyisitdown
23 |
24 | You'll need to note where you clone it to. For instance I typically clone to
25 | =~/Squiz/git/whyisitdown=
26 |
27 | ** Layer
28 |
29 | To use this configuration layer, add it to your =~/.spacemacs=
30 |
31 | #+BEGIN_SRC emacs-lisp
32 | (setq-default dotspacemacs-configuration-layers '(squiz))
33 | #+END_SRC
34 |
35 | If you cloned the whyisitdown script elsewhere, set the variable (below example
36 | is the default value):
37 |
38 | #+BEGIN_SRC emacs-lisp
39 | (setq-default dotspacemacs-configuration-layers '(
40 | (squiz :variables squiz-wiid-script "~/Squiz/git/whyisitdown/whyisitdown")))
41 | #+END_SRC
42 |
43 | * Key Bindings
44 |
45 | (None yet. When/if I make some, add them here)
46 |
47 |
48 | | Key Binding | Description |
49 | |-------------+-------------------|
50 |
51 | * Future Work (TODO)
52 |
53 | Review old Emacs config to see if anything else is Squiz-specific (apart from mail).
54 |
--------------------------------------------------------------------------------
/layers/squiz/config.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/squiz/config.el
4 | ;; Created: 2016-01-29
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:51:24 mjl>
7 | ;; Platform: Emacs (Spacemacs)
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart (mlockhart@squiz.net)
10 | ;;
11 | ;; Rights: Copyright © 2014, 2016-2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Configuration variables for the layer
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; Configuration for Squiz layer. I actually think putting one variable in a
20 | ;; separate file is more Spaghetti than leaving it where I used it in the
21 | ;; `funcs.el', but that's not how Spacemacs organises things... so here it
22 | ;; is.
23 | ;;
24 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
25 | ;;
26 | ;;; Change Log:
27 | ;;
28 | ;; Old logs up to tag 0.200 are in HISTORY.md
29 | ;; See git log after for changes after 2017-03-06
30 | ;;
31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
32 | ;;
33 | ;;; Code:
34 | ;;
35 |
36 | (defvar squiz-wiid-script
37 | "~/Work/git/whyisitdown/whyisitdown"
38 | "how to find the whyisitdown script")
39 |
40 | (defvar squiz-wiid-keys
41 | "~/Work/git/whyisitdown/keys"
42 | "where are the Pingdom keys")
43 |
44 |
45 | ;;; Local Variables: ***
46 | ;;; mode:Emacs-lisp ***
47 | ;;; fill-column: 79 ***
48 | ;;; comment-column: 0 ***
49 | ;;; End: ***
50 |
--------------------------------------------------------------------------------
/layers/squiz/funcs.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/squiz/funcs.el
4 | ;; Created: 2014-07-03
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:52:11 mjl>
7 | ;; Platform: Emacs
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart (mlockhart@squiz.net)
10 | ;;
11 | ;; Rights: Copyright © 2014, 2016-2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Functions for Squiz-specific stuff
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; Here is where I'm keeping my Squiz-only emacs hacks.
20 | ;;
21 | ;;
22 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
23 | ;;
24 | ;;; Change Log:
25 | ;;
26 | ;; Old logs up to tag 0.200 are in HISTORY.md
27 | ;; See git log after for changes after 2017-03-06
28 | ;;
29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
30 | ;;
31 | ;;; Code:
32 |
33 | (defun squiz//wiid (country client-id)
34 | "runs the whyisitdown script (defined by `squiz-wiid-script').
35 | asynchronously, for COUNTRY and CLIENT-ID. It logs into Pingdom
36 | by sourcing the bash script at `squiz-wiid-keys'."
37 | (shell-command (concat "source " squiz-wiid-keys "; "
38 | squiz-wiid-script " " country
39 | " \"" client-id "\"&"))
40 | (switch-to-buffer "*Async Shell Command*")
41 | (delete-other-windows)
42 | (rename-buffer (format-time-string
43 | (concat "*WIID-%H:%M-" country "-"
44 | (upcase client-id) "*"))))
45 |
46 | (defun squiz/wiid-au (client-id)
47 | "runs `squiz//wiid' for Australian CLIENT-ID"
48 | (interactive "sAU client: ")
49 | (squiz//wiid "AU" client-id))
50 |
51 | (defalias 'wiid-au 'squiz/wiid-au)
52 | (defalias 'yau 'squiz/wiid-au)
53 |
54 | (defun squiz/wiid-uk (client-id)
55 | "runs `squiz//wiid' for United Kingdom CLIENT-ID"
56 | (interactive "sUK client: ")
57 | (squiz//wiid "UK" client-id))
58 |
59 | (defalias 'wiid-uk 'squiz/wiid-uk)
60 | (defalias 'yuk 'squiz/wiid-uk)
61 |
62 |
63 | ;;; Local Variables: ***
64 | ;;; mode:Emacs-lisp ***
65 | ;;; fill-column: 79 ***
66 | ;;; comment-column: 0 ***
67 | ;;; End: ***
68 |
--------------------------------------------------------------------------------
/layers/squiz/img/squiz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sinewalker/dotspacemacs/33cfabb7c528457f0cab679c0fafbffecc362d45/layers/squiz/img/squiz.png
--------------------------------------------------------------------------------
/layers/squiz/keybindings.el:
--------------------------------------------------------------------------------
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 | ;;
3 | ;; File: layers/mjl/keybindings.el
4 | ;; Created: 2016-01-29
5 | ;; Language: Emacs-Lisp
6 | ;; Time-stamp: <2017-03-06 23:52:55 mjl>
7 | ;; Platform: Emacs (Spacemacs)
8 | ;; OS: N/A
9 | ;; Author: [MJL] Michael J. Lockhart (mlockhart@squiz.net)
10 | ;;
11 | ;; Rights: Copyright © 2016, 2017 Michael James Lockhart, B.App.Comp(HONS)
12 | ;;
13 | ;; PURPOSE: Keybindings for my personal layer "mjl"
14 | ;;
15 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
16 | ;;
17 | ;;; Commentary:
18 | ;;
19 | ;; Nothing special here.
20 | ;;
21 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
22 | ;;
23 | ;;; Change Log:
24 | ;;
25 | ;; Old logs up to tag 0.200 are in HISTORY.md
26 | ;; See git log after for changes after 2017-03-06
27 | ;;
28 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29 | ;;
30 | ;;; Code:
31 |
32 |
33 | ;;; Local Variables: ***
34 | ;;; mode:Emacs-lisp ***
35 | ;;; fill-column: 79 ***
36 | ;;; comment-column: 0 ***
37 | ;;; End: ***
38 |
39 |
--------------------------------------------------------------------------------
/snippets/README.md:
--------------------------------------------------------------------------------
1 | # Private directory for Yasnippets snippets
2 |
3 | The content of this directory is ignored by Git. This is the default place
4 | where to store your private yasnippets.
5 |
6 | This path will be loaded automatically and used whenever Yasnippets loads.
7 |
--------------------------------------------------------------------------------
/snippets/c-mode/source-header:
--------------------------------------------------------------------------------
1 | #name : C-source-header
2 | # --
3 | /*`(insert-char ?* 78)`
4 | *
5 | * File: `(if buffer-file-name (insert (file-name-base buffer-file-name) (file-name-extension buffer-file-name t)))`
6 | * Created: `(format-time-string "%Y-%m-%d")`
7 | * Language: `mode-name`
8 | * Time-stamp: `(insert "<")``(insert ">")`
9 | * Platform: $1
10 | * OS: $2
11 | * Author: [MJL] Michael J. Lockhart `(insert "<")`user-mail-address`(insert ">")`
12 | *
13 | * Rights: Copyright © `(format-time-string "%Y")` Michael James Lockhart, B.App.Comp(HONS)
14 | *
15 | * PURPOSE: $3
16 | *
17 | * $0
18 | *
19 | * HISTORY
20 | *
21 | * `(mjl/insert-date-stamp)` - Created
22 | *
23 | */
--------------------------------------------------------------------------------
/snippets/emacs-lisp-mode/source-header:
--------------------------------------------------------------------------------
1 | #name : emacs-source-header
2 | # --
3 | `(insert-char ?; 70)`
4 | ;;
5 | ;; File: `(if buffer-file-name (insert (file-name-base buffer-file-name) (file-name-extension buffer-file-name t)))`
6 | ;; Created: `(format-time-string "%Y-%m-%d")`
7 | ;; Language: `mode-name`
8 | ;; Time-stamp: `(insert "<")``(insert ">")`
9 | ;; Platform: Emacs
10 | ;; OS: N/A
11 | ;; Author: [MJL] Michael J. Lockhart `(insert "<")`user-mail-address`(insert ">")`
12 | ;;
13 | ;; Rights: Copyright © `(format-time-string "%Y")` Michael James Lockhart, B.App.Comp(HONS)
14 | ;;
15 | ;; PURPOSE: $3
16 | ;;
17 | `(insert-char ?; 70)`
18 | ;;
19 | ;;; Commentary:
20 | ;;
21 | ;; $0
22 | ;;
23 | `(insert-char ?; 70)`
24 | ;;
25 | ;;; Change Log:
26 | ;;
27 | ;; `(mjl/insert-date-stamp)` - Created
28 | ;;
29 | `(insert-char ?; 70)`
30 | ;;
31 | ;;; Code:
32 |
--------------------------------------------------------------------------------
/snippets/fundamental-mode/source-header:
--------------------------------------------------------------------------------
1 | #name : source-header
2 | # --
3 | `(insert-char (string-to-char (substring comment-start 0 1)) 80)`
4 | `comment-start`
5 | `comment-start` File: `(if buffer-file-name (insert (file-name-base buffer-file-name) (file-name-extension buffer-file-name t)))`
6 | `comment-start` Created: `(format-time-string "%Y-%m-%d")`
7 | `comment-start` Language: `mode-name`
8 | `comment-start` Time-stamp: `(insert "<")``(insert ">")`
9 | `comment-start` Platform: $1
10 | `comment-start` OS: $2
11 | `comment-start` Author: [MJL] Michael J. Lockhart `(insert "<")`user-mail-address`(insert ">")`
12 | `comment-start`
13 | `comment-start` Rights: Copyright © `(format-time-string "%Y")` Michael James Lockhart, B.App.Comp(HONS)
14 | `comment-start`
15 | `comment-start` PURPOSE: $3
16 | `comment-start`
17 | `comment-start` $0
18 | `comment-start`
19 | `comment-start` HISTORY
20 | `comment-start`
21 | `comment-start` `(mjl/insert-date-stamp)` - Created
22 | `comment-start`
23 |
--------------------------------------------------------------------------------
/snippets/message-mode/24x7:
--------------------------------------------------------------------------------
1 | #name : 24x7-report
2 | # --
3 | To: 24x7-support-monitor@squiz.net
4 | Subject: 24x7 Activity Report - `(format-time-string "%d/%m/%Y")`
5 | ----
6 | Hi all,
7 |
8 | *Outages*:
9 |
10 | Client: $0
11 | Ticket:
12 | Notes:
13 |
14 | *Reporting Anomalies (verified as not an outage)*:
15 |
16 | Client:
17 | Ticket:
18 | Notes:
19 |
20 | Cheers,
21 | Mike
22 |
--------------------------------------------------------------------------------
/snippets/message-mode/handover:
--------------------------------------------------------------------------------
1 | #name : handover-email
2 | # --
3 | To: support-team-global@squiz.co.uk
4 | Subject: AU Support Handover - `(format-time-string "%d/%m/%Y")` (${1:All clear|Attention|Emergency})
5 | ----
6 | G'day UK,
7 |
8 | *Notices*
9 |
10 | $0
11 | ----
12 | *instructions*
13 |
14 | - a brief note regarding the incident. Including details of initial investigation data (e.g. website was completely down | website was up but running slowly | Edge was serving cached content with Matrix down).
15 |
16 |
17 | Subject Line Definitions:
18 | All Clear - when there's nothing at all to follow up on or hand over.
19 | Attention - there is something that needs follow-up, alerting AU of requested scheduled work or you are passing details of an outage over. Please include as much detail as possible.
20 | Emergency - only to be used if you are handing over an active incident to the AU team to continue work on.
21 | ----
22 |
23 | Cheers,
24 | Mike
25 |
--------------------------------------------------------------------------------
/snippets/message-mode/this-week:
--------------------------------------------------------------------------------
1 | #name : this-week-support
2 | # --
3 | To: support-team@squiz.com.au
4 | Cc: sdm@squiz.com.au
5 | Subject: This Week in Support `(format-time-string "%d/%m/%Y")` - `(format-time-string "%d/%m/%Y" (time-add (current-time) (seconds-to-time 518400)))q`
6 | ----
7 | Good morning everybody,
8 |
9 | For the week commencing Monday `(format-time-string "%d %B %Y")`:
10 |
11 | *Leave*
12 | ${1:None}
13 |
14 | *Upgrades*
15 |
16 | | *Client* | *Who* | *Start* | *End* |
17 | |----------+-------+---------+-------|
18 | | $0 | | | |
19 |
20 | *Scheduled Work*
21 | | *Detail* | *Date* |
22 | |----------+--------|
23 | | | |
24 |
25 | *Meetings*
26 | ${2:None}
27 |
28 | *Triage:*
29 | Morning: $3
30 | Evening: $4
31 |
32 | *Week-ends:*
33 | Saturday: $5
34 | Sunday: $6
35 | SCRU: $7
36 |
37 | *RDOs:**
38 |
39 | Mon/Tue: $8
40 | Thu/Fri: $9
41 |
42 | *Other Notes:*
43 | ${8:None}
44 |
45 |
--------------------------------------------------------------------------------