Check-in [0327ed3032]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1:0327ed303251b14e68b4e4bdeeff37321736e579
Date: 2017-10-06 21:43:31
User: cfuhrman
Comment: Sync with personal repository (GNUmakefile) - Remove emacs-packages target which is no longer needed - Rename RSYNC to RSYNC_BIN - Switch to using `fossil tarball` for distribution file generation - Add fossil target (bash_linux) - Remove hasBrokenYaST() as the version of openSUSE where the YaST bug occurred is no longer supported by the openSUSE project, then remove detection for the bug (bashrc) - Remove '.' from PATH as this is a security risk[1] - Make sure /opt/schily/bin is toward the end of $PATH (docs/README.org) - Remove '[TABLE-OF-CONTENTS]' It looks like it is not necessary anymore (emacs.d/custom-nox.el) - Remove theme customization (emacs.d/custom.el) - Add emojify-emoji-styles - Customize linum-format - Customize cfw face - Don't forget to customize which-func face (emacs.d/init.d) - Clean ups where applicable - Add melpa-stable repository - Customize emojify mode - Move yasnippet package initializations to the top so it gets processed first - Install and configure calfw package - Switch theme to planet-theme - Install and configure gited - Install and configure sed-mode - Fix the following bugs: + Fix bug involving enriched text mode + Override use-fancy-splash-screens-p() (emacs.d/cmf-org-settings.el) - Remove Kawasaki Riding Log macro - Customize Journal Entry template - Customize org-latex-classes - Switch to using lualatex - Add incubate.org and ideas.org to list of org-mode refile targets (emacs.d/snippets/org-mode/bp) - Remove '[TABLE-OF-CONTENTS]' It looks like it is not necessary anymore (mk/documentation.mk) - Add a couple of more file suffixes to clean up. These are generated by LaTeX Footnotes: [1] See https://www.seas.upenn.edu/cets/answers/dot-path.html
Tags And Properties
Context
2017-12-03
21:56
[3c1101ac0d] Sync latest changes from my personal repository (README.org) - Bump Copyright (emacs) - Re-enable installation of vc-fossil for Emacs 25 and greater - Install and configure the following packages: + flyspell-correct-ivy[1] + all-the-icons[2] + all-the-icons-dired[3] + all-the-icons-ivy[4] + which-key[5] + ace-window[6] + highlight-parentheses[7] + flyspell-correct-ivy[8] - Force set fill-column to 80 characters for text-mode - Enable global-emojify-mode-line-mode - Automatically install fonts required for all-the-icons - Use emoji for common modes presented in the mode-line + 💡: beacon Mode + 📔: eldoc mode + 🦋: flycheck-mode + 🄶: ggtags-mode + 🌲: undo-tree + 🅈: yas-minor-mode - Load package archives more intelligently - Massive reworking of yasnippet[9] and auto-complete[10]. - Move mode-specific variables into their own use-package blocks - Bootstrap diminish prior to installation of use-package - Added boiler-plates for (c)perl-mode - Optimize loading of custom files (setup.sh) - Bump Copyright Footnotes: [1] https://github.com/d12frosted/flyspell-correct [2] https://github.com/domtronn/all-the-icons.el [3] https://github.com/jtbm37/all-the-icons-dired [4] https://github.com/asok/all-the-icons-ivy [5] https://github.com/justbur/emacs-which-key [6] https://github.com/abo-abo/ace-window [7] https://github.com/tsdh/highlight-parentheses.el [8] https://github.com/d12frosted/flyspell-correct/blob/master/flyspell-correct-ivy.el [9] https://github.com/joaotavora/yasnippet [10] https://github.com/auto-complete/auto-complete (user: cfuhrman, tags: trunk, v2017.12)
2017-10-06
21:43
[0327ed3032] Sync with personal repository (GNUmakefile) - Remove emacs-packages target which is no longer needed - Rename RSYNC to RSYNC_BIN - Switch to using `fossil tarball` for distribution file generation - Add fossil target (bash_linux) - Remove hasBrokenYaST() as the version of openSUSE where the YaST bug occurred is no longer supported by the openSUSE project, then remove detection for the bug (bashrc) - Remove '.' from PATH as this is a security risk[1] - Make sure /opt/schily/bin is toward the end of $PATH (docs/README.org) - Remove '[TABLE-OF-CONTENTS]' It looks like it is not necessary anymore (emacs.d/custom-nox.el) - Remove theme customization (emacs.d/custom.el) - Add emojify-emoji-styles - Customize linum-format - Customize cfw face - Don't forget to customize which-func face (emacs.d/init.d) - Clean ups where applicable - Add melpa-stable repository - Customize emojify mode - Move yasnippet package initializations to the top so it gets processed first - Install and configure calfw package - Switch theme to planet-theme - Install and configure gited - Install and configure sed-mode - Fix the following bugs: + Fix bug involving enriched text mode + Override use-fancy-splash-screens-p() (emacs.d/cmf-org-settings.el) - Remove Kawasaki Riding Log macro - Customize Journal Entry template - Customize org-latex-classes - Switch to using lualatex - Add incubate.org and ideas.org to list of org-mode refile targets (emacs.d/snippets/org-mode/bp) - Remove '[TABLE-OF-CONTENTS]' It looks like it is not necessary anymore (mk/documentation.mk) - Add a couple of more file suffixes to clean up. These are generated by LaTeX Footnotes: [1] See https://www.seas.upenn.edu/cets/answers/dot-path.html (user: cfuhrman, tags: trunk, v2017.10)
2017-03-15
18:00
[77f676b6a0] Regenerate documentation (user: cfuhrman, tags: trunk)
Changes

Changes to GNUmakefile.

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
...
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
...
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189


190
191
192
193
194
195
196
...
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248

249
250
251
252
253
254
255
256
257
258
259
260
261

# Determine distribution file.  These lines will produce spewage if
# this isn't a fossil checkout
FOSSIL_BRANCH=$(shell fossil info | grep "^tags" | awk -F\: '{print $$2}' | sed 's/ //g' | awk -F\, '{print $$NF}')
FOSSIL_REPO=${HOME}/repos/public.fossil
CKOUT_DATE=$(shell fossil info | grep "^checkout" | awk '{ print $$3 }' | sed 's/[-: ]//g')
DISTFILE=shellpak-${FOSSIL_BRANCH}-${CKOUT_DATE}.tar.gz
DISTEXCLUDES=--exclude=.fslckout --exclude=_FOSSIL_ --exclude=.AppleDouble --exclude=config --exclude=ext

# Command options
EMACS=emacs
EMACS_INIT=${HOME}/.emacs.d/init.el
EMACS_INSTALL_PACKAGES=cmf-autoinstall-packages
RSYNC=rsync
RSYNC_EXCLUDE=global-excludes
RSYNC_OPTS=-Ccavz --exclude='svn-commit*' --exclude='.AppleDouble' --exclude='*~' --exclude-from=${RSYNC_EXCLUDE} --delete
RSYNC_CONN_OPTS=-e ssh
RSYNC_PUBLIC_OPTS=-Ccavz --exclude=GPATH --exclude=GRTAGS --exclude=GTAGS --exclude=docs/*.txt \
  --exclude=.fslckout --exclude=config --exclude=ext --exclude='.AppleDouble' --exclude='*~' \
  --exclude=_FOSSIL_ --exclude=VERSION --delete
SETUP_BIN=${PWD}/setup.sh
................................................................................

remote: ${REMOTEHOSTS} ${POLARHOSTS}
	@echo 'All remote hosts updated'

disabled: ${DISABLEDHOSTS}
	@echo 'All disabled hosts updated (Are they working now?)'

emacs-packages:
	${EMACS} --batch -l ${EMACS_INIT} -f ${EMACS_INSTALL_PACKAGES}

clean: clean-echo ${CLEANDIRS} clean-dist clean-tags
	@rm ${RM_OPTS} *.bak
	@rm ${RM_OPTS} *~
	@rm ${RM_OPTS} *-baseline
	@rm ${RM_OPTS} *-merge
	@rm ${RM_OPTS} *-original

................................................................................
# WARNING: Will remove *all* installed packages.  Use with care!
clean-elpa: clean-elc
	@rm ${RM_OPTS}r ${HOME}/.emacs.d/elpa/*

public: readme
	@rm ${RM_OPTS} docs/README.md
	@echo 'Syncing with public repository'
	${RSYNC} ${RSYNC_PUBLIC_OPTS} . ${PUBLICCO}

# Target for importing changes from public Fossil repository
git-import: .git
	@echo 'Importing changes from Fossil'
	fossil export --git ${FOSSIL_REPO} | \
          sed 's/^committer cfuhrman <cfuhrman>/committer Christopher M. Fuhrman <cfuhrman@pobox.com>/g' | \
          git fast-import
	git reset --hard trunk

dist: ${DISTFILE}

version: VERSION

VERSION:
	@fossil info | awk '/^checkout/ { printf "[%s] %s %s\n", substr($$2, 1, 10), $$3, $$4 }' > VERSION

subdirs: ${SUBDIRS}
${SUBDIRS} :
	${MAKE} -C $@

${CLEANDIRS} :
	${MAKE} -C $(@:clean-%=%) clean

# Binary targets
emacs:
	@which emacs >/dev/null




#
# Documentation Targets
#

readme: markdown
	@cp -rp docs/README.md .
................................................................................

#
# Host Targets
#

${LOCALHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

${REMOTEHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

# Note: This target requires a tar that supports '--exclude' option,
# such as GNU tar
${DISTFILE}: clean clean-tags txt version
	@if test -f .fslckout || test -f _FOSSIL_ ; then \
	  echo '--------------------------------------------------------------------'; \
	  echo "|   Do not forget to run 'fossil up' before running this command   |"; \
	  echo '--------------------------------------------------------------------'; \
	fi
	@mkdir shellpak
	@${TAR} ${DISTEXCLUDES} --exclude=shellpak -c . | ( cd shellpak ; ${TAR} xf - )
	@${TAR} --exclude='*.org' --exclude=.AppleDouble -cvzf $@ shellpak
	@rm -rf shellpak

	@echo "Successfully created ${DISTFILE}"

.PHONY: subdirs ${SUBDIRS}
.PHONY: subdirs ${CLEANDIRS}
.PHONY: subdirs ${HTMDIRS}
.PHONY: subdirs ${PDFDIRS}
.PHONY: subdirs ${TXTDIRS}
.PHONY: subdirs ${MDDIRS}
.PHONY: subdirs ${DBKDIRS}
.PHONE: subdirs ${TXIDIRS}
.PHONY: clean clean-elc docbook html pdf txt markdown texinfo

# Ende







<


<
<
<
|







 







<
<
<







 







|













|













>
>







 







|




|


<
<

<
<
<
<
<
<
<
<
<
>













51
52
53
54
55
56
57

58
59



60
61
62
63
64
65
66
67
...
105
106
107
108
109
110
111



112
113
114
115
116
117
118
...
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
...
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231


232









233
234
235
236
237
238
239
240
241
242
243
244
245
246

# Determine distribution file.  These lines will produce spewage if
# this isn't a fossil checkout
FOSSIL_BRANCH=$(shell fossil info | grep "^tags" | awk -F\: '{print $$2}' | sed 's/ //g' | awk -F\, '{print $$NF}')
FOSSIL_REPO=${HOME}/repos/public.fossil
CKOUT_DATE=$(shell fossil info | grep "^checkout" | awk '{ print $$3 }' | sed 's/[-: ]//g')
DISTFILE=shellpak-${FOSSIL_BRANCH}-${CKOUT_DATE}.tar.gz


# Command options



RSYNC_BIN=rsync
RSYNC_EXCLUDE=global-excludes
RSYNC_OPTS=-Ccavz --exclude='svn-commit*' --exclude='.AppleDouble' --exclude='*~' --exclude-from=${RSYNC_EXCLUDE} --delete
RSYNC_CONN_OPTS=-e ssh
RSYNC_PUBLIC_OPTS=-Ccavz --exclude=GPATH --exclude=GRTAGS --exclude=GTAGS --exclude=docs/*.txt \
  --exclude=.fslckout --exclude=config --exclude=ext --exclude='.AppleDouble' --exclude='*~' \
  --exclude=_FOSSIL_ --exclude=VERSION --delete
SETUP_BIN=${PWD}/setup.sh
................................................................................

remote: ${REMOTEHOSTS} ${POLARHOSTS}
	@echo 'All remote hosts updated'

disabled: ${DISABLEDHOSTS}
	@echo 'All disabled hosts updated (Are they working now?)'




clean: clean-echo ${CLEANDIRS} clean-dist clean-tags
	@rm ${RM_OPTS} *.bak
	@rm ${RM_OPTS} *~
	@rm ${RM_OPTS} *-baseline
	@rm ${RM_OPTS} *-merge
	@rm ${RM_OPTS} *-original

................................................................................
# WARNING: Will remove *all* installed packages.  Use with care!
clean-elpa: clean-elc
	@rm ${RM_OPTS}r ${HOME}/.emacs.d/elpa/*

public: readme
	@rm ${RM_OPTS} docs/README.md
	@echo 'Syncing with public repository'
	${RSYNC_BIN} ${RSYNC_PUBLIC_OPTS} . ${PUBLICCO}

# Target for importing changes from public Fossil repository
git-import: .git
	@echo 'Importing changes from Fossil'
	fossil export --git ${FOSSIL_REPO} | \
          sed 's/^committer cfuhrman <cfuhrman>/committer Christopher M. Fuhrman <cfuhrman@pobox.com>/g' | \
          git fast-import
	git reset --hard trunk

dist: ${DISTFILE}

version: VERSION

VERSION: fossil
	@fossil info | awk '/^checkout/ { printf "[%s] %s %s\n", substr($$2, 1, 10), $$3, $$4 }' > VERSION

subdirs: ${SUBDIRS}
${SUBDIRS} :
	${MAKE} -C $@

${CLEANDIRS} :
	${MAKE} -C $(@:clean-%=%) clean

# Binary targets
emacs:
	@which emacs >/dev/null

fossil:
	@which fossil >/dev/null

#
# Documentation Targets
#

readme: markdown
	@cp -rp docs/README.md .
................................................................................

#
# Host Targets
#

${LOCALHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC_BIN} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}

${REMOTEHOSTS}: txt
	@echo "Propagating to $@"
	@${RSYNC_BIN} ${RSYNC_OPTS} ${RSYNC_CONN_OPTS} . ${USER}@$@:${SHELLDIR}
	@${SSH} $@ ${SSH_SETUP_CMD}



${DISTFILE}: clean clean-tags txt version









	@fossil tarball ${FOSSIL_BRANCH} ${DISTFILE}
	@echo "Successfully created ${DISTFILE}"

.PHONY: subdirs ${SUBDIRS}
.PHONY: subdirs ${CLEANDIRS}
.PHONY: subdirs ${HTMDIRS}
.PHONY: subdirs ${PDFDIRS}
.PHONY: subdirs ${TXTDIRS}
.PHONY: subdirs ${MDDIRS}
.PHONY: subdirs ${DBKDIRS}
.PHONE: subdirs ${TXIDIRS}
.PHONY: clean clean-elc docbook html pdf txt markdown texinfo

# Ende

Changes to README.md.





























1
2
3
4
5
6
7





























# Description<a id="sec-1" name="sec-1"></a>

ShellPAK allows for the automatic installation and configuration of
my personal [GNU Bash](http://www.gnu.org/software/bash/) shell environment as well as the configuration
of the following programs:

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1. Description</a>
<ul>
<li><a href="#sec-1-1">1.1. Requirements</a></li>
<li><a href="#sec-1-2">1.2. Supported Platforms</a></li>
</ul>
</li>
<li><a href="#sec-2">2. Obtaining ShellPAK</a>
<ul>
<li><a href="#sec-2-1">2.1. Alternate Repositories</a></li>
</ul>
</li>
<li><a href="#sec-3">3. Installation</a>
<ul>
<li><a href="#sec-3-1">3.1. Other setup options</a></li>
</ul>
</li>
<li><a href="#sec-4">4. Bugs</a></li>
<li><a href="#sec-5">5. Author</a></li>
<li><a href="#sec-6">6. Copyright</a></li>
</ul>
</div>
</div>



# Description<a id="sec-1" name="sec-1"></a>

ShellPAK allows for the automatic installation and configuration of
my personal [GNU Bash](http://www.gnu.org/software/bash/) shell environment as well as the configuration
of the following programs:

Changes to bash_linux.

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# ====================================================================

#
# Sets up system environment for Linux-based boxen
#


# Function: hasBrokenYaST
#
# There's a SuSE bug whereby if interactive POSIX mode is enabled,
# then /etc/bash_completion.d/yast2-completion.sh will throw a syntax
# error (see https://bugzilla.novell.com/show_bug.cgi?id=504844).
# This determines if we have a broken version of YaST (< v2.18.16) and
# returns accordingly
#
# Returns:
#
#   1 if broken, 0 if not

hasBrokenYaST ()
{

        # Are we a SuSE box?
        if [ -f /etc/SuSE-release ] && rpm -q yast2 >/dev/null; then

                # First get the version of yast we're using
                YAST_VERSION=( `rpm -q yast2 | sed -re 's/^yast2-([0-9]+).([0-9]+).([0-9]+).*$/\1 \2 \3/'` )

                # Bug 504844 fix will be available in yast2 v. 2.18.16
                if [ ${YAST_VERSION[0]} -lt 2 ]; then
                        return 1
                elif [[ ${YAST_VERSION[0]} -eq 2 \
                    && ${YAST_VERSION[1]} -lt 18 ]]; then
                        return 1
                elif [[ ${YAST_VERSION[0]} -eq 2 \
                    && ${YAST_VERSION[1]} -eq 18 \
                    && ${YAST_VERSION[2]} -lt 16 ]]; then
                        return 1
                fi

        fi

        # We either aren't a SuSE box or else have a non-broken version of
        # YaST
        return 0

} # hasBrokenYaST()

# --------------------------------------------------------------------

# This is in case we're not a login shell
if [ "x$SHLVL" != 'x1' ] && [ -e '/etc/profile.d' ]; then

        # Red Hat/Fedora Core distributions use /etc/profile.d
        for i in /etc/profile.d/*.sh; do

                if [ -x $i ]; then







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







13
14
15
16
17
18
19











































20
21
22
23
24
25
26
# ====================================================================

#
# Sets up system environment for Linux-based boxen
#













































# This is in case we're not a login shell
if [ "x$SHLVL" != 'x1' ] && [ -e '/etc/profile.d' ]; then

        # Red Hat/Fedora Core distributions use /etc/profile.d
        for i in /etc/profile.d/*.sh; do

                if [ -x $i ]; then

Changes to bashrc.

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223






224
225
226
227
228
229
230
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
paths=('/usr/games'                             \
       '/usr/X11R6/bin'                         \
       '/usr/X11R7/bin'                         \
       '/usr/sbin'                              \
       '/opt/bin'                               \
       '/opt/sbin'                              \
       '/sbin'                                  \
       '/opt/schily/bin'                        \
       '/usr/local/sbin'                        \
       "$HOME/.composer/vendor/bin"             \
       "$HOME/bin"                              \
       '.'
      )

# Pre-pend additional directories if required
for path in ${paths[@]}; do

        # Determine if this directory is already in $PATH
        if [ -d $path ]; then
                echo $PATH | egrep '(^|\:)'${path}'(\:|$)' >/dev/null 2>&1 || PATH=${path}:$PATH
        fi

done







# Get rid of pre-pended ':' and double colons
PATH=${PATH#:}
PATH=${PATH//::/:}

# Set default for YASTISBROKEN
YASTISBROKEN=0
................................................................................

*BSD )
        source $SHELLDIR/bash_bsd
        ;;

Linux )
        source $SHELLDIR/bash_linux
        hasBrokenYaST
        YASTISBROKEN=$?
        ;;

[uU][nN][iI][xX]* )
        source $SHELLDIR/bash_unix_sv
        ;;

# Note: if we cannot determine the host OS, use SYSV







<


|
<











>
>
>
>
>
>







 







<
<







201
202
203
204
205
206
207

208
209
210

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
...
270
271
272
273
274
275
276


277
278
279
280
281
282
283
paths=('/usr/games'                             \
       '/usr/X11R6/bin'                         \
       '/usr/X11R7/bin'                         \
       '/usr/sbin'                              \
       '/opt/bin'                               \
       '/opt/sbin'                              \
       '/sbin'                                  \

       '/usr/local/sbin'                        \
       "$HOME/.composer/vendor/bin"             \
       "$HOME/bin"

      )

# Pre-pend additional directories if required
for path in ${paths[@]}; do

        # Determine if this directory is already in $PATH
        if [ -d $path ]; then
                echo $PATH | egrep '(^|\:)'${path}'(\:|$)' >/dev/null 2>&1 || PATH=${path}:$PATH
        fi

done

# Note we want to append /opt/schily/bin since sometimes that contains a version
# of tar that doesn't support the -z option
if [ -d /opt/schily/bin ]; then
	PATH=$PATH:/opt/schily/bin
fi

# Get rid of pre-pended ':' and double colons
PATH=${PATH#:}
PATH=${PATH//::/:}

# Set default for YASTISBROKEN
YASTISBROKEN=0
................................................................................

*BSD )
        source $SHELLDIR/bash_bsd
        ;;

Linux )
        source $SHELLDIR/bash_linux


        ;;

[uU][nN][iI][xX]* )
        source $SHELLDIR/bash_unix_sv
        ;;

# Note: if we cannot determine the host OS, use SYSV

Changes to docs/README.org.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#+EMAIL: cfuhrman@pobox.com
#+OPTIONS: email:t
#
#+LATEX_HEADER: \usepackage{fancyhdr}
#+LATEX_HEADER: \pagestyle{fancyplain}

#+LATEX: \thispagestyle{empty}
# [TABLE-OF-CONTENTS]

* Description

  ShellPAK allows for the automatic installation and configuration of
  my personal [[http://www.gnu.org/software/bash/][GNU Bash]] shell environment as well as the configuration
  of the following programs:








<







3
4
5
6
7
8
9

10
11
12
13
14
15
16
#+EMAIL: cfuhrman@pobox.com
#+OPTIONS: email:t
#
#+LATEX_HEADER: \usepackage{fancyhdr}
#+LATEX_HEADER: \pagestyle{fancyplain}

#+LATEX: \thispagestyle{empty}


* Description

  ShellPAK allows for the automatic installation and configuration of
  my personal [[http://www.gnu.org/software/bash/][GNU Bash]] shell environment as well as the configuration
  of the following programs:

Changes to emacs.d/custom-nox.el.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(linum-format "%03d|"))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(default ((t (:inherit nil :stipple nil :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 1 :width normal :foundry "default" :family "default"))))
 '(cperl-array-face ((nil (:background "darkblue" :foreground "yellow" :weight bold))))
 '(cperl-hash-face ((nil (:background "blue" :foreground "red" :slant italic :weight bold))))
 '(cursor ((t (:foreground "red"))))
 '(diff-added ((t (:foreground "green"))))
 '(diff-file-header ((nil (:background "blue" :foreground "yellow"))))
 '(diff-header ((nil (:foreground "white" :weight bold))))
 '(diff-hunk-header ((t (:inherit diff-header :foreground "cyan"))))
 '(diff-index ((t (:background "purple" :foreground "white" :weight bold))))
 '(diff-refine-change ((((class color) (background dark)) (:underline t))))
 '(diff-removed ((t (:foreground "red"))))
 '(dired-directory ((t (:foreground "lightblue" :weight bold))))
 '(dired-header ((t (:foreground "yellow" :weight bold))))
 '(font-lock-comment-face ((nil (:foreground "lightblue" :slant italic))))
 '(font-lock-function-name-face ((nil (:foreground "yellow" :weight bold))))
 '(font-lock-keyword-face ((nil (:foreground "darkgreen" :weight bold))))
 '(font-lock-string-face ((nil (:foreground "wheat"))))
 '(header-line ((default (:background "purple" :foreground "white" :underline t :weight bold)) (((type tty)) (:foreground "green" :inverse-video nil :box (:line-width 2 :color "grey75" :style released-button) :underline t :weight bold))))
 '(indent-guide-face ((t (:foreground "blue"))) t)
 '(link ((nil (:foreground "lightblue" :underline t))))
 '(linum ((t (:background "blue" :foreground "cyan" :weight light))))
 '(log-view-file ((nil (:background "purple" :foreground "white" :weight bold))))
 '(log-view-message ((nil (:foreground "cyan" :weight bold))))
 '(markup-complex-replacement-face ((t (:inherit markup-meta-face :foreground "yellow" :box (:line-width 2 :style released-button) :weight bold))))
 '(markup-gen-face ((t (:background "black" :foreground "red" :underline t :weight light))))
 '(markup-list-face ((t (:inherit markup-meta-face :background "blue" :foreground "yellow" :underline t))))
 '(markup-meta-face ((t (:stipple nil :foreground "cyan" :inverse-video nil :box nil :strike-through nil :overline nil :underline t :slant normal :weight normal :height 90 :width normal :foundry "unknown" :family "Monospace"))))
 '(markup-reference-face ((t (:foreground "cyan" :underline t))))
 '(menu ((((type tty)) (:background "blue" :foreground "white" :weight bold))))
 '(minibuffer-prompt ((t (:foreground "lightblue" :weight bold))))
 '(mode-line ((t (:background "blue" :foreground "white" :weight bold))))
 '(mode-line-inactive ((default (:inherit mode-line :background "blue" :foreground "cyan" :weight light)) (nil nil)))
 '(org-table ((t (:background "black" :foreground "cyan"))))
 '(org-tag ((t (:foreground "indianred3" :weight bold))))
 '(org-agenda-date ((t (:inherit org-agenda-structure :foreground "cyan" :underline nil))) t)
 '(org-agenda-structure ((t (:foreground "cyan" :weight bold))))
 '(smerge-markers ((t (:background "black" :foreground "white" :weight bold))))
 '(smerge-mine ((t (:foreground "green"))))
 '(smerge-other ((t (:foreground "red"))))
 '(smerge-refined-change ((t (:background "blue" :foreground "yellow"))))
 '(w3m-image-anchor ((((class color) (background dark)) (:background "blue" :foreground "yellow" :weight bold))))
 '(w3m-tab-selected ((((class color)) (:background "green" :foreground "white" :weight bold))))
 '(w3m-tab-selected-retrieving ((((class color)) (:background "red" :foreground "white" :weight bold))))
 '(w3m-tab-unselected ((((class color)) (:background "cyan" :foreground "black" :weight light))))
 '(w3m-tab-unselected-retrieving ((((class color)) (:background "red" :foreground "blue"))))
 '(w3m-tab-unselected-unseen ((((class color)) (:background "cyan" :foreground "white" :weight bold))))
 '(weather-metno-date ((t (:background "black" :foreground "white" :weight bold))))
 '(which-func ((nil (:background "blue" :foreground "cyan" :weight bold)))))

;;; custom-nox.el ends here








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<



21
22
23
24
25
26
27





















































28
29
30

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(linum-format "%03d|"))






















































;;; custom-nox.el ends here

Changes to emacs.d/custom-nox256.el.

20
21
22
23
24
25
26

27
28
29
30
;;; Code:

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.

 '(linum-format "%03d|"))

;;; custom-nox256.el ends here








>




20
21
22
23
24
25
26
27
28
29
30
31
;;; Code:

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(cfw:face-toolbar-button-off ((t (:foreground "color-34" :weight bold))))
 '(linum-format "%03d|"))

;;; custom-nox256.el ends here

Changes to emacs.d/custom.el.

21
22
23
24
25
26
27

28
29
30
31
32









33
34
;;; Code:

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.

 '(font-use-system-font t)
 '(linum-format "%03d|")
 '(sunshine-show-icons t)
 '(tool-bar-mode nil))










;;; custom.el ends here








>

|



>
>
>
>
>
>
>
>
>


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
;;; Code:

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(emojify-emoji-styles (quote (unicode)))
 '(font-use-system-font t)
 '(linum-format "%-3d")
 '(sunshine-show-icons t)
 '(tool-bar-mode nil))

(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(cfw:face-toolbar-button-off ((t (:foreground "light steel blue" :weight bold))))
 '(linum ((t (:foreground "LightSteelBlue3"))))
 '(which-func ((t (:foreground "goldenrod")))))

;;; custom.el ends here

Changes to emacs.d/init.el.

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
...
139
140
141
142
143
144
145






146

147
148

149
150
151





152
153
154
155
156
157
158
...
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
...
202
203
204
205
206
207
208






















209
210
211
212
213
214
215
...
311
312
313
314
315
316
317

318
319
320
321
322
323
324
...
330
331
332
333
334
335
336















337
338
339
340
341
342
343
...
377
378
379
380
381
382
383


















































384
385
386
387
388
389
390
...
438
439
440
441
442
443
444











445
446
447
448
449
450
451
...
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
...
509
510
511
512
513
514
515











516
517
518
519
520
521
522
...
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
...
734
735
736
737
738
739
740










741
742
743
744
745
746
747
...
756
757
758
759
760
761
762













763
764
765
766
767
768
769
770
771
772
773
774
775


776

777
778
779
780
781
782
783
...
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
...
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
 '(cperl-continued-statement-offset 4)
 '(cperl-electric-keywords t)
 '(cperl-electric-linefeed t)
 '(cperl-electric-parens nil)
 '(cperl-font-lock t)
 '(cperl-highlight-variables-indiscriminately t)
 '(cperl-indent-level 8)
 '(custom-enabled-themes (quote (twilight)))
 '(delete-selection-mode nil)
 '(diff-switches "-u")
 '(dired-listing-switches "-alh")
 '(dired-use-ls-dired (quote unspecified))
 '(display-time-mode t)
 '(emerge-combine-versions-template "
%b
................................................................................
 )

;; Load the appropriate customization file based on if we are running
;; under a window system, such as "x" or "ns" (Mac OS X or GNUstep)
(if (equal window-system nil)
    (if (or (string-match "term-256" (getenv "TERM"))
            (string-match "screen-256" (getenv "TERM")))






        (setq custom-file "~/.emacs.d/custom-nox256.el")

      (setq custom-file "~/.emacs.d/custom-nox.el"))
  (setq custom-file "~/.emacs.d/custom.el"))


(load custom-file)







;; Programming styles
;; --------------------------------------------------------------------

;; Shipwire Coding Style
(c-add-style "psr2"
            '("psr2"
................................................................................
;; My own style
(c-add-style "cmf"
             '("bsd"
	       (indent-tabs-mode . nil)
               (c-offsets-alist
                (statement-cont . (first c-lineup-cascaded-calls +)))))


;; Functions
;; --------------------------------------------------------------------

;; Functions for perltidy
(defun cmf/perltidy-region ()
  "Run perltidy on the current region."
  (interactive)
................................................................................
;; Function for loading exec paths
(defun cmf/update-exec-path (pathlist)
  "Add given PATHLIST to 'exec-path'."
  (dolist (path pathlist)
    (add-to-list 'exec-path path)
    (setenv "PATH" (concat (getenv "PATH") ":" path)))
  )
























;; Defined modes
;; --------------------------------------------------------------------

(define-derived-mode nice-msg-mode
  text-mode "Nice"
................................................................................


;; Package configuration
;; --------------------------------------------------------------------

(require 'package)
(setq package-enable-at-startup nil)

(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

;; Bootstrap 'use-package' if necessary
(unless (package-installed-p 'use-package)
................................................................................
  (require 'use-package))
(require 'diminish)
(require 'bind-key)

;; Packages loaded through external files
(require 'cmf-org-settings)
















;;
;; OSX Modes (Mac OS X only)
;;

(when (eq system-type 'darwin)

  ;; osx-location
................................................................................
  )

;;
;; Generic Packages
;;
;; For use on all operating systems
;;



















































;; apache-mode
(use-package apache-mode
  :ensure t
  :defer t
  :no-require t
  :mode (("\\.htaccess\\'"                   . apache-mode)
................................................................................
  :config
  (add-hook 'c-mode-common-hook 'nice-prog-hook)
  (add-hook 'c-mode-common-hook
            (lambda ()
              (font-lock-add-keywords nil
                                      '(("\\<\\(FIXME\\|TODO\\|BUG\\|LATER\\):" 1 font-lock-warning-face t)))))
  )












;; [c]perl-mode
(use-package cperl-mode
  :config
  (add-hook 'cperl-mode-hook 'nice-prog-hook)
  (add-hook 'cperl-mode-hook
            (lambda ()
................................................................................
;; csv-nav-mode
(use-package csv-nav-mode
  :ensure csv-nav
  :defer t
  :mode ("\\.csv\\'" . csv-nav-mode)
  )

;; darktooth-theme
(if (not(equal window-system nil))
    (use-package darktooth-theme
      :ensure t

      :init
      (load-theme 'darktooth t)
      )
  )

;; eldoc
(use-package eldoc
  :diminish eldoc-mode " Edoc"
  )

;; flycheck
(use-package flycheck
................................................................................
  )

;; ggtags
(use-package ggtags
  :ensure t
  :defer t
  :diminish ggtags-mode " G"











  )

;; go-mode
(use-package go-mode
  :no-require t

  :ensure go-mode
................................................................................
  )

;; jinja2-mode
(use-package jinja2-mode
  :ensure t
  :defer t
  :mode ("\\.j2\\'" . jinja2-mode)
  
  )

;; json-mode
(use-package json-mode
  :ensure t

  :config
................................................................................
              (font-lock-add-keywords nil
                                      '(("\\<\\(FIXME\\|TODO\\|BUG\\|LATER\\)" 1 font-lock-warning-face t)))))

  ;; Load phpdocumentor
  (load-file "~/.emacs.d/thirdparty/phpdocumentor.el")

  )











;; pretty-lambdada
(if (version< emacs-version "24.4")
    (use-package pretty-lambdada
      :ensure t
      :defer t

................................................................................
  )

;; ruby-mode
(use-package ruby-mode
  :init
  (add-hook 'ruby-mode-hook 'nice-prog-hook)
  )














;; smart-mode-line
(use-package smart-mode-line
  :ensure t

  :init
  (add-to-list 'custom-safe-themes
               "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa")
  (add-to-list 'custom-safe-themes
               "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e")
  (sml/setup)

  :config


  (sml/apply-theme 'dark)

  )

;; sh-script
(use-package sh-script
  :config
  (add-hook 'sh-mode-hook 'nice-prog-hook)
  (add-hook 'sh-mode-hook
................................................................................
         )

  :init
  (add-hook 'text-mode-hook     'nice-text-hook)
  )

;; twilight-theme
(if (equal window-system nil)
    (use-package twilight-theme
      :ensure t

      :init
      (load-theme 'twilight t)
      )
  )
................................................................................
(use-package yaml-mode
  :ensure t

  :mode ("\\.sls\\'" . yaml-mode)
  :config
  (add-hook 'yaml-mode-hook 'nice-prog-hook)
  )

(use-package yasnippet
  :ensure t

  :config
  ;; Inter-field navigation
  (defun yas/goto-end-of-active-field ()
    (interactive)
    (let* ((snippet (car (yas--snippets-at-point)))
           (position (yas--field-end (yas--snippet-active-field snippet))))
      (if (= (point) position)
          (move-end-of-line 1)
        (goto-char position))))

  (defun yas/goto-start-of-active-field ()
    (interactive)
    (let* ((snippet (car (yas--snippets-at-point)))
           (position (yas--field-start (yas--snippet-active-field snippet))))
      (if (= (point) position)
          (move-beginning-of-line 1)
        (goto-char position))))

  ;; fix some org-mode + yasnippet conflicts:
  (defun yas/org-very-safe-expand ()
    (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

  ;; Turn on snippets
  (yas-global-mode t)

  ;; Keybindings
  (define-key yas-keymap (kbd "<return>") 'yas-exit-all-snippets)
  (define-key yas-keymap (kbd "C-e") 'yas/goto-end-of-active-field)
  (define-key yas-keymap (kbd "C-a") 'yas/goto-start-of-active-field)

  ;; Update org-mode configuration
  (add-hook 'org-mode-hook
            (lambda ()
              (make-variable-buffer-local 'yas/trigger-key)
              (setq yas/trigger-key [tab])
              (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
              (define-key yas/keymap [tab] 'yas/next-field)))

  ;; Wrap around region
  (setq yas-wrap-around-region t)
  )


;; Miscellany
;; --------------------------------------------------------------------

;; Diminished functions
(diminish 'ivy-mode "")
(diminish 'yas-minor-mode " Y")







<







 







>
>
>
>
>
>
|
>
|
|
>



>
>
>
>
>







 







<







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>







 







<
<
<
<
<
<
<
<
<
<







 







>
>
>
>
>
>
>
>
>
>
>







 







|







 







>
>
>
>
>
>
>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>
>













>
>
|
>







 







|







 







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







78
79
80
81
82
83
84

85
86
87
88
89
90
91
...
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
...
188
189
190
191
192
193
194

195
196
197
198
199
200
201
...
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
...
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
...
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
...
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
...
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
...
576
577
578
579
580
581
582










583
584
585
586
587
588
589
...
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
...
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
...
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
...
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
...
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
....
1033
1034
1035
1036
1037
1038
1039














































1040
1041
1042
1043
1044
1045
1046
 '(cperl-continued-statement-offset 4)
 '(cperl-electric-keywords t)
 '(cperl-electric-linefeed t)
 '(cperl-electric-parens nil)
 '(cperl-font-lock t)
 '(cperl-highlight-variables-indiscriminately t)
 '(cperl-indent-level 8)

 '(delete-selection-mode nil)
 '(diff-switches "-u")
 '(dired-listing-switches "-alh")
 '(dired-use-ls-dired (quote unspecified))
 '(display-time-mode t)
 '(emerge-combine-versions-template "
%b
................................................................................
 )

;; Load the appropriate customization file based on if we are running
;; under a window system, such as "x" or "ns" (Mac OS X or GNUstep)
(if (equal window-system nil)
    (if (or (string-match "term-256" (getenv "TERM"))
            (string-match "screen-256" (getenv "TERM")))
        (defvar cmf-console-colors 256)
      (defvar cmf-console-colors 16))
  (defvar cmf-console-colors nil)
  )

(cond ((equal cmf-console-colors 256)
       (setq custom-file "~/.emacs.d/custom-nox256.el"))
      ((equal cmf-console-colors 16)
       (setq custom-file "~/.emacs.d/custom-nox.el"))
      ((setq custom-file "~/.emacs.d/custom.el"))
      )

(load custom-file)

;; Fix for bug involving enriched text mode
(if (version< emacs-version "25.3")
    (eval-after-load "enriched"
      '(defun enriched-decode-display-prop (start end &optional param)
         (list start end))))

;; Programming styles
;; --------------------------------------------------------------------

;; Shipwire Coding Style
(c-add-style "psr2"
            '("psr2"
................................................................................
;; My own style
(c-add-style "cmf"
             '("bsd"
	       (indent-tabs-mode . nil)
               (c-offsets-alist
                (statement-cont . (first c-lineup-cascaded-calls +)))))


;; Functions
;; --------------------------------------------------------------------

;; Functions for perltidy
(defun cmf/perltidy-region ()
  "Run perltidy on the current region."
  (interactive)
................................................................................
;; Function for loading exec paths
(defun cmf/update-exec-path (pathlist)
  "Add given PATHLIST to 'exec-path'."
  (dolist (path pathlist)
    (add-to-list 'exec-path path)
    (setenv "PATH" (concat (getenv "PATH") ":" path)))
  )

;; Override stock use-fancy-splash-screens-p ()
(if (version< emacs-version "25.2.1")
    (defun use-fancy-splash-screens-p ()
      "Return t if fancy splash screens should be used."
      (when (and (display-graphic-p)
                 (or (and (display-color-p)
                          (image-type-available-p 'xpm))
                     (image-type-available-p 'pbm)))
        (let ((frame (fancy-splash-frame)))
          (when frame
            (let* ((img (create-image (fancy-splash-image-file)))
                   (image-height (and img (cdr (image-size img nil frame))))
                   ;; We test frame-height so that, if the frame is split
                   ;; by displaying a warning, that doesn't cause the normal
                   ;; splash screen to be used.
                   (frame-height (1- (frame-height frame))))
              ;; The original value added to the `image-height' for the
              ;; test was 19; however, that causes the test to fail on X11
              ;; by about 1.5 -- so use 17 instead.
              (> frame-height (+ image-height 17))))))
      ))


;; Defined modes
;; --------------------------------------------------------------------

(define-derived-mode nice-msg-mode
  text-mode "Nice"
................................................................................


;; Package configuration
;; --------------------------------------------------------------------

(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/"))
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/"))
(package-initialize)

;; Bootstrap 'use-package' if necessary
(unless (package-installed-p 'use-package)
................................................................................
  (require 'use-package))
(require 'diminish)
(require 'bind-key)

;; Packages loaded through external files
(require 'cmf-org-settings)

;;
;; Window-system Modes
;;

(unless (equal window-system nil)

  ;; Enable emojify
  (use-package emojify
    :ensure t

    :config
    (global-emojify-mode)
    )
  )

;;
;; OSX Modes (Mac OS X only)
;;

(when (eq system-type 'darwin)

  ;; osx-location
................................................................................
  )

;;
;; Generic Packages
;;
;; For use on all operating systems
;;

;; yasnippet
;;
;; Note this needs to be loaded first since we want to use the version
;; from melpa-stable
(use-package yasnippet
  :ensure t
  :pin melpa-stable

  :config
  ;; Inter-field navigation
  (defun yas/goto-end-of-active-field ()
    (interactive)
    (let* ((snippet (car (yas--snippets-at-point)))
           (position (yas--field-end (yas--snippet-active-field snippet))))
      (if (= (point) position)
          (move-end-of-line 1)
        (goto-char position))))

  (defun yas/goto-start-of-active-field ()
    (interactive)
    (let* ((snippet (car (yas--snippets-at-point)))
           (position (yas--field-start (yas--snippet-active-field snippet))))
      (if (= (point) position)
          (move-beginning-of-line 1)
        (goto-char position))))

  ;; fix some org-mode + yasnippet conflicts:
  (defun yas/org-very-safe-expand ()
    (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

  ;; Turn on snippets
  (yas-global-mode t)

  ;; Keybindings
  (define-key yas-keymap (kbd "<return>") 'yas-exit-all-snippets)
  (define-key yas-keymap (kbd "C-e") 'yas/goto-end-of-active-field)
  (define-key yas-keymap (kbd "C-a") 'yas/goto-start-of-active-field)

  ;; Update org-mode configuration
  (add-hook 'org-mode-hook
            (lambda ()
              (make-variable-buffer-local 'yas/trigger-key)
              (setq yas/trigger-key [tab])
              (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
              (define-key yas/keymap [tab] 'yas/next-field)))

  ;; Wrap around region
  (setq yas-wrap-around-region t)
  )

;; apache-mode
(use-package apache-mode
  :ensure t
  :defer t
  :no-require t
  :mode (("\\.htaccess\\'"                   . apache-mode)
................................................................................
  :config
  (add-hook 'c-mode-common-hook 'nice-prog-hook)
  (add-hook 'c-mode-common-hook
            (lambda ()
              (font-lock-add-keywords nil
                                      '(("\\<\\(FIXME\\|TODO\\|BUG\\|LATER\\):" 1 font-lock-warning-face t)))))
  )

;; calfw
(use-package calfw
  :ensure t
  :ensure calfw-org
  :pin melpa-stable

  :init
  (require 'calfw)
  (require 'calfw-org)
  )

;; [c]perl-mode
(use-package cperl-mode
  :config
  (add-hook 'cperl-mode-hook 'nice-prog-hook)
  (add-hook 'cperl-mode-hook
            (lambda ()
................................................................................
;; csv-nav-mode
(use-package csv-nav-mode
  :ensure csv-nav
  :defer t
  :mode ("\\.csv\\'" . csv-nav-mode)
  )











;; eldoc
(use-package eldoc
  :diminish eldoc-mode " Edoc"
  )

;; flycheck
(use-package flycheck
................................................................................
  )

;; ggtags
(use-package ggtags
  :ensure t
  :defer t
  :diminish ggtags-mode " G"
  )

;; gited - dired for git branches
(use-package gited
  :ensure t
  :defer t

  :bind (
         ("C-x C-g" . gited-list-branches)
         )

  )

;; go-mode
(use-package go-mode
  :no-require t

  :ensure go-mode
................................................................................
  )

;; jinja2-mode
(use-package jinja2-mode
  :ensure t
  :defer t
  :mode ("\\.j2\\'" . jinja2-mode)

  )

;; json-mode
(use-package json-mode
  :ensure t

  :config
................................................................................
              (font-lock-add-keywords nil
                                      '(("\\<\\(FIXME\\|TODO\\|BUG\\|LATER\\)" 1 font-lock-warning-face t)))))

  ;; Load phpdocumentor
  (load-file "~/.emacs.d/thirdparty/phpdocumentor.el")

  )

;; planet-theme
(if (not(equal window-system nil))
    (use-package planet-theme
      :ensure t

      :init
      (load-theme 'planet t)
      )
  )

;; pretty-lambdada
(if (version< emacs-version "24.4")
    (use-package pretty-lambdada
      :ensure t
      :defer t

................................................................................
  )

;; ruby-mode
(use-package ruby-mode
  :init
  (add-hook 'ruby-mode-hook 'nice-prog-hook)
  )

;; sed-mode
(use-package sed-mode
  :ensure t

  :mode (
         ("*.sed" . sed-mode)
         )

  :init
  (add-hook 'sed-mode-hook 'nice-prog-hook)

  )

;; smart-mode-line
(use-package smart-mode-line
  :ensure t

  :init
  (add-to-list 'custom-safe-themes
               "3c83b3676d796422704082049fc38b6966bcad960f896669dfc21a7a37a748fa")
  (add-to-list 'custom-safe-themes
               "a27c00821ccfd5a78b01e4f35dc056706dd9ede09a8b90c6955ae6a390eb1c1e")
  (sml/setup)

  :config
  (if (equal cmf-console-colors 16)
      (sml/apply-theme 'light)
    (sml/apply-theme 'dark)
    )
  )

;; sh-script
(use-package sh-script
  :config
  (add-hook 'sh-mode-hook 'nice-prog-hook)
  (add-hook 'sh-mode-hook
................................................................................
         )

  :init
  (add-hook 'text-mode-hook     'nice-text-hook)
  )

;; twilight-theme
(if (equal cmf-console-colors 256)
    (use-package twilight-theme
      :ensure t

      :init
      (load-theme 'twilight t)
      )
  )
................................................................................
(use-package yaml-mode
  :ensure t

  :mode ("\\.sls\\'" . yaml-mode)
  :config
  (add-hook 'yaml-mode-hook 'nice-prog-hook)
  )















































;; Miscellany
;; --------------------------------------------------------------------

;; Diminished functions
(diminish 'ivy-mode "")
(diminish 'yas-minor-mode " Y")

Changes to emacs.d/lisp/cmf-org-settings.el.

69
70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
...
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
...
136
137
138
139
140
141
142
143
144
145
146
147

148
149
150
151













































152
153
154

155

156
157
158
159
160
161


162

163
164
165
166
167
168
169
       (tags-todo "GGG"))
      ((org-agenda-tag-filter-preset
        (quote
         ("+GGG"))))))))
 '(org-agenda-files
   (quote
    ("~/org/tasks.org" "~/org/refile.org" "~/org/notes.org")))
 '(org-ascii-charset (quote utf-8))
 '(org-archive-location "~/org/archive/%s_archive::datetree/")

 '(org-capture-templates
   (quote
    (("t" "Task" entry
      (file+headline "~/org/refile.org" "New Tasks")
      "* TODO %^{Description}  %^G
  Added: %U
  Context: %a
................................................................................
      "* %^{Description}  %^G
  Added: %U
  Context: %a

  %?" :empty-lines 1)
     ("j" "Journal Entry" entry
      (file+datetree "~/org/journal.org")
      "** %^{Heading}
  Added: %U

  %?" :empty-lines 1)
     ("K" "Kawasaki Riding Log Entry" table-line
      (file+headline "~/org/journal.org" "Kawasaki Riding Log")
      " | %^u | %^{Miles} |")
     ("B" "Blood Pressure Log Entry" table-line
      (file+headline "~/org/journal.org" "Blood Pressure Log")
      "| %^u | %^{Systolic} | %^{Diastolic} |")
     ("E" "Household Expense" table-line
      (file+headline "~/org/journal.org" "Household Expenses")
      "| %^u | %^{Vendor} | %^{Description} | %^{Cost} |")
     ("P" "Project" entry
................................................................................
** Lead

** Stakeholders

** Tasks

  " :prepend t :empty-lines 1))))
 '(org-clock-persist 'history)
 '(org-clock-persist-file "~/.org-clock-save.el")
 '(org-complete-tags-always-offer-all-agenda-tags t)
 '(org-default-notes-file "~/org/notes.org")
 '(org-directory "~/org")

 '(org-export-latex-listings t)
 '(org-export-latex-packages-alist (quote (("" "listings") ("" "color"))))
 '(org-export-with-tags nil)
 '(org-fast-tag-selection-single-key t)













































 '(org-latex-pdf-process
   (quote
    ("pdflatex -interaction nonstopmode -output-directory %o %f" "bibtex %b" "pdflatex -interaction nonstopmode -output-directory %o %f" "pdflatex -interaction nonstopmode -output-directory %o %f")))

 '(org-log-done (quote note))

 '(org-log-refile (quote time))
 '(org-mobile-directory "~/Dropbox/MobileOrg")
 '(org-mobile-files
   (quote
    (org-agenda-files "~/org/notes.org" "~/org/journal.org" "~/org/incubate.org" "~/org/ideas.org")))
 '(org-log-note-clock-out t)


 '(org-refile-targets (quote ((org-agenda-files :maxlevel . 2) ("~/org/incubate.org" :maxlevel . 1) ("~/org/ideas.org" :maxlevel . 1))))

 '(org-refile-use-outline-path nil)
 '(org-src-fontify-natively t)
 '(org-stuck-projects
   (quote
    ("+LEVEL=2/-DONE"
     ("TODO" "NEXT" "STARTED" "WAITING")
     nil "")))







<

>







 







|



<
<
<







 







|




>




>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


<
>

>





|
>
>
|
>







69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
...
104
105
106
107
108
109
110
111
112
113
114



115
116
117
118
119
120
121
...
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
       (tags-todo "GGG"))
      ((org-agenda-tag-filter-preset
        (quote
         ("+GGG"))))))))
 '(org-agenda-files
   (quote
    ("~/org/tasks.org" "~/org/refile.org" "~/org/notes.org")))

 '(org-archive-location "~/org/archive/%s_archive::datetree/")
 '(org-ascii-charset (quote utf-8))
 '(org-capture-templates
   (quote
    (("t" "Task" entry
      (file+headline "~/org/refile.org" "New Tasks")
      "* TODO %^{Description}  %^G
  Added: %U
  Context: %a
................................................................................
      "* %^{Description}  %^G
  Added: %U
  Context: %a

  %?" :empty-lines 1)
     ("j" "Journal Entry" entry
      (file+datetree "~/org/journal.org")
      "** %^{Heading} %^G
  Added: %U

  %?" :empty-lines 1)



     ("B" "Blood Pressure Log Entry" table-line
      (file+headline "~/org/journal.org" "Blood Pressure Log")
      "| %^u | %^{Systolic} | %^{Diastolic} |")
     ("E" "Household Expense" table-line
      (file+headline "~/org/journal.org" "Household Expenses")
      "| %^u | %^{Vendor} | %^{Description} | %^{Cost} |")
     ("P" "Project" entry
................................................................................
** Lead

** Stakeholders

** Tasks

  " :prepend t :empty-lines 1))))
 '(org-clock-persist (quote history))
 '(org-clock-persist-file "~/.org-clock-save.el")
 '(org-complete-tags-always-offer-all-agenda-tags t)
 '(org-default-notes-file "~/org/notes.org")
 '(org-directory "~/org")
 '(org-export-backends (quote (ascii html icalendar latex md texinfo)))
 '(org-export-latex-listings t)
 '(org-export-latex-packages-alist (quote (("" "listings") ("" "color"))))
 '(org-export-with-tags nil)
 '(org-fast-tag-selection-single-key t)
 '(org-latex-classes
   (quote
    (("koma-article" "\\documentclass{scrartcl}"
      ("\\section{%s}" . "\\section*{%s}")
      ("\\subsection{%s}" . "\\subsection*{%s}")
      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
      ("\\paragraph{%s}" . "\\paragraph*{%s}")
      ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
     ("article" "\\documentclass[11pt]{article}"
      ("\\section{%s}" . "\\section*{%s}")
      ("\\subsection{%s}" . "\\subsection*{%s}")
      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
      ("\\paragraph{%s}" . "\\paragraph*{%s}")
      ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
     ("report" "\\documentclass[11pt]{report}"
      ("\\part{%s}" . "\\part*{%s}")
      ("\\chapter{%s}" . "\\chapter*{%s}")
      ("\\section{%s}" . "\\section*{%s}")
      ("\\subsection{%s}" . "\\subsection*{%s}")
      ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
     ("book" "\\documentclass[11pt]{book}"
      ("\\part{%s}" . "\\part*{%s}")
      ("\\chapter{%s}" . "\\chapter*{%s}")
      ("\\section{%s}" . "\\section*{%s}")
      ("\\subsection{%s}" . "\\subsection*{%s}")
      ("\\subsubsection{%s}" . "\\subsubsection*{%s}")))))
 '(org-latex-default-packages-alist
   (quote
    (("AUTO" "inputenc" t)
     ("T1" "fontenc" t)
     ("" "fixltx2e" nil)
     ("" "graphicx" t)
     ("" "longtable" nil)
     ("" "float" nil)
     ("" "wrapfig" nil)
     ("" "rotating" nil)
     ("normalem" "ulem" t)
     ("" "amsmath" t)
     ("" "textcomp" t)
     ("" "marvosym" t)
     ("" "wasysym" t)
     ("" "amssymb" t)
     ("" "hyperref" t)
     "\\tolerance=1000")))
 '(org-latex-packages-alist nil)
 '(org-latex-pdf-process
   (quote

    ("latexmk -pdflatex='lualatex -shell-excape -interaction nonstopmode' -pdf -f %f" "bibtex %b")))
 '(org-log-done (quote note))
 '(org-log-note-clock-out t)
 '(org-log-refile (quote time))
 '(org-mobile-directory "~/Dropbox/MobileOrg")
 '(org-mobile-files
   (quote
    (org-agenda-files "~/org/notes.org" "~/org/journal.org" "~/org/incubate.org" "~/org/ideas.org")))
 '(org-refile-targets
   (quote
    ((org-agenda-files :maxlevel . 2)
     ("~/org/incubate.org" :maxlevel . 1)
     ("~/org/ideas.org" :maxlevel . 1))))
 '(org-refile-use-outline-path nil)
 '(org-src-fontify-natively t)
 '(org-stuck-projects
   (quote
    ("+LEVEL=2/-DONE"
     ("TODO" "NEXT" "STARTED" "WAITING")
     nil "")))

Changes to emacs.d/snippets/org-mode/bp.

12
13
14
15
16
17
18
19
20
21
22
23
#+LATEX_HEADER: \hypersetup{urlcolor=blue}
#+LATEX_HEADER: \hypersetup{colorlinks,urlcolor=blue}
#+LATEX_HEADER: \usepackage[backend=bibtex]{biblatex}
#+LATEX_HEADER: \fancyhead[RE,LO]{\leftmark}
#+LATEX_HEADER: \fancyhead[LE,RO]{\thepage}

#+LATEX: \thispagestyle{empty}
[TABLE-OF-CONTENTS]

* Overview

  $0







<




12
13
14
15
16
17
18

19
20
21
22
#+LATEX_HEADER: \hypersetup{urlcolor=blue}
#+LATEX_HEADER: \hypersetup{colorlinks,urlcolor=blue}
#+LATEX_HEADER: \usepackage[backend=bibtex]{biblatex}
#+LATEX_HEADER: \fancyhead[RE,LO]{\leftmark}
#+LATEX_HEADER: \fancyhead[LE,RO]{\thepage}

#+LATEX: \thispagestyle{empty}


* Overview

  $0

Changes to global-excludes.

9
10
11
12
13
14
15

16
17
18
19
20
21
22
23
24
ac-comphist.dat
ac-dict/
auto-save-list
bookmarks
config/
docs/*.org
elpa/

eshell/
ext/
ido.last
org-clock-save.el
recentf
network-security.data/
tramp/
url/
xkcd/







>









9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
ac-comphist.dat
ac-dict/
auto-save-list
bookmarks
config/
docs/*.org
elpa/
emojis/
eshell/
ext/
ido.last
org-clock-save.el
recentf
network-security.data/
tramp/
url/
xkcd/

Changes to mk/documentation.mk.

58
59
60
61
62
63
64


65
66
67
68
69
70
71
	@rm ${RM_OPTS} *.log
	@rm ${RM_OPTS} *.bak
	@rm ${RM_OPTS} *-baseline
	@rm ${RM_OPTS} *-merge
	@rm ${RM_OPTS} *-original
	@rm ${RM_OPTS} *blx.bib
	@rm ${RM_OPTS} *run.xml


	@rm ${RM_OPTS} *~

# Check dblatex

${DBLATEX_BIN} :
	$(shell if type dblatex >/dev/null; then true ; else echo "This target requires dblatex"; false; fi)








>
>







58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
	@rm ${RM_OPTS} *.log
	@rm ${RM_OPTS} *.bak
	@rm ${RM_OPTS} *-baseline
	@rm ${RM_OPTS} *-merge
	@rm ${RM_OPTS} *-original
	@rm ${RM_OPTS} *blx.bib
	@rm ${RM_OPTS} *run.xml
	@rm -vf *.fdb_latexmk
	@rm -vf *.fls
	@rm ${RM_OPTS} *~

# Check dblatex

${DBLATEX_BIN} :
	$(shell if type dblatex >/dev/null; then true ; else echo "This target requires dblatex"; false; fi)