#+TITLE: Creation and conservation of computer files (C3F) #+AUTHOR: Grant Rettke #+EMAIL: gcr@wisdomandwonder.com #+DESCRIPTION: A literate programming style exposition of my Emacs configuration #+KEYWORDS: Literate Programming, Reproducible Research, Programming Language, Lisp, Elisp, IDE, Emacs, Babel, org-mode #+LANGUAGE: en * Audience [fn:14] Who should be reading this? Possibly… - Entire document: Software engineers who want to do the above [fn:15] - Decisions & Assembly: Existing Emacs users… daily usage and non-trivial customization An interest in using cask and org-mode literate programming are the only thing that would motivate anyone to read this really. This is an unfunished and experimental document. All successes with it may be attributed to all of the folks who provided these wonderful tools. All failures with it may be attributed to me. Why should they be reading this? #+BEGIN_QUOTE The expectations of life depend upon diligence; the mechanic that would perfect his work must first sharpen his tools. [fn:21] #+END_QUOTE * Cogito ergo sum [fn:5] What was I thinking? - creation :: "the act of producing or causing to exist" [fn:6] - conservation :: "prevention of injury, decay, waste, or loss" [fn:7] - computer files :: "a file maintained in computer-readable form" [fn:8] * Means [fn:9] How do most people do it? - COTS :: edit, VI, Emacs, IntelliJ Idea, Visual Studio [fn:10] - Bespoke :: custom software [fn:11] * Madness [fn:16] What about their raison detre? [fn:18] - Wonderful, wonderful stock tooling, 80% - Can tool-makers build it perfectly for us all? [fn:17] * Goal What is my measure of success? #+BEGIN_CENTER To provide an environment in which the creation and conservation of computer files may occur with ease #+END_CENTER * Decision #+BEGIN_QUOTE GNU Emacs is an extensible, customizable text editor [fn:19] #+END_QUOTE * Methodology [fn:12] How will I customize it? Agile [fn:13] - Product Backlog - Sprint Backlog - Review, Refine, and Reiterate - COTS libraries - Capture rationale and reasons along with things I did or didn't do and why - Includes links to everything Note: How you break up the initialization of a system like Emacs is mostly personal preference. Although org-mode (Babel) lets you tell a story, I was coming from a pretty structured config file to begin with. In the future, it might be interesting to look at this system from scratch in terms of doing literate programming. Fortunately, it provides that freedom out of the box. ** Medium How will explain what I did? - Audience-appropriate presentations - Reproducible research - Reusable data structures * Developmental Values ** Traits - ☑ Pleasing user experience - ☑ Pervasive orthogonality [fn:20] ** Coding - ☑ Completion - ☑ Debugging - ☑ Intellisense - ☑ Templates ** Editing - ☑ Auto-indenting - ☑ Binary file editing, hex editor - ☑ Code folding - ☑ Code formatting - ☑ Diff'ing - ☐ Heavily used languages: ☑ CSS, ☑ Elisp, ☑ HTML, ☑ Graphviz, ☑ JSON, ☑ JavaScript, ☑ Make, ☑ Markdown, ☐ R, ☑ Scheme, ☑ shell - ☑ Incremental selection - ☑ LaTeX - ☑ SEXP Support - ☑ Spell-checking - ☑ Structured navigation - ☑ Syntax highlighting - ☑ Tab management ** Development - ☑ Build tools: make - ☑ Copyright notice, analysis, and standards - ☑ Dependency management - ☑ Diagramming - ☑ UML - ☑ Version control: git, svn, bzr, cvs, rcs - ☑ Workflow * Operational Values ** Fonts - ☑ Focus on easily-screen-readable, mono-spaced - ☑ Research suggests that san-serif fonts are easier to read [fn:22] [fn:23] [fn:24] [fn:25] [fn:26] [fn:27] - ☑ Research suggests that color doesn't matter; only contrast [fn:28][fn:29] [fn:30] [fn:31] [fn:32] [fn:33] [fn:34] [fn:35] - ☑ Unicode support is critical ** Images - ☑ Ascii art ** Spreadsheet - ☑ Calculation - ☑ Data management - ☑ Import/Export ** Files - ☑ Auto-save & synchronize - ☑ Encryption - ☑ File-system/directory management - ☑ Project structure - ☑ Search everywhere ** Commands - ☑ Key recording - ☑ Macros - ☑ History of all things: files, commands, cursor locations - ☑ Undo ** Publishing - ☑ Code - ☑ Multiple formats: HTML, JS, PDF ** Terminal - ☑ Cross-platform shell - ☑ Games ** Remote file access and management - ☑ SSH - ☑ SCP * Decisions Given values and restrictions, review, identify, and evaluate available options. ** Font (Appearance) The studies cited above indicate that the two major factors that contribute to readabilty of a document are contrast and font-face. Sayre's law [fn:36] however demands that any number of other things are critical to how your IDE looks! That is OK. This section captures some of the basics to getting the system looking how I like it. This is a san-serif, portable, massively Unicode supported font. You may easily change the font size using =gcr/text-scale-increase= and =gcr/text-scale-decrease=; font information appears in the =*Message=* buffer and also the mini-buffer. The font size will be the same everywhere; as it is easier to work between graphic and console mode with that consistency. You may bypass that using the built in functions. The color theme seems to provide excellent contrast, though I can't decipher what the creator is actually saying about them. For a while I went between the light and dark solarized theme, and finaly accepted that I'm happy with light for documents and dark for programs. That is not scientific, and I'm OK with that. Fortunately you can theme per buffer. Unfortunately, it doesn't quite work perfectly. It wasn't a big deal until it broke org's export to HTML. Since I needed that especially for right now, I decided to stick with the dark theme, as it is more familiar. Sometimes you don't like how a characters looks, or don't have access to Unicode. In such cases, pretty-mode displays substitutions for certain occurences of flagged strings, for example replacing the world =lambda= with the symbol =λ=. #+NAME: font-decision #+BEGIN_SRC emacs-lisp (defconst gcr/font-base "DejaVu Sans Mono" "The preferred font name.") (defvar gcr/font-size 10 "The preferred font size.") (load-theme 'solarized-dark) (require 'pretty-mode) #+END_SRC ** UXO (Traits, user experience/orthogonality) *** Windows [fn:39] :PROPERTIES: :noweb-ref: uxo-windows-decision :END: Menu bars are not required. [fn:38] #+BEGIN_SRC emacs-lisp (menu-bar-mode 0) #+END_SRC Make it really obvious where the 80th column sits. [fn:40] #+BEGIN_SRC emacs-lisp (setq-default fill-column 80) #+END_SRC The cursor should not blink. [fn:41] #+BEGIN_SRC emacs-lisp (blink-cursor-mode 0) (when (display-graphic-p) (setq-default cursor-type 'box)) (setq x-stretch-cursor 1) #+END_SRC Show line numbers everywhere. [fn:42] #+BEGIN_SRC emacs-lisp (global-linum-mode 1) #+END_SRC Activate syntax highlighting everywhere. [fn:43] #+BEGIN_SRC emacs-lisp (global-font-lock-mode 1) #+END_SRC Visualize parentheses a certain way. [fn:45] #+BEGIN_SRC emacs-lisp (setq blink-matching-paren nil) (show-paren-mode t) (setq show-paren-delay 0) (setq show-paren-style 'expression) #+END_SRC Don't use audible bells, use visual bells. [fn:44] #+BEGIN_SRC emacs-lisp (setq ring-bell-function 'ignore) (setq visible-bell t) #+END_SRC *** Frames [fn:46] :PROPERTIES: :noweb-ref: uxo-frames-decision :END: Make the title frame something special. [fn:47] #+BEGIN_SRC emacs-lisp (setq frame-title-format '("the ultimate...")) #+END_SRC The scroll bars are actually quite nice. [fn:48] #+BEGIN_SRC emacs-lisp (scroll-bar-mode 1) #+END_SRC The tool bars are not very nice. [fn:49] #+BEGIN_SRC emacs-lisp (tool-bar-mode 0) #+END_SRC Browse URLs in a real browser; nothing against W3C. [fn:50] #+BEGIN_SRC emacs-lisp (setq browse-url-browser-function 'browse-url-generic) (setq browse-url-generic-program "chromium-browser") #+END_SRC Let the mousewheel move the cursor in a sane manner. [fn:51] #+BEGIN_SRC emacs-lisp (setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) (setq mouse-wheel-progressive-speed nil) #+END_SRC *** Buffers [fn:52] :PROPERTIES: :noweb-ref: uxo-buffers-decision :END: It is nice to have an indicator of the right column that indicates the maximum depth of the line. My favorite package is fill-column-indicator [fn:142]. Its use shows up in almost all of the modes. While working on this build though the export to HTML included junk characters, so I had to disable it, at least in Lispy modes. Keep open files open across sessions. [fn:53] #+BEGIN_SRC emacs-lisp (desktop-save-mode 1) (setq desktop-restore-eager 10) #+END_SRC Automatically save every buffer associated with a file. [fn:54] #+BEGIN_SRC emacs-lisp (require 'real-auto-save) #+END_SRC Make two buffers with the same file name open distinguishable. [fn:55] #+BEGIN_SRC emacs-lisp (require 'uniquify) (setq uniquify-buffer-name-style 'forward) #+END_SRC Support transparent AES encryption of buffers. [fn:56] See also for library paths [fn:60] #+BEGIN_SRC emacs-lisp (add-to-list 'load-path "/usr/share/emacs/site-lisp/ccrypt") (require 'ps-ccrypt "ps-ccrypt.el") #+END_SRC With modern VCS, backup files aren't required. [fn:57] #+BEGIN_SRC emacs-lisp (setq backup-inhibited 1) #+END_SRC The built in auto save isn't required either because of the above. [fn:58] #+BEGIN_SRC emacs-lisp (setq auto-save-default nil) #+END_SRC Ban whitespace at end of lines, globally. [fn:59] #+BEGIN_SRC emacs-lisp (add-hook 'write-file-hooks '(lambda () (gcr/delete-trailing-whitespace))) #+END_SRC The world is so rich with expressivity. Although Unicode may never capture all of the worlds symbols, it comes close. [fn:62] [fn:63] [fn:64] #+BEGIN_SRC emacs-lisp (prefer-coding-system 'utf-8) (when (display-graphic-p) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))) #+END_SRC Emacs has a powerful buffer tracking change system. Unfortunately, I don't understand any of it. Undo should "just work". #+BEGIN_SRC emacs-lisp (require 'undo-tree) (global-undo-tree-mode 1) (eval-after-load "diminish" '(progn (eval-after-load "undo-tree" '(diminish 'undo-tree-mode "↺")))) #+END_SRC *** Modeline [fn:72] :PROPERTIES: :noweb-ref: uxo-modeline-decision :END: The modlines is capable of so many things. Though I use it for few, I value it greatly. It is nice to see the column number, if you are counting columns (not calories). [fn:73] #+BEGIN_SRC emacs-lisp (column-number-mode 1) #+END_SRC It is a pain to look at the clock in the GUI bar. [fn:105] #+BEGIN_SRC emacs-lisp (display-time-mode 1) (setq display-time-format "%l:%M%p") #+END_SRC When you load modes, most of them show up in the minibuffer. After you read their name a few thousand times, you eventually quite forgetting that you loaded them and need a diminished reminder. [fn:74] #+BEGIN_SRC emacs-lisp (require 'diminish) #+END_SRC *** Mark and Region [fn:77] :PROPERTIES: :noweb-ref: uxo-mark-region-decision :END: When you start typing and text is selected, replace it with what you are typing, or pasting, or whatever. [fn:78] #+BEGIN_SRC emacs-lisp (delete-selection-mode 1) #+END_SRC *** Minibuffer [fn:75] :PROPERTIES: :noweb-ref: uxo-minibuffer-decision :END: You will want to configure this at some point. Make it easier to answer questions. #+BEGIN_SRC emacs-lisp (fset 'yes-or-no-p 'y-or-n-p) #+END_SRC It often displays so much information, even temporarily, that it is nice to give it some room to breath. [fn:76] #+BEGIN_SRC emacs-lisp (setq resize-mini-windows t) (setq max-mini-window-height 0.33) #+END_SRC ** Modes (functionality) The purpose of this section is to put some visiblity on the modes, how they are used, and where. *** Custom variables :PROPERTIES: :noweb-ref: custom-variables :END: #+BEGIN_SRC emacs-lisp (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. '(custom-safe-themes (quote ("fc5fcb6f1f1c1bc01305694c59a1a861b008c534cae8d0e48e4d5e81ad718bc6" default)))) (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. ) #+END_SRC *** Configuration :PROPERTIES: :noweb-ref: modes-config-decision :END: **** Intellisense (Auto Completion) [fn:65] Can you thrive and profit without auto-completion? Surely. The feature is kind of a comfort blanket for most of us; you will never fail to bild a system without it (unless you are using Java, then you need IntelliJ). Still it is quite nice to have popup documentation. #+BEGIN_SRC emacs-lisp (require 'fuzzy) (require 'auto-complete) (require 'auto-complete-config) (ac-config-default) (setq ac-auto-start nil) (ac-set-trigger-key "TAB") (eval-after-load "diminish" '(progn (eval-after-load "auto-complete" '(diminish 'auto-complete-mode "↝")))) #+END_SRC **** Whitespace management [fn:66] Do you need to see tabs and other control characters? Usually, yes. #+BEGIN_SRC emacs-lisp (require 'whitespace) (setq whitespace-style '(trailing lines tab-mark)) (setq whitespace-line-column 80) (global-whitespace-mode 1) (eval-after-load "diminish" '(progn (eval-after-load "whitespace" '(diminish 'global-whitespace-mode "ᗣ")) (eval-after-load "whitespace" '(diminish 'whitespace-mode "")))) #+END_SRC **** Color visualizing [fn:67] Nothing against the multitude of RGB hex value web finder web pages... it is just convenient to have it built right in. #+BEGIN_SRC emacs-lisp (require 'rainbow-mode) (eval-after-load "diminish" '(progn (eval-after-load "rainbow-mode" '(diminish 'rainbow-mode "ω")))) #+END_SRC **** Templating [fn:68] Code complating is nice to have; but the second you install it and learn how to use it, you will never find the need to again. Accept it and move on. #+BEGIN_SRC emacs-lisp (require 'yasnippet) (yas-load-directory (concat (cask-elpa-dir) "/yasnippet-20140306.5/snippets")) (eval-after-load "diminish" '(progn (eval-after-load "yasnippet" '(diminish 'yas-minor-mode "✂")))) (yas-global-mode 1) #+END_SRC **** Searching / Finding [fn:69] [fn:70] There are many ways to easily find what you need, for a command, for a file, and this mode seems to be a quite nice way. #+BEGIN_SRC emacs-lisp (require 'ido) (require 'flx-ido) (ido-mode 1) (ido-everywhere 1) (setq ido-create-new-buffer 'always) (flx-ido-mode 1) (setq ido-use-faces nil) #+END_SRC **** Project management [fn:71] Not everyone likes projects, but I do. There is no perfect middle ground though, that is until this library came along. It is such a joy to use. #+BEGIN_SRC emacs-lisp (projectile-global-mode 1) (eval-after-load "diminish" '(progn (eval-after-load "projectile" '(diminish 'projectile-mode "⌕")))) #+END_SRC **** Expression Management [fn:94] There are a lot of nice options [fn:95] [fn:96] [fn:97] [fn:98] [fn:99]. For the longest time, paredit was all that I used, but then I started using Emacs for everyone else besides Lisp and was kind of stymied not having great expression management tools. Smartparens seems to have emerged as king, so here it sits. While I was setting up the new config I set this up last... that was a major mistake. After using a good symbolic expression management tool, you quickly forget the nightmare of having to keep expressions balanced yourself. Sure we did fine with VI... but it is so nice to have the tool do it for you. Remember what Olin Shivers said? #+BEGIN_QUOTE I object to doing things that computers can do. #+END_QUOTE You get a lot of niceties that you would expect like balanced brackets and since there is a strict mode it acts just like Paredit. Additionally you may wrap selections with pairs, auto-escape strings that occur within other strings, and showing matching pairs (of any supported form). #+BEGIN_SRC emacs-lisp (require 'smartparens-config) (smartparens-global-strict-mode +1) (show-smartparens-global-mode +1) (eval-after-load "diminish" '(progn (eval-after-load "smartparens" '(diminish 'smartparens-mode "⚖")))) #+END_SRC **** Remote file access [fn:106] TRAMP stands for "Transparent Remote (file) Access, Multiple Protocol". It is really, really beautiful. #+BEGIN_SRC emacs-lisp (setq tramp-default-user "gcr") #+END_SRC **** Selection style [fn:107] IntelliJ Idea is yet again to blame for being awesome; even the author of this library suffers, or rather enjoys, this phenomenon. When you make a selection of text you typically want to do it in a smart way, selecting the first logical block, then expanding logically outwards, and so on. It could mean selecting a variable, then its definition statement, and then the entire code block for example. Before now I really never had many uses for the =C-u= universal argument functionality for method calls, but if you pass in a negative value before calling =er/expand-region= it will have the nice feature of reversing its incremental selection. #+BEGIN_SRC emacs-lisp (require 'expand-region) (global-set-key (kbd "C-=") 'er/expand-region) #+END_SRC **** File-system/directory management [fn:108] The last file or filesyste management tool that I used wast Norton Commander [fn:109] and then Midnight Commander [fn:110], but my usage was pretty basic. Beyond those basics, I can do even more, basic stuff, in =bash=. Lately I've wanted something a little more consistent, powerful, and memorable, and that led me here. Dired is a user-interface for working with your filesystem; you select files and directories and then choose what to do with them. The ability to customize what you see is included out of the box, and there are additional helper packages [fn:111], too. You can use the usual machinery to work with the files. Highlight a region and operation selections occur for all files in that region. Commands are sheduled, and then executed, upon your command. Files can be viewed in modify or read-only mode, too. There is an idea of =mark=ing files, which is to select them and perform operations on the marked files. There are helper methods for most things you can think if like directories or modified-files or whatever, meaning you can use regexen to mark whatever you like however you like. If that suits you, then don't be afraid of using the regular expression builder [fn:112] that is built into Emacs. Bulk marked file operations include additionally copying, deleting, creating hard links to, renaming, modifying the mode, owner, and group information, changing the timestamp, listing the marked files, compressing them, decrypting, verifying and signing, loading or byte compiling them (Lisp files). =g= updates the current buffer; =s= orders the listing by alpha or datetime. =find-name-dired= beings the results back into Dired, which is nifty. Wdired lets you modify files directly via the UI, which is interesting. Image-Dired lets you do just that. +=+ creates a new directory. =dired-copy-filename-as-kill= stores the list of files you have selected in the kill ring. =dired-compare-directories= lets you perform all sorts of directory comparisons, a handly tool that you need once in a while but definitely do need. #+BEGIN_SRC emacs-lisp (setq dired-listing-switches "-alh") (setq dired-recursive-deletes +1) (require 'dired-details+) (setq-default dired-details-hidden-string "") #+END_SRC **** Save history of all things [fn:115] [fn:113] [fn:114] It is nice to have commands and their history saved so that every time you get back to work, you can just re-run stuff as you need it. It isn't a radical feature, it is just part of a good user experience. #+BEGIN_SRC emacs-lisp (setq savehist-file "~/.emacs.d/savehist") (savehist-mode +1) (setq savehist-save-minibuffer-history +1) (setq savehist-additional-variables '(kill-ring search-ring regexp-search-ring)) #+END_SRC **** Code folding [fn:116] [fn:123] Code folding really isn't a hugely important function. You just use it once in a while and you notice it when you don't have it. For years I used this [fn:117] and it is fine, but I figured I ought to stick with a more feature rich option, just to give it a try. Here are some of the other options: [fn:118][fn:119][fn:120][fn:121]. If you know org-mode, then using that style of control makes it easier to use then the built in bindings. #+BEGIN_SRC emacs-lisp (setq hs-hide-comments-when-hiding-all +1) (setq hs-isearch-open t) (require 'hideshow-org) ; Displaying overlay content in echo area or tooltip (defun display-code-line-counts (ov) (when (eq 'code (overlay-get ov 'hs)) (overlay-put ov 'help-echo (buffer-substring (overlay-start ov) (overlay-end ov))))) (setq hs-set-up-overlay 'display-code-line-counts) ; How do I get it to expand upon a goto-line? (defadvice goto-line (after expand-after-goto-line activate compile) "hideshow-expand affected block when using goto-line in a collapsed buffer" (save-excursion (hs-show-block))) #+END_SRC **** Copyright [fn:124] Copyright management includes only two problems: keeping the near up to date and choosing the right one. The built in functions will insert a generic copyright and also update the year, and that is pretty nice. It would be nice to have something like this [fn:125] created, though. Even an OSS license chooser would be nice [fn:126], but I haven't found a nice option yet. **** Spellchecking [fn:127] There are two ways to spell-check: run-at-a-time or interactive. Both delegate the actual checking to aspell, ispell, and hunspell. Both styles are quite nice options, and flyspeel will even integrated with compilers to help report those kinds of errors to you, too, but my personal preference for now is run-at-a-time. The taxpayers didn't pay so much to make flyspell have to do all the hard work for me. aspell most UNI*, running =ispell= from Emacs just does the right thing. **** Binary file editing [fn:133] [fn:134] Long ago it was quite common to edit binary files if not for adding lots of cheats to games then to see CAFEBABE written in Java class files (if you can't enjoy either of those things then you are too serious). Hexl mode comes built into Emacs, and it is great to know that it is there. **** Games [fn:135] Sometimes you need a break, and you aren't a gamer any more, but that doesn't mean you can't have fun. =life= and =doctor= alone will give you something to ponder and practice not taking too seriously. **** LaTeX [fn:137] [fn:138] There is great support for LaTeX via AUCTeX and Ebib. For a while I used TeXWorks [fn:139] and I was and remain very happy with it. Two things drew me back to Emacs for doing TeX primarily org-mode support for Ebib for managing my citation database. There is nothing more to it than that. This secion is a bit bare at the moment, as I will be filling it up as I move back to doing my work here. Perhaps a bigger project is figuring out where XeTeX fits in my future. [fn:140] RefTeX looks too quite helpful [fn:145] especially considering how well it seems to integrate with org-mode. **** Command execution helper [fn:146] When I call commands, I usually end up running the same commands over and over. There are of course keybdings to deal with this, and also command history. What I really prefer though is just being able to type an abbreviation for the command to access it, like =org-html-export-to-html= for example. Smex makes it happen. #+BEGIN_SRC emacs-lisp (require 'smex) (smex-initialize) (global-set-key (kbd "M-x") 'smex) (global-set-key (kbd "M-X") 'smex-major-mode-commands) (global-set-key (kbd "C-c C-c M-x") 'execute-extended-command) #+END_SRC *** Application Modes [fn:122] [fn:79] :PROPERTIES: :noweb-ref: modes-application-decision :END: When I set about on this project, I had ideas about how this document would look. The decent ideas worked out well. The good ideas were bad, and the unexpected ideas were delightful. I had though that athis section would be very graphical, but the more I work on it, the simpler it seems to be when you split it up in the respective sections. Originally I had wanted to use org tables for nearly everything, but now I question that desire (thought it is a great feature). The mistake that I made was not new to me and is suffered by all macro writers... guessing the solution instead of waiting for experience and extracting it from there. As it turns out, I am human. **** Auto Modes [fn:80] #+BEGIN_SRC emacs-lisp (setq auto-mode-alist (append '(("\\.scm\\'" . scheme-mode) ("\\.rkt\\'" . scheme-mode) ("\\.ss\\'" . scheme-mode) ("\\.sls\\'" . scheme-mode) ("\\.sps\\'" . scheme-mode) ("\\.html\\'" . web-mode) ("\\.json\\'" . web-mode) ("\\.asc" . artist-mode) ("\\.art" . artist-mode) ("\\.asc" . artist-mode)) auto-mode-alist)) #+END_SRC **** All modes Anything that should always happen goes here. #+BEGIN_SRC emacs-lisp (add-hook 'before-save-hook 'whitespace-cleanup) #+END_SRC **** Text #+BEGIN_SRC emacs-lisp (defun gcr/text-mode-hook () (rainbow-mode) (turn-on-real-auto-save) (fci-mode) (gcr/untabify-buffer-hook)) (add-hook 'text-mode-hook 'gcr/text-mode-hook) #+END_SRC **** Org [fn:81] [fn:82] #+BEGIN_SRC emacs-lisp (require 'org) (defun gcr/org-mode-hook () (fci-mode) (gcr/untabify-buffer-hook)) (add-hook 'org-mode-hook 'gcr/org-mode-hook) (setq org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "WAITING" "REVIEW" "DONE"))) (org-babel-do-load-languages 'org-babel-load-languages '((css . t) (dot . t) (ditaa . t) (emacs-lisp . t) (js . t) (latex . t) (org . t) (plantuml . t) (R . t) (scheme . t) (sh . t))) (setq org-confirm-babel-evaluate nil) (setq org-startup-with-inline-images nil) (require 'htmlize) (setq org-completion-use-ido t) (setq org-footnote-auto-adjust t) (when (not (string-equal (org-version) "8.2.5h")) (display-warning 'org-mode (concat "Requirements not met. Expected 8.2.5h. Found " (org-version)) :emergency)) #+END_SRC **** Graphviz [fn:83] [fn:84] [fn:85] #+BEGIN_SRC emacs-lisp (let ((f (concat (cask-elpa-dir) "/graphviz-dot-mode-20120821.1441/graphviz-dot-mode.el"))) (if (file-exists-p f) (load-file f) (warn "Could not locate a lib file for Graphviz support: %s" f))) #+END_SRC **** Lispy #+BEGIN_SRC emacs-lisp (defconst lispy-modes '(emacs-lisp-mode-hook ielm-mode-hook lisp-interaction-mode-hook scheme-mode-hook geiser-repl-mode-hook)) (dolist (h lispy-modes) (add-hook h 'rainbow-mode)) (dolist (h lispy-modes) (when (not (member h '(ielm-mode-hook))) (add-hook h 'turn-on-pretty-mode) (add-hook h 'gcr/newline) (add-hook h 'turn-on-real-auto-save) (add-hook h 'gcr/untabify-buffer-hook) (add-hook h 'gcr/disable-tabs) ; Adds 3 characters to newlines in org-html-export-to-html ; (add-hook h 'fci-mode) (add-hook h 'hs-org/minor-mode +1))) #+END_SRC **** Emacs Lisp Make it obvious whether or not it is lexically scoped [fn:86] or not and don't show that message whenever you enter a scratch buffer [fn:87]. #+BEGIN_SRC emacs-lisp (defun gcr/elisp-eval-buffer () "Intelligently evaluate an Elisp buffer." (interactive) (gcr/save-all-file-buffers) (eval-buffer)) (defun gcr/elisp-mode-local-bindings () "Helpful behavior for Elisp buffers." (local-set-key (kbd "") 'gcr/elisp-eval-buffer) (local-set-key (kbd "") 'eval-print-last-sexp)) (require 'lexbind-mode) (defun gcr/elisp-mode-hook () (gcr/elisp-mode-local-bindings) (lexbind-mode) ;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Doc.html (turn-on-eldoc-mode)) (add-hook 'emacs-lisp-mode-hook 'gcr/elisp-mode-hook) ;; https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html (setq initial-scratch-message nil) #+END_SRC **** Scheme [fn:88] You should probably only use Geiser, forever. [fn:89] #+BEGIN_SRC emacs-lisp (require 'geiser) (setq geiser-active-implementations '(racket)) (defun gcr/scheme-eval-buffer () "Save and then evaluate the current Scheme buffer with Geiser." (interactive) (gcr/save-all-file-buffers) (geiser-mode-switch-to-repl-and-enter)) (defun gcr/scheme-mode-local-bindings () "Helpful behavior for Scheme buffers." (local-set-key (kbd "") 'gcr/scheme-eval-buffer)) (add-hook 'scheme-mode-hook 'gcr/scheme-mode-local-bindings) #+END_SRC **** Javascript [fn:90] [fn:91] #+BEGIN_SRC emacs-lisp (defun gcr/js-mode-hook () (local-set-key (kbd "RET") 'newline-and-indent) (setq js-indent-level 2) (turn-on-real-auto-save) (fci-mode) (gcr/untabify-buffer-hook)) (add-hook 'js-mode-hook 'gcr/js-mode-hook) ; ln -s ./javascript-mode ./js-mode (let ((f (concat (cask-elpa-dir) "/auto-complete-20140208.653/dict/js-mode"))) (if (file-exists-p f) (load-file f) (warn "Could not locate a lib file for auto-complete JavaScript support: %s" f))) #+END_SRC **** Web [fn:92] JSON support is included here, too. #+BEGIN_SRC emacs-lisp (require 'web-mode) (setq web-mode-engines-alist '(("ctemplate" . "\\.html$"))) (defun gcr/web-mode-hook () (whitespace-turn-off) (rainbow-turn-off) (local-set-key (kbd "RET") 'newline-and-indent) (setq web-mode-markup-indent-offset 2) (setq web-mode-css-indent-offset 2) (setq web-mode-code-indent-offset 2) (setq web-mode-indent-style 2) (setq web-mode-style-padding 1) (setq web-mode-script-padding 1) (setq web-mode-block-padding 0) (gcr/untabify-buffer-hook)) (add-hook 'web-mode-hook 'gcr/web-mode-hook) #+END_SRC **** CSS #+BEGIN_SRC emacs-lisp (defun gcr/css-modehook () (fci-mode +1) (whitespace-turn-on) (rainbow-turn-on) (gcr/untabify-buffer-hook) (local-set-key (kbd "RET") 'newline-and-indent)) (add-hook 'css-mode-hook 'gcr/css-modehook) #+END_SRC **** Make #+BEGIN_SRC emacs-lisp (defun gcr/make-modehook () (fci-mode +1) (whitespace-turn-on) (rainbow-turn-on) (local-set-key (kbd "RET") 'newline-and-indent) ()) (add-hook 'makefile-mode-hook 'gcr/make-modehook) #+END_SRC **** Markdown [fn:141] Since org-mode exports to just about everything; my Markdown usage will be mostly limited to working with files on Github. #+BEGIN_SRC emacs-lisp (autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t) (add-to-list 'auto-mode-alist '("README\\.md\\'" . gfm-mode)) #+END_SRC *** Diagramming, UML creation, Workflow How you perform these taks is entirely up to you. There are a lot of good options both inside and outside of Emacs. For the general cases, I like the ones that are built in and play nice, especially with org-mode. At its simplest, artist-mode [fn:128] is plenty fine for diagramming and stuff. Graphviz also works well [fn:129]. Ditaa is sort of the next level up [fn:130], and finally PlantUML [fn:131]. They are all good options at different times, and they all work with org-mode. Everything I will publish will go through org-mode. org-modes just shines so, so brightly. As of writing, I'm undecided onw how best to standarding on a solution in this area. The good thing is that each tool is a good fit depending upon what you want to accomplish: - artist-mode: Anything in ultra portable text, asii or utf-8, just works. - Graphviz: Graphicaly and lays things out automatically. - Ditaa: Graphical but based on ascii diagrams. - PlantUML: Includes full breadth of UML options, everything: sequence, use case, class, activity, component, state, and object. ditaa was my first pick for usage for the blaring simplicity and power of it. org-mode provides a setup [fn:132]document that I followed. It required installing a JRE and that was about it. artist-mode is automatically loaded for the source block. The example below [fn:136] is much better than my hello world business. #+BEGIN_SRC ditaa :file ditaa-simple.png +------+ +-----+ +-----+ +-----+ |{io} | |{d} | |{s} | |cBLU | | Foo +---+ Bar +---+ Baz +---+ Moo | | | | | | | | | +------+ +-----+ +--+--+ +-----+ | /-----\ | +------+ | | | | c1AB | | Goo +------+---=--+ Shoo | \-----/ | | +------+ #+END_SRC **** Setup :PROPERTIES: :noweb-ref: diagramming-decision :END: #+BEGIN_SRC emacs-lisp (setq org-ditaa-jar-path "~/java/jar/ditaa0_9.jar") #+END_SRC ** Operation (Keybindings/Keymaps) [fn:93] :PROPERTIES: :noweb-ref: keymaps-decision :END: These keybindings are custom for me and I've been using them for so long, and that makes it right. #+BEGIN_SRC emacs-lisp (global-set-key (kbd "C-t") 'gcr/previous-window) (global-set-key (kbd "C-S-t") 'gcr/next-window) (global-set-key (kbd "C-c /") 'ac-complete-filename) (global-set-key (kbd "") 'yas/expand) (global-set-key (kbd "") 'kmacro-start-macro) (global-set-key (kbd "") 'kmacro-end-macro) (global-set-key (kbd "") 'kmacro-end-and-call-macro) ; F4 is free ; Keep F5 free per mode ; Keep F6 free per mode ; Keep F7 free per mode ; F8 is free ; F9 is free ; F10 is free (global-set-key (kbd "") 'gcr/insert-timestamp) (global-set-key (kbd "") 'gcr/comment-or-uncomment) (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) #+END_SRC ** Shells [fn:100] [fn:101] [fn:102] If you've never learned bash or korn or c-shell, then you are missing out on having some good fun… I mean work, getting work done. That said, I'm a baby when it comes to really using them. It seemed like a good idea to learn some of them well, and one that works seamnlessly with Emacs seems like a great idea. Since it is just another Elisp program, it has access to the same scope as everything else running inside Emacs. The resources on this tool are a bit varied and all valuable so I included all of them. The big takeaway is that you've got a "normal" looking shell interface whose commands work transparently with Elisp commands… and that can bey very pleasant. Command completion is available. Commands input in eshell are delegated in order to an alias, a built in command, an Elisp function with the same name, and finally to a system call. Semicolons deparate commands. =which= tells you what implementation will satisfy the call that you are going to make. The flag =eshell-prefer-lisp-functions= does what it says. =$$+ is the result of the last command. Aliases live in =eshell-aliases-file=. History is maintained and expandable. =eshell-source-file= will run scripts. Since Eshell is not a terminal emulator, you need to tell it about any commands that need to run using a terminal emulator, like anything using curses by adding it to to =eshell-visual-commands=. *** Control Files #+BEGIN_SRC sh :tangle eshell/alias :noweb tangle alias clear recenter 0 alias d 'dired $1' alias g git $* alias gb git branch $* alias gco git checkout $* alias gpom git push origin master alias gst git status alias la ls -lha $* alias ll ls -lh $* alias s ssh $* alias top proced #+END_SRC *** Config [fn:103] [fn:104]org- :PROPERTIES: :noweb-ref: shells-decision :END: #+BEGIN_SRC emacs-lisp (setq eshell-prefer-lisp-functions nil eshell-cmpl-cycle-completions nil eshell-save-history-on-exit t eshell-cmpl-dir-ignore "\\`\\(\\.\\.?\\|CVS\\|\\.svn\\|\\.git\\)/\\'") (eval-after-load 'esh-opt '(progn (require 'em-cmpl) (require 'em-prompt) (require 'em-term) (setenv "PAGER" "cat") (add-hook 'eshell-mode-hook '(lambda () (message "Entering Eshell…"))) (add-to-list 'eshell-visual-commands "ssh") (add-to-list 'eshell-visual-commands "tail") (add-to-list 'eshell-command-completions-alist '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'")))) (setq eshell-prompt-function (lambda nil (concat "[" (user-login-name) "@" (getenv "HOSTNAME") ":" (eshell/pwd) "]$ "))) #+END_SRC * Assembly ** Prerequisites *** Runtime :PROPERTIES: :noweb-ref: runtime-check :END: The entirety of this system is configured for a particular version of Emacs running on Linux and it is not worth fooling around if we aren't running there. It is important enough to at least check and notify the user if those requirements are not met, but not serious enough to kill the editor, and the user ought to have a chance at knowing what is going on. #+BEGIN_SRC emacs-lisp (when (or (not (= emacs-major-version 24)) (not (= emacs-minor-version 3)) (not (string-equal system-type "gnu/linux"))) (display-warning 'platform (concat "Requirements not met. Expected v24.3 on Linux. Found v" (number-to-string emacs-major-version) "." (number-to-string emacs-minor-version) " on " (symbol-name system-type)) :emergency)) #+END_SRC *** Cask [fn:37] Install required packages first using Cask [fn:61]. #+BEGIN_SRC emacs-lisp :tangle Cask ;-*-Emacs-Lisp-*- (source gnu) (depends-on "rainbow-mode") (source marmalade) (depends-on "real-auto-save") (source melpa) (depends-on "color-theme-solarized") (depends-on "fill-column-indicator") (depends-on "fuzzy") (depends-on "auto-complete") (depends-on "yasnippet") (depends-on "diminish") (depends-on "flx-ido") (depends-on "projectile") (depends-on "geiser") (depends-on "smartparens") (depends-on "undo-tree") (depends-on "htmlize") (depends-on "pretty-mode") (depends-on "lexbind-mode") (depends-on "web-mode") (depends-on "expand-region") (depends-on "dired-details+") (depends-on "hideshow-org") (depends-on "markdown-mode") (depends-on "smex") (source org) (depends-on "org-plus-contrib") #+END_SRC Tell Emacs how to use Cask. #+NAME: cask-block #+BEGIN_SRC emacs-lisp (require 'cask "~/.cask/cask.el") (cask-initialize) #+END_SRC ** Layout Convert decisions into a runnable system. #+BEGIN_SRC emacs-lisp :tangle .emacs.el :noweb tangle <> <> <> <> <> <> (when (display-graphic-p) <>) <> <> <> <> <> <> <> <> <> #+END_SRC ** Font block #+NAME: font-block #+BEGIN_SRC emacs-lisp (when (display-graphic-p) <> (defun gcr/font-ok-p () "Is the configured font valid?" (interactive) (member gcr/font-base (font-family-list))) (defun gcr/font-name () "Compute the font name and size string." (interactive) (let* ((size (number-to-string gcr/font-size)) (name (concat gcr/font-base "-" size))) name)) (defun gcr/update-font () "Updates the current font given configuration values." (interactive) (if (gcr/font-ok-p) (progn (message "Setting font to: %s" (gcr/font-name)) (set-default-font (gcr/font-name))) (message (concat "Your preferred font is not available: " gcr/font-base)))) (defun gcr/text-scale-increase () "Increase font size" (interactive) (setq gcr/font-size (+ gcr/font-size 1)) (gcr/update-font)) (defun gcr/text-scale-decrease () "Reduce font size." (interactive) (when (> gcr/font-size 1) (setq gcr/font-size (- gcr/font-size 1)) (gcr/update-font))) (global-set-key (kbd "C-M-;") 'gcr/text-scale-increase) (global-set-key (kbd "C-M-j") 'gcr/text-scale-decrease) (global-set-key (kbd "C-M-'") 'gcr/text-scale-increase) (global-set-key (kbd "C-M-;") 'gcr/text-scale-decrease) (gcr/update-font)) #+END_SRC ** Utility fuctions #+NAME: utility-block #+BEGIN_SRC emacs-lisp (defun gcr/previous-window () "Move focus to the previous window." (interactive) (other-window 1)) (defun gcr/next-window () "Move focus to the next window." (interactive) (other-window -1)) (defun gcr/insert-timestamp () "Produces and inserts a full ISO 8601 format timestamp." (interactive) (insert (format-time-string "%Y-%m-%dT%T%z"))) (defun gcr/comment-or-uncomment () "Comment or uncomment the current line or selection." (interactive) (cond ((not mark-active) (comment-or-uncomment-region (line-beginning-position) (line-end-position))) ((< (point) (mark)) (comment-or-uncomment-region (point) (mark))) (t (comment-or-uncomment-region (mark) (point))))) (defun gcr/no-control-m () "Aka dos2unix." (interactive) (let ((line (line-number-at-pos)) (column (current-column))) (mark-whole-buffer) (replace-string " " "") (goto-line line) (move-to-column column))) (defun gcr/untabify-buffer () "For untabifying the entire buffer." (interactive) (untabify (point-min) (point-max))) (defun gcr/untabify-buffer-hook () "Adds a buffer-local untabify on save hook" (interactive) (add-hook 'after-save-hook (lambda () (gcr/untabify-buffer)) nil 'true)) (defun gcr/disable-tabs () "Disables tabs." (setq indent-tabs-mode nil)) (defun gcr/save-all-file-buffers () "Saves every buffer associated with a file." (interactive) (dolist (buf (buffer-list)) (with-current-buffer buf (when (and (buffer-file-name) (buffer-modified-p)) (save-buffer))))) (defun gcr/delete-trailing-whitespace () "Apply delete-trailing-whitespace to everything but the current line." (interactive) (let ((first-part-start (point-min)) (first-part-end (point-at-bol)) (second-part-start (point-at-eol)) (second-part-end (point-max))) (delete-trailing-whitespace first-part-start first-part-end) (delete-trailing-whitespace second-part-start second-part-end))) (defun gcr/newline () "Locally binds newline." (local-set-key (kbd "RET") 'sp-newline)) #+END_SRC * How it works This is a very simple program. Loading up C3F.org into a modern version of Emacs running a modern version of org-mode and running =org-babel-tangle= will output the Cask and .emacs.el files. You will link them as you see fit. The assembly section is the only aspect of the document where sequencing matters, everything else is composed and constructed independently where it should all "just work". * Must Reads [fn:143] [fn:144] * La trahison des images [fn:1] Where else has this acronym shown up? - #cc33ff :: bright purple color [fn:2] - Commander, U.S. Third Fleet :: WWII navy [fn:3] - A spasmogenic fragment :: a peptide [fn:4] * Observations - This config was developed organically quite differently from the original idea - Literate programming allowed an insanely flexible and freeing experience - This one short experience for me made a powerful, positive impression on me * Footnotes :PROPERTIES: :ID: 50960f1d-c682-48e7-a459-2c967da894d8 :END: [fn:1] https://en.wikipedia.org/wiki/The_Treachery_of_Images [fn:2] http://www.color-hex.com/color/cc33ff [fn:3] https://secure.flickr.com/people/c3f/ [fn:4] http://books.google.com/books?id=L4CI-qkhuQ8C [fn:5] https://en.wikipedia.org/wiki/Cogito_ergo_sum [fn:6] http://dictionary.reference.com/browse/creation [fn:7] http://dictionary.reference.com/browse/Conservation [fn:8] http://dictionary.reference.com/browse/computer%20file [fn:9] http://dictionary.reference.com/cite.html?qh=tools&ia=luna [fn:10] https://en.wikipedia.org/wiki/Commercial_off-the-shelf [fn:11] https://en.wikipedia.org/wiki/Custom_software [fn:12] http://dictionary.reference.com/cite.html?qh=method&ia=luna [fn:13] https://en.wikipedia.org/wiki/Agile_software_development [fn:14] http://dictionary.reference.com/cite.html?qh=audience&ia=luna [fn:15] https://en.wikipedia.org/wiki/Software_engineer [fn:16] http://dictionary.reference.com/browse/madness [fn:17] http://www.wisdomandwonder.com/article/509/lambda-the-ultimate-goto [fn:18] http://dictionary.reference.com/cite.html?qh=raison%20detre&ia=luna [fn:19] https://www.gnu.org/software/emacs/ [fn:20] http://dictionary.reference.com/browse/orthogonal [fn:21] http://www.brainyquote.com/quotes/quotes/c/confucius141110.html [fn:22] http://thenextweb.com/dd/2011/03/02/whats-the-most-readable-font-for-the-screen/#!uCcs8 [fn:23] http://www.webpagecontent.com/arc_archive/182/5/ [fn:24] http://www.awaionline.com/2011/10/the-best-fonts-to-use-in-print-online-and-email/ [fn:25] https://tex.stackexchange.com/questions/20149/which-font-is-the-most-comfortable-for-on-screen-viewing [fn:26] http://river-valley.tv/minion-math-a-new-math-font-family/ [fn:27] http://edutechwiki.unige.ch/en/Font_readability [fn:28] http://usabilitynews.org/the-effect-of-typeface-on-the-perception-of-email/ [fn:29] http://usabilitynews.org/know-your-typefaces-semantic-differential-presentation-of-40-onscreen-typefaces/ [fn:30] http://typoface.blogspot.com/2009/08/academic-base.html [fn:31] http://liinwww.ira.uka.de/bibliography/Typesetting/reading.html [fn:32] http://www.kathymarks.com/archives/2006/11/best_fonts_for_the_web_1.html [fn:33] http://psychology.wichita.edu/surl/usabilitynews/52/uk_font.htm [fn:34] http://usabilitynews.org/a-comparison-of-popular-online-fonts-which-size-and-type-is-best/ [fn:35] http://usabilitynews.org/a-comparison-of-popular-online-fonts-which-is-best-and-when/ [fn:36] https://en.wikipedia.org/wiki/Sayre's_law [fn:37] [[Cask][https://github.com/cask/cask]] [fn:38] https://www.gnu.org/software/emacs/manual/html_node/emacs/Menu-Bars.html [fn:39] https://www.gnu.org/software/emacs/manual/html_node/emacs/Windows.html [fn:40] http://melpa.milkbox.net/#/fill-column-indicator [fn:41] https://www.gnu.org/software/emacs/manual/html_node/emacs/Cursor-Display.html [fn:42] http://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/linum.el?h=emacs-24 [fn:43] https://www.gnu.org/software/emacs/manual/html_node/emacs/Font-Lock.html [fn:44] https://www.gnu.org/software/emacs/manual/html_node/elisp/Beeping.html [fn:45] https://www.gnu.org/software/emacs/manual/html_node/emacs/Matching.html [fn:46] https://www.gnu.org/software/emacs/manual/html_node/emacs/Frames.html [fn:47] https://www.gnu.org/software/emacs/manual/html_node/elisp/Display-Feature-Testing.html [fn:48] https://www.gnu.org/software/emacs/manual/html_node/emacs/Scroll-Bars.html [fn:49] https://www.gnu.org/software/emacs/manual/html_node/emacs/Tool-Bars.html [fn:50] https://www.gnu.org/software/emacs/manual/html_node/emacs/Browse_002dURL.html [fn:51] https://www.gnu.org/software/emacs/manual/html_node/emacs/Mouse-Commands.html [fn:52] https://www.gnu.org/software/emacs/manual/html_node/emacs/Buffers.html#Buffers [fn:53] https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html#Saving-Emacs-Sessions [fn:54] http://marmalade-repo.org/packages/real-auto-save [fn:55] https://www.gnu.org/software/emacs/manual/html_node/emacs/Uniquify.html [fn:56] http://ccrypt.sourceforge.net/#emacs [fn:57] https://www.gnu.org/software/emacs/manual/html_node/elisp/Making-Backups.html [fn:58] https://www.gnu.org/software/emacs/manual/html_node/emacs/Auto-Save-Control.html [fn:59] https://www.gnu.org/software/emacs/manual/html_node/emacs/Useless-Whitespace.html [fn:60] https://www.gnu.org/software/emacs/manual/html_node/emacs/Lisp-Libraries.html [fn:61] https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html [fn:62] https://www.gnu.org/software/emacs/manual/html_node/emacs/International.html#International [fn:63] https://www.gnu.org/software/emacs/manual/html_node/emacs/Recognize-Coding.html [fn:64] https://www.gnu.org/software/emacs/manual/html_node/emacs/Output-Coding.html [fn:65] http://cx4a.org/software/auto-complete/ [fn:66] https://www.gnu.org/software/emacs/manual/html_node/emacs/Useless-Whitespace.html [fn:67] http://elpa.gnu.org/packages/rainbow-mode.html [fn:68] https://github.com/capitaomorte/yasnippet [fn:69] http://repo.or.cz/w/emacs.git/blob_plain/HEAD:/lisp/ido.el [fn:70] https://github.com/lewang/flx [fn:71] http://batsov.com/projectile/ [fn:72] https://www.gnu.org/software/emacs/manual/html_node/elisp/Mode-Line-Format.html [fn:73] https://www.gnu.org/software/emacs/manual/html_node/emacs/Optional-Mode-Line.html [fn:74] http://marmalade-repo.org/packages/diminish [fn:75] https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer.html [fn:76] https://www.gnu.org/software/emacs/manual/html_node/emacs/Minibuffer-Edit.html [fn:77] https://www.gnu.org/software/emacs/manual/html_node/emacs/Mark.html#Mark [fn:78] https://www.gnu.org/software/emacs/manual/html_node/emacs/Using-Region.html [fn:79] https://www.gnu.org/software/emacs/manual/html_node/emacs/Modes.html#Modes [fn:80] https://www.gnu.org/software/emacs/manual/html_node/elisp/Auto-Major-Mode.html [fn:81] http://orgmode.org/ [fn:82] http://orgmode.org/worg/org-contrib/babel/ [fn:83] http://www.graphviz.org/ [fn:84] http://marmalade-repo.org/packages/graphviz-dot-mode [fn:85] http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-dot.html [fn:86] http://marmalade-repo.org/packages/lexbind-mode [fn:87] https://www.gnu.org/software/emacs/manual/html_node/elisp/Startup-Summary.html [fn:88] http://library.readscheme.org/index.html [fn:89] http://www.nongnu.org/geiser/ [fn:90] https://en.wikipedia.org/wiki/ECMAScript [fn:91] http://www.emacswiki.org/emacs/JavaScriptMode [fn:92] https://en.wikipedia.org/wiki/HTML [fn:93] https://www.gnu.org/software/emacs/manual/html_node/elisp/Keymaps.html#Keymaps [fn:94] https://github.com/Fuco1/smartparens [fn:95] http://www.emacswiki.org/emacs/ParEdit [fn:96] http://www.emacswiki.org/emacs/ElectricPair [fn:97] https://github.com/rejeep/wrap-region.el [fn:98] https://code.google.com/p/emacs-textmate/ [fn:99] https://github.com/capitaomorte/autopair [fn:100] https://www.gnu.org/software/emacs/manual/html_mono/eshell.html [fn:101] http://www.masteringemacs.org/articles/2010/12/13/complete-guide-mastering-eshell/ [fn:102] http://www.khngai.com/emacs/eshell.php [fn:103] http://eschulte.github.io/emacs-starter-kit/starter-kit-eshell.html [fn:104] https://github.com/bbatsov/emacs-dev-kit/blob/master/eshell-config.el [fn:105] https://www.gnu.org/software/emacs/manual/html_node/emacs/Optional-Mode-Line.html [fn:106] https://www.gnu.org/software/tramp/ [fn:107] https://github.com/magnars/expand-region.el [fn:108] https://www.gnu.org/software/emacs/manual/html_node/emacs/Dired.html [fn:109] https://en.wikipedia.org/wiki/Norton_Commander [fn:110] https://www.midnight-commander.org/ [fn:111] http://www.emacswiki.org/DiredDetails [fn:112] https://www.gnu.org/software/emacs/manual/html_node/elisp/Regular-Expressions.html [fn:113] http://fly.srk.fer.hr/~hniksic/emacs/savehist.el [fn:114] https://stackoverflow.com/questions/1229142/how-can-i-save-my-mini-buffer-history-in-emacs [fn:115] https://www.gnu.org/software/emacs/manual/html_node/emacs/Saving-Emacs-Sessions.html [fn:116] http://www.emacswiki.org/emacs/HideShow [fn:117] http://emacs.wordpress.com/2007/01/16/quick-and-dirty-code-folding/ [fn:118] http://www.emacswiki.org/emacs/OutlineMode [fn:119] http://www.emacswiki.org/emacs/FoldingMode [fn:120] https://github.com/zenozeng/yafolding.el [fn:121] http://cedet.sourceforge.net/ [fn:122] https://www.gnu.org/software/emacs/manual/html_node/emacs/Hideshow.html [fn:123] http://gnufool.blogspot.com/2009/03/make-hideshow-behave-more-like-org-mode.html [fn:124] https://www.gnu.org/software/emacs/manual/html_mono/autotype.html#Copyrights [fn:125] https://www.gnu.org/software/emacs/manual/html_node/elisp/Library-Headers.html [fn:126] http://choosealicense.com/ [fn:127] https://www.gnu.org/software/emacs/manual/html_node/emacs/Spelling.html [fn:128] http://www.emacswiki.org/emacs/ArtistMode [fn:129] http://www.graphviz.org/ [fn:130] http://ditaa.sourceforge.net/ [fn:131] http://plantuml.sourceforge.net/ [fn:132] http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ditaa.html [fn:133] https://www.gnu.org/software/emacs/manual/html_node/emacs/Editing-Binary-Files.html [fn:134] http://www.emacswiki.org/emacs/HexlMode [fn:135] https://www.gnu.org/software/emacs/manual/html_node/emacs/Amusements.html#Amusements [fn:136] http://home.fnal.gov/~neilsen/notebook/orgExamples/org-examples.html [fn:137] https://www.gnu.org/software/auctex/ [fn:138] http://ebib.sourceforge.net/ [fn:139] https://www.tug.org/texworks/ [fn:140] http://xetex.sourceforge.net/ [fn:141] http://jblevins.org/projects/markdown-mode/ [fn:142] https://github.com/alpaker/Fill-Column-Indicator [fn:143] http://orgmode.org/worg/org-faq.html [fn:144] http://doc.norang.ca/org-mode.html [fn:145] https://www.gnu.org/software/auctex/reftex.html [fn:146] https://github.com/nonsequitur/smex/