<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>urn:whattheemacsd-com:feed</id>
  <updated>2013-05-22T16:12:44+02:00</updated>
  <title type="text">What the .emacs.d!?</title>
  <link href="http://whattheemacsd.com/atom.xml" rel="self"/>
  <entry>
    <title>appearance.el-01</title>
    <updated>2013-05-22T16:12:44+02:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//appearance.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:appearance.el-01</id>
    <content type="html">&lt;!-- 1369231964 --&gt;

&lt;p&gt;
  I already covered the awesomely
  commented &lt;a href="http://whattheemacsd.com/init.el-04.html"&gt;diminish.el&lt;/a&gt;.
  Here's another trick to reduce the cruft in your modeline:
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defmacro&lt;/span&gt; &lt;span class="function-name"&gt;rename-modeline&lt;/span&gt; (package-name mode new-name)
  `(&lt;span class="keyword"&gt;eval-after-load&lt;/span&gt; ,package-name
     '(&lt;span class="keyword"&gt;defadvice&lt;/span&gt; ,mode (after rename-modeline activate)
        (setq mode-name ,new-name))))

(rename-modeline &lt;span class="string"&gt;"js2-mode"&lt;/span&gt; js2-mode &lt;span class="string"&gt;"JS2"&lt;/span&gt;)
(rename-modeline &lt;span class="string"&gt;"clojure-mode"&lt;/span&gt; clojure-mode &lt;span class="string"&gt;"Clj"&lt;/span&gt;)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;With this, I reduce the &lt;code&gt;js2-mode&lt;/code&gt; modeline lighter from "JavaScript IDE" to just "JS2".&lt;/p&gt;

&lt;p&gt;
  I stole it from &lt;a href="https://github.com/bodil/emacs.d"&gt;Bodil's
    .emacs.d&lt;/a&gt; and macroified it a little.

  The first argument is the package name, the second is the mode in
  question, and the third is the new lighter for the mode.
&lt;/p&gt;



</content>
  </entry>
  <entry>
    <title>my-misc.el-02</title>
    <updated>2013-04-21T02:04:27+02:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//my-misc.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:my-misc.el-02</id>
    <content type="html">&lt;!-- 1366502667 --&gt;

&lt;p&gt;
  Undo in region is one of those mind-blowing things about emacs.
  However, the region keeps jumping about when I use it. So I added this:
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Keep region when undoing in region
&lt;/span&gt;(&lt;span class="keyword"&gt;defadvice&lt;/span&gt; &lt;span class="function-name"&gt;undo-tree-undo&lt;/span&gt; (around keep-region activate)
  (&lt;span class="keyword"&gt;if&lt;/span&gt; (use-region-p)
      (&lt;span class="keyword"&gt;let&lt;/span&gt; ((m (set-marker (make-marker) (mark)))
            (p (set-marker (make-marker) (point))))
        ad-do-it
        (goto-char p)
        (set-mark m)
        (set-marker p nil)
        (set-marker m nil))
    ad-do-it))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;Now the region stays in place while I'm undoing.&lt;/p&gt;

&lt;p&gt;
  Since I use undo-tree, that's what it advises, but I would guess it
  works the same for regular old undo too.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>project-defuns.el-01</title>
    <updated>2013-04-19T12:03:27+02:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//project-defuns.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:project-defuns.el-01</id>
    <content type="html">&lt;!-- 1366365807 --&gt;

&lt;p&gt;Where do you put your project specific settings?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defmacro&lt;/span&gt; &lt;span class="function-name"&gt;project-specifics&lt;/span&gt; (name &lt;span class="type"&gt;&amp;amp;rest&lt;/span&gt; body)
  (&lt;span class="keyword"&gt;declare&lt;/span&gt; (indent 1))
  `(&lt;span class="keyword"&gt;progn&lt;/span&gt;
     (add-hook 'find-file-hook
               (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                 (&lt;span class="keyword"&gt;when&lt;/span&gt; (string-match-p ,name (buffer-file-name))
                   ,@body)))
     (add-hook 'dired-after-readin-hook
               (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                 (&lt;span class="keyword"&gt;when&lt;/span&gt; (string-match-p ,name (dired-current-directory))
                   ,@body)))))

(project-specifics &lt;span class="string"&gt;"projects/zombietdd"&lt;/span&gt;
  (set (make-local-variable 'slime-js-target-url) &lt;span class="string"&gt;"http://localhost:3000/"&lt;/span&gt;)
  (ffip-local-patterns &lt;span class="string"&gt;"*.js"&lt;/span&gt; &lt;span class="string"&gt;"*.jade"&lt;/span&gt; &lt;span class="string"&gt;"*.css"&lt;/span&gt; &lt;span class="string"&gt;"*.json"&lt;/span&gt; &lt;span class="string"&gt;"*.md"&lt;/span&gt;))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  I created this macro to help me set up local vars. So in the
  example, any files in &lt;code&gt;projects/zombietdd&lt;/code&gt; will see
  these slime-js-target-url and the find-file-in-projects patterns.
&lt;/p&gt;

&lt;p&gt;
  I keep these in a projects-folder to keep track of all the different
  settings for my projects.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-org.el-01</title>
    <updated>2013-02-28T22:05:20+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-org.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-org.el-01</id>
    <content type="html">&lt;!-- 1362085520 --&gt;

&lt;p&gt;I mainly use org-mode for a collection of TODO-lists.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;myorg-update-parent-cookie&lt;/span&gt; ()
  (&lt;span class="keyword"&gt;when&lt;/span&gt; (equal major-mode 'org-mode)
    (&lt;span class="keyword"&gt;save-excursion&lt;/span&gt;
      (&lt;span class="keyword"&gt;ignore-errors&lt;/span&gt;
        (org-back-to-heading)
        (org-update-parent-todo-statistics)))))

(&lt;span class="keyword"&gt;defadvice&lt;/span&gt; &lt;span class="function-name"&gt;org-kill-line&lt;/span&gt; (after fix-cookies activate)
  (myorg-update-parent-cookie))

(&lt;span class="keyword"&gt;defadvice&lt;/span&gt; &lt;span class="function-name"&gt;kill-whole-line&lt;/span&gt; (after fix-cookies activate)
  (myorg-update-parent-cookie))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  So I get a little annoyed when the &lt;code&gt;[17/23]&lt;/code&gt; cookies at
  the parent level aren't updated when I remove an item.
&lt;/p&gt;

&lt;p&gt;
  This code fixes that.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-html-mode.el-01</title>
    <updated>2013-02-16T08:01:37+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-html-mode.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-html-mode.el-01</id>
    <content type="html">&lt;!-- 1360998097 --&gt;

&lt;p&gt;In html-mode, forward/backward-paragraph is infuriatingly slow.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;skip-to-next-blank-line&lt;/span&gt; ()
  (interactive)
  (&lt;span class="keyword"&gt;let&lt;/span&gt; ((inhibit-changing-match-data t))
    (skip-syntax-forward &lt;span class="string"&gt;" &amp;gt;"&lt;/span&gt;)
    (&lt;span class="keyword"&gt;unless&lt;/span&gt; (search-forward-regexp &lt;span class="string"&gt;"^\\s *$"&lt;/span&gt; nil t)
      (goto-char (point-max)))))

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;skip-to-previous-blank-line&lt;/span&gt; ()
  (interactive)
  (&lt;span class="keyword"&gt;let&lt;/span&gt; ((inhibit-changing-match-data t))
    (skip-syntax-backward &lt;span class="string"&gt;" &amp;gt;"&lt;/span&gt;)
    (&lt;span class="keyword"&gt;unless&lt;/span&gt; (search-backward-regexp &lt;span class="string"&gt;"^\\s *$"&lt;/span&gt; nil t)
      (goto-char (point-min)))))

(&lt;span class="keyword"&gt;eval-after-load&lt;/span&gt; &lt;span class="string"&gt;"sgml-mode"&lt;/span&gt;
  '(&lt;span class="keyword"&gt;progn&lt;/span&gt;
     (define-key html-mode-map
       [remap forward-paragraph] 'skip-to-next-blank-line)

     (define-key html-mode-map
       [remap backward-paragraph] 'skip-to-previous-blank-line)))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;I use them a lot for quick navigation. In html-mode, they are anything but quick.&lt;/p&gt;

&lt;p&gt;
  Defining paragraphs in Emacs is black magic, and I'm not sure it's a
  good idea to change that in case something else relies on its erratic behavior.
&lt;/p&gt;

&lt;p&gt;
  Instead I just remap the commands to my home brewed
  skip-to-next/previous-blank-line. Ahh, speedy and predictable
  navigation once more.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-ido.el-02</title>
    <updated>2013-02-08T05:48:45+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-ido.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-ido.el-02</id>
    <content type="html">&lt;!-- 1360298925 --&gt;

&lt;p&gt;Okay, this is a bad idea if your files are prefixed with &lt;code&gt;~&lt;/code&gt;.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(add-hook 'ido-setup-hook
 (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
   &lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Go straight home
&lt;/span&gt;   (define-key ido-file-completion-map
     (kbd &lt;span class="string"&gt;"~"&lt;/span&gt;)
     (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
       (interactive)
       (&lt;span class="keyword"&gt;if&lt;/span&gt; (looking-back &lt;span class="string"&gt;"/"&lt;/span&gt;)
           (insert &lt;span class="string"&gt;"~/"&lt;/span&gt;)
         (call-interactively 'self-insert-command))))))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  But if they're not, this keybinding lets you even more quickly reach
  your home folder when in ido-find-file.
&lt;/p&gt;

&lt;p&gt;
  It doesn't matter if you're a million directories in, just
  press &lt;kbd&gt;~&lt;/kbd&gt; to go home.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-dired.el-02</title>
    <updated>2013-02-01T08:12:37+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-dired.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-dired.el-02</id>
    <content type="html">&lt;!-- 1359702757 --&gt;

&lt;p&gt;In dired, &lt;kbd&gt;M-&gt;&lt;/kbd&gt; and &lt;kbd&gt;M-&lt;&lt;/kbd&gt; never take me where I want to go.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;dired-back-to-top&lt;/span&gt; ()
  (interactive)
  (beginning-of-buffer)
  (dired-next-line 4))

(define-key dired-mode-map
  (vector 'remap 'beginning-of-buffer) 'dired-back-to-top)

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;dired-jump-to-bottom&lt;/span&gt; ()
  (interactive)
  (end-of-buffer)
  (dired-next-line -1))

(define-key dired-mode-map
  (vector 'remap 'end-of-buffer) 'dired-jump-to-bottom)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  That is, now they do.
&lt;/p&gt;

&lt;p&gt;
  Instead of taking me to the very beginning or very end, they now
  take me to the first or last file.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>key-bindings.el-04</title>
    <updated>2013-01-29T08:56:02+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//key-bindings.el-04.html"/>
    <id>urn:whattheemacsd-com:feed:post:key-bindings.el-04</id>
    <content type="html">&lt;!-- 1359446162 --&gt;

&lt;p&gt;
  I use &lt;a href="https://twitter.com/technomancy"&gt;Phil
  Hagelberg&lt;/a&gt;s' &lt;a href="https://github.com/technomancy/find-file-in-project"&gt;find-file-in-project&lt;/a&gt;,
  but fuzzy matching with LOTS of files can be suboptimal.
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Function to create new functions that look for a specific pattern
&lt;/span&gt;(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;ffip-create-pattern-file-finder&lt;/span&gt; (&lt;span class="type"&gt;&amp;amp;rest&lt;/span&gt; patterns)
  (&lt;span class="keyword"&gt;lexical-let&lt;/span&gt; ((patterns patterns))
    (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
      (interactive)
      (&lt;span class="keyword"&gt;let&lt;/span&gt; ((ffip-patterns patterns))
        (find-file-in-project)))))

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Find file in project, with specific patterns
&lt;/span&gt;(global-unset-key (kbd &lt;span class="string"&gt;"C-x C-o"&lt;/span&gt;))
(global-set-key (kbd &lt;span class="string"&gt;"C-x C-o ja"&lt;/span&gt;)
                (ffip-create-pattern-file-finder &lt;span class="string"&gt;"*.java"&lt;/span&gt;))
(global-set-key (kbd &lt;span class="string"&gt;"C-x C-o js"&lt;/span&gt;)
                (ffip-create-pattern-file-finder &lt;span class="string"&gt;"*.js"&lt;/span&gt;))
(global-set-key (kbd &lt;span class="string"&gt;"C-x C-o jp"&lt;/span&gt;)
                (ffip-create-pattern-file-finder &lt;span class="string"&gt;"*.jsp"&lt;/span&gt;))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  This function limits the search to files of a specific file type.
  I've got loads more of these keybindings, all of them with the
  two-letter mnemonic shortcut.
&lt;/p&gt;

&lt;p&gt;
  It really speeds up finding files. Both
  because &lt;code&gt;ido-completing-read&lt;/code&gt; has less matches to worry
  about, because there are fewer similarly named files, and especially
  when the .java, the .js and the .jsp share a name.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>key-bindings.el-03</title>
    <updated>2013-01-26T07:22:42+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//key-bindings.el-03.html"/>
    <id>urn:whattheemacsd-com:feed:post:key-bindings.el-03</id>
    <content type="html">&lt;!-- 1359181362 --&gt;

&lt;p&gt;Here's one keybinding I could not live without.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(global-set-key (kbd &lt;span class="string"&gt;"M-j"&lt;/span&gt;)
            (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                  (interactive)
                  (join-line -1)))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;It joins the following line onto this one.&lt;/p&gt;

&lt;p&gt;
  Let's say I want to collapse this paragraph-tag to one line:
&lt;/p&gt;

&lt;pre class="code-snippet"&gt;
  &amp;lt;&lt;span class="function-name"&gt;p&lt;/span&gt; &lt;span class="variable-name"&gt;class&lt;/span&gt;=&lt;span class="string"&gt;"example"&lt;/span&gt;&amp;gt;
    Some text
    over multiple
    lines.
  &amp;lt;/&lt;span class="function-name"&gt;p&lt;/span&gt;&amp;gt;&lt;/pre&gt;

&lt;p&gt;
  With point anywhere on the first line, I simply press &lt;kbd&gt;M-j&lt;/kbd&gt;
  multiple times to pull the lines up.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>key-bindings.el-02</title>
    <updated>2013-01-25T11:49:44+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//key-bindings.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:key-bindings.el-02</id>
    <content type="html">&lt;!-- 1359110984 --&gt;

&lt;p&gt;There are lots of neat ways of moving around quickly in a buffer.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Move more quickly
&lt;/span&gt;(global-set-key (kbd &lt;span class="string"&gt;"C-S-n"&lt;/span&gt;)
                (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                  (interactive)
                  (&lt;span class="keyword"&gt;ignore-errors&lt;/span&gt; (next-line 5))))

(global-set-key (kbd &lt;span class="string"&gt;"C-S-p"&lt;/span&gt;)
                (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                  (interactive)
                  (&lt;span class="keyword"&gt;ignore-errors&lt;/span&gt; (previous-line 5))))

(global-set-key (kbd &lt;span class="string"&gt;"C-S-f"&lt;/span&gt;)
                (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                  (interactive)
                  (&lt;span class="keyword"&gt;ignore-errors&lt;/span&gt; (forward-char 5))))

(global-set-key (kbd &lt;span class="string"&gt;"C-S-b"&lt;/span&gt;)
                (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
                  (interactive)
                  (&lt;span class="keyword"&gt;ignore-errors&lt;/span&gt; (backward-char 5))))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  For instance, check
  out &lt;a href="http://emacsrocks.com/e10.html"&gt;Emacs Rocks e10:
  Jumping Around&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
  But sometimes I just want to browse a little. Or move a few lines
  down. These keybindings let me do that more quickly
  than &lt;kbd&gt;C-n&lt;/kbd&gt; &lt;kbd&gt;C-n&lt;/kbd&gt; &lt;kbd&gt;C-n&lt;/kbd&gt; &lt;kbd&gt;C-n&lt;/kbd&gt; &lt;kbd&gt;C-n&lt;/kbd&gt; &lt;kbd&gt;C-n&lt;/kbd&gt;
  ...
&lt;/p&gt;

&lt;p&gt;
  In fact, with these I can navigate to any line within a distance of
  11 in 3 keystrokes or less. Or close enough to count. Two of them
  require 4 keystrokes. Can you figure out which ones?
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>mac.el-01</title>
    <updated>2013-01-21T19:37:43+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//mac.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:mac.el-01</id>
    <content type="html">&lt;!-- 1358793463 --&gt;

&lt;p&gt;
  Everybody knows about moving Control to Caps Lock. These are my
  extra neat tricks for my MacBook Pro:
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'super)
(setq ns-function-modifier 'hyper)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  First of all, Meta &lt;kbd&gt;M-&lt;/kbd&gt; needs to be really easy to hit. On a Mac
  keyboard, that means Command - and not the default Option - since
  we want the key that is right next to Space.
&lt;/p&gt;

&lt;p&gt;
  The good news is that now Option is available for
  Super &lt;kbd&gt;s-&lt;/kbd&gt;. And even more amazing, you can also bind the
  Function-key to Hyper &lt;kbd&gt;H-&lt;/kbd&gt; - without losing the ability to
  change the volume or pause/play.
&lt;/p&gt;

&lt;p&gt;
  So now I can use crazy keybindings
  like &lt;kbd&gt;H-SPC&lt;/kbd&gt; &lt;em&gt;hyperspace&lt;/em&gt;. I haven't entirely
  decided what I should be using this newfound superpower for, but one
  thing I've done is reserve all the &lt;kbd&gt;C-s-&lt;/kbd&gt; prefixed letters for
  refactorings with &lt;a href="https://github.com/magnars/js2-refactor.el"&gt;js2-refactor&lt;/a&gt;,
  as you can &lt;a href="https://github.com/magnars/.emacs.d/blob/master/users/fimasvee/js2r-keys.el"&gt;see here&lt;/a&gt;.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-paredit.el-03</title>
    <updated>2013-01-20T13:43:24+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-paredit.el-03.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-paredit.el-03</id>
    <content type="html">&lt;!-- 1358685804 --&gt;

&lt;p&gt;I love the symbiosis between expand-region and delete-selection-mode.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;making paredit work with delete-selection-mode
&lt;/span&gt;(put 'paredit-forward-delete 'delete-selection 'supersede)
(put 'paredit-backward-delete 'delete-selection 'supersede)
(put 'paredit-open-round 'delete-selection t)
(put 'paredit-open-square 'delete-selection t)
(put 'paredit-doublequote 'delete-selection t)
(put 'paredit-newline 'delete-selection t)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  This makes paredit-mode work with delete-selection-mode, replacing
  its wrapping behavior. If I want to wrap, I'll do it with the
  paredit-wrap-* commands explicitly.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-paredit.el-02</title>
    <updated>2013-01-19T19:01:09+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-paredit.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-paredit.el-02</id>
    <content type="html">&lt;!-- 1358618469 --&gt;

&lt;p&gt;Yesterday Kototama commented about another neat paredit addition: duplicating sexps. This is my take on that:&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;paredit--is-at-start-of-sexp&lt;/span&gt; ()
  (and (looking-at &lt;span class="string"&gt;"(&lt;/span&gt;&lt;span class="regexp-grouping-backslash"&gt;&lt;span class="string"&gt;\\&lt;/span&gt;&lt;/span&gt;&lt;span class="regexp-grouping-construct"&gt;&lt;span class="string"&gt;|&lt;/span&gt;&lt;/span&gt;&lt;span class="string"&gt;\\["&lt;/span&gt;)
       (not (nth 3 (syntax-ppss))) &lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;inside string
&lt;/span&gt;       (not (nth 4 (syntax-ppss))))) &lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;inside comment
&lt;/span&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;paredit-duplicate-closest-sexp&lt;/span&gt; ()
  (interactive)
  &lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;skips to start of current sexp
&lt;/span&gt;  (&lt;span class="keyword"&gt;while&lt;/span&gt; (not (paredit--is-at-start-of-sexp))
    (paredit-backward))
  (set-mark-command nil)
  &lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;while we find sexps we move forward on the line
&lt;/span&gt;  (&lt;span class="keyword"&gt;while&lt;/span&gt; (and (bounds-of-thing-at-point 'sexp)
              (&amp;lt;= (point) (car (bounds-of-thing-at-point 'sexp)))
              (not (= (point) (line-end-position))))
    (forward-sexp)
    (&lt;span class="keyword"&gt;while&lt;/span&gt; (looking-at &lt;span class="string"&gt;" "&lt;/span&gt;)
      (forward-char)))
  (kill-ring-save (mark) (point))
  &lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;go to the next line and copy the sexprs we encountered
&lt;/span&gt;  (paredit-newline)
  (yank)
  (exchange-point-and-mark))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  Like Kototama
  says &lt;a href="http://inclojurewetrust.blogspot.de/2013/01/duplicating-s-expressions-on-line.html"&gt;in
  his blogpost&lt;/a&gt;, duplicating a line is very useful, but sometimes
  it leads to invalid sexps. In the blogpost he shows a snippet that
  will duplicate the sexp after point. I immediately realized I had
  really been wanting this.
&lt;/p&gt;

&lt;p&gt;
  The version listed here is a little modified: It will duplicate the
  sexp you are currently inside, or looking at, or looking behind at.
  So basically, point can be in any of these positions:
&lt;/p&gt;

&lt;pre class="code-snippet"&gt;
  |(my sexp) &lt;span class="comment-delimiter"&gt;;; in front&lt;/span&gt;
  (my| sexp) &lt;span class="comment-delimiter"&gt;;; inside&lt;/span&gt;
  (my sexp)| &lt;span class="comment-delimiter"&gt;;; at the end&lt;/span&gt;
&lt;/pre&gt;

&lt;p&gt;
  Insta-useful!
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-paredit.el-01</title>
    <updated>2013-01-18T10:41:31+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-paredit.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-paredit.el-01</id>
    <content type="html">&lt;!-- 1358502091 --&gt;

&lt;p&gt;Programming any lisp? Then this paredit-inspired snippet may be for you.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;paredit-wrap-round-from-behind&lt;/span&gt; ()
  (interactive)
  (forward-sexp -1)
  (paredit-wrap-round)
  (insert &lt;span class="string"&gt;" "&lt;/span&gt;)
  (forward-char -1))

(define-key paredit-mode-map (kbd &lt;span class="string"&gt;"M-)"&lt;/span&gt;)
  'paredit-wrap-round-from-behind)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  With point in front of a sexp, &lt;code&gt;paredit-wrap-round&lt;/code&gt;
  (bound to &lt;kbd&gt;M-(&lt;/kbd&gt;), will open a paren in front the the sexp,
  and place the closing paren at the end of it. That's pretty handy.
&lt;/p&gt;

&lt;p&gt;
  This snippet does the same, but from the other end. It saves me
  a &lt;kbd&gt;C-M-b&lt;/kbd&gt; ever so often. I like it.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>buffer-defuns.el-03</title>
    <updated>2013-01-08T11:31:50+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//buffer-defuns.el-03.html"/>
    <id>urn:whattheemacsd-com:feed:post:buffer-defuns.el-03</id>
    <content type="html">&lt;!-- 1357641110 --&gt;

&lt;p&gt;Annoyed when Emacs opens the window below instead at the side?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;toggle-window-split&lt;/span&gt; ()
  (interactive)
  (&lt;span class="keyword"&gt;if&lt;/span&gt; (= (count-windows) 2)
      (&lt;span class="keyword"&gt;let*&lt;/span&gt; ((this-win-buffer (window-buffer))
             (next-win-buffer (window-buffer (next-window)))
             (this-win-edges (window-edges (selected-window)))
             (next-win-edges (window-edges (next-window)))
             (this-win-2nd (not (and (&amp;lt;= (car this-win-edges)
                                         (car next-win-edges))
                                     (&amp;lt;= (cadr this-win-edges)
                                         (cadr next-win-edges)))))
             (splitter
              (&lt;span class="keyword"&gt;if&lt;/span&gt; (= (car this-win-edges)
                     (car (window-edges (next-window))))
                  'split-window-horizontally
                'split-window-vertically)))
        (delete-other-windows)
        (&lt;span class="keyword"&gt;let&lt;/span&gt; ((first-win (selected-window)))
          (funcall splitter)
          (&lt;span class="keyword"&gt;if&lt;/span&gt; this-win-2nd (other-window 1))
          (set-window-buffer (selected-window) this-win-buffer)
          (set-window-buffer (next-window) next-win-buffer)
          (select-window first-win)
          (&lt;span class="keyword"&gt;if&lt;/span&gt; this-win-2nd (other-window 1))))))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;This snippet toggles between horizontal and vertical layout of two windows.&lt;/p&gt;

&lt;p&gt;
  Neat.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>buffer-defuns.el-02</title>
    <updated>2013-01-07T07:10:58+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//buffer-defuns.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:buffer-defuns.el-02</id>
    <content type="html">&lt;!-- 1357539058 --&gt;

&lt;p&gt;Ever open a file in the wrong window?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;rotate-windows&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Rotate your windows"&lt;/span&gt;
  (interactive)
  (&lt;span class="keyword"&gt;cond&lt;/span&gt; ((not (&amp;gt; (count-windows)1))
         (message &lt;span class="string"&gt;"You can't rotate a single window!"&lt;/span&gt;))
        (t
         (setq i 1)
         (setq numWindows (count-windows))
         (&lt;span class="keyword"&gt;while&lt;/span&gt;  (&amp;lt; i numWindows)
           (&lt;span class="keyword"&gt;let*&lt;/span&gt; (
                  (w1 (elt (window-list) i))
                  (w2 (elt (window-list) (+ (% i numWindows) 1)))

                  (b1 (window-buffer w1))
                  (b2 (window-buffer w2))

                  (s1 (window-start w1))
                  (s2 (window-start w2))
                  )
             (set-window-buffer w1  b2)
             (set-window-buffer w2 b1)
             (set-window-start w1 s2)
             (set-window-start w2 s1)
             (setq i (1+ i)))))))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  This snippet flips a two-window frame, so that left is right, or up
  is down. It's sanity preserving if you've got a sliver of OCD.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-ido.el-01</title>
    <updated>2013-01-03T21:12:19+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-ido.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-ido.el-01</id>
    <content type="html">&lt;!-- 1357243939 --&gt;

&lt;p&gt;Ido gives fuzzy matching in my completing-read. I want that everywhere.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Use ido everywhere
&lt;/span&gt;(&lt;span class="keyword"&gt;require&lt;/span&gt; '&lt;span class="constant"&gt;ido-ubiquitous&lt;/span&gt;)
(ido-ubiquitous-mode 1)

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Fix ido-ubiquitous for newer packages
&lt;/span&gt;(&lt;span class="keyword"&gt;defmacro&lt;/span&gt; &lt;span class="function-name"&gt;ido-ubiquitous-use-new-completing-read&lt;/span&gt; (cmd package)
  `(&lt;span class="keyword"&gt;eval-after-load&lt;/span&gt; ,package
     '(&lt;span class="keyword"&gt;defadvice&lt;/span&gt; ,cmd (around ido-ubiquitous-new activate)
        (&lt;span class="keyword"&gt;let&lt;/span&gt; ((ido-ubiquitous-enable-compatibility nil))
          ad-do-it))))

(ido-ubiquitous-use-new-completing-read webjump 'webjump)
(ido-ubiquitous-use-new-completing-read yas/expand 'yasnippet)
(ido-ubiquitous-use-new-completing-read yas/visit-snippet-file 'yasnippet)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;&lt;code&gt;ido-ubiquitous&lt;/code&gt; delivers on that promise.&lt;/p&gt;

&lt;p&gt;
  However, there is some discrepancies in
  the &lt;code&gt;completing-read&lt;/code&gt; API between newer and older
  versions regarding the case where you just press enter to choose the
  first item.
&lt;/p&gt;

&lt;p&gt;
  To fix these, some of the newer usages of completing read need a
  slightly different implementation. These tweaks fix that problem.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>buffer-defuns.el-01</title>
    <updated>2013-01-02T18:45:09+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//buffer-defuns.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:buffer-defuns.el-01</id>
    <content type="html">&lt;!-- 1357148709 --&gt;

&lt;p&gt;Uneven application of white-space is bad, m'kay?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;cleanup-buffer-safe&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Perform a bunch of safe operations on the whitespace content of a buffer.
Does not indent buffer, because it is used for a before-save-hook, and that
might be bad."&lt;/span&gt;
  (interactive)
  (untabify (point-min) (point-max))
  (delete-trailing-whitespace)
  (set-buffer-file-coding-system 'utf-8))

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Various superfluous white-space. Just say no.
&lt;/span&gt;(add-hook 'before-save-hook 'cleanup-buffer-safe)

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;cleanup-buffer&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Perform a bunch of operations on the whitespace content of a buffer.
Including indent-buffer, which should not be called automatically on save."&lt;/span&gt;
  (interactive)
  (cleanup-buffer-safe)
  (indent-region (point-min) (point-max)))

(global-set-key (kbd &lt;span class="string"&gt;"C-c n"&lt;/span&gt;) 'cleanup-buffer)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  I use these two literally all the time. The first one removes
  trailing whitespace and replaces all tabs with spaces before save.
&lt;/p&gt;

&lt;p&gt;
  The last one I've got on a key - it also indents the entire buffer.
&lt;/p&gt;

&lt;p&gt;
  These might not be for everybody. Sometimes you do want tabs (I'm looking at
  you &lt;code&gt;Makefile&lt;/code&gt; &lt;em&gt;grrrrr&lt;/em&gt;). Then this isn't optimal.
  The same can be said for when Emacs doesn't indent correctly. But
  that is a horrid, unacceptable situation in any case. I always fix
  those as soon as I can.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-dired.el-01</title>
    <updated>2012-12-31T13:31:59+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-dired.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-dired.el-01</id>
    <content type="html">&lt;!-- 1356957119 --&gt;

&lt;p&gt;I find the default dired look a bit spammy, especially in narrow windows.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Make dired less verbose
&lt;/span&gt;(&lt;span class="keyword"&gt;require&lt;/span&gt; '&lt;span class="constant"&gt;dired-details&lt;/span&gt;)
(setq-default dired-details-hidden-string &lt;span class="string"&gt;"--- "&lt;/span&gt;)
(dired-details-install)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  By installing &lt;kbd&gt;M-x&lt;/kbd&gt; &lt;code&gt;package-install
  dired-details&lt;/code&gt; and using this snippet, we hide all the
  unnecessary &lt;code&gt;ls&lt;/code&gt;-details.
&lt;/p&gt;

&lt;p&gt;
  That rare occasion where you actually need that information, you can
  show it with &lt;kbd&gt;)&lt;/kbd&gt; and hide again with &lt;kbd&gt;(&lt;/kbd&gt;.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>file-defuns.el-02</title>
    <updated>2012-12-30T10:30:49+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//file-defuns.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:file-defuns.el-02</id>
    <content type="html">&lt;!-- 1356859849 --&gt;

&lt;p&gt;
  Like &lt;a href="/file-defuns.el-01.html"&gt;rename yesterday&lt;/a&gt;, I think
  delete deserves a designated keybinding.
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;delete-current-buffer-file&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Removes file connected to current buffer and kills buffer."&lt;/span&gt;
  (interactive)
  (&lt;span class="keyword"&gt;let&lt;/span&gt; ((filename (buffer-file-name))
        (buffer (current-buffer))
        (name (buffer-name)))
    (&lt;span class="keyword"&gt;if&lt;/span&gt; (not (and filename (file-exists-p filename)))
        (ido-kill-buffer)
      (&lt;span class="keyword"&gt;when&lt;/span&gt; (yes-or-no-p &lt;span class="string"&gt;"Are you sure you want to remove this file? "&lt;/span&gt;)
        (delete-file filename)
        (kill-buffer buffer)
        (message &lt;span class="string"&gt;"File '%s' successfully removed"&lt;/span&gt; filename)))))

(global-set-key (kbd &lt;span class="string"&gt;"C-x C-k"&lt;/span&gt;) 'delete-current-buffer-file)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;This is it. &lt;kbd&gt;C-x C-k&lt;/kbd&gt;: file begone!&lt;/p&gt;

&lt;p&gt;
  I like the feel between &lt;kbd&gt;C-x k&lt;/kbd&gt; to kill the buffer
  and &lt;kbd&gt;C-x C-k&lt;/kbd&gt; to kill the file. Release ctrl to kill it a little,
  hold to kill it a lot.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>file-defuns.el-01</title>
    <updated>2012-12-29T15:14:15+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//file-defuns.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:file-defuns.el-01</id>
    <content type="html">&lt;!-- 1356790455 --&gt;

&lt;p&gt;For some reason, renaming the current buffer file is a multi-step process in Emacs.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;rename-current-buffer-file&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Renames current buffer and file it is visiting."&lt;/span&gt;
  (interactive)
  (&lt;span class="keyword"&gt;let&lt;/span&gt; ((name (buffer-name))
        (filename (buffer-file-name)))
    (&lt;span class="keyword"&gt;if&lt;/span&gt; (not (and filename (file-exists-p filename)))
        (&lt;span class="warning"&gt;error&lt;/span&gt; &lt;span class="string"&gt;"Buffer '%s' is not visiting a file!"&lt;/span&gt; name)
      (&lt;span class="keyword"&gt;let&lt;/span&gt; ((new-name (read-file-name &lt;span class="string"&gt;"New name: "&lt;/span&gt; filename)))
        (&lt;span class="keyword"&gt;if&lt;/span&gt; (get-buffer new-name)
            (&lt;span class="warning"&gt;error&lt;/span&gt; &lt;span class="string"&gt;"A buffer named '%s' already exists!"&lt;/span&gt; new-name)
          (rename-file filename new-name 1)
          (rename-buffer new-name)
          (set-visited-file-name new-name)
          (set-buffer-modified-p nil)
          (message &lt;span class="string"&gt;"File '%s' successfully renamed to '%s'"&lt;/span&gt;
                   name (file-name-nondirectory new-name)))))))

(global-set-key (kbd &lt;span class="string"&gt;"C-x C-r"&lt;/span&gt;) 'rename-current-buffer-file)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  This defun fixes that. And unlike some other alternatives to perform
  this common task, you don't have to type the name out from scratch -
  but get the current name to modify. Like it should be.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>editing-defuns.el-02</title>
    <updated>2012-12-28T17:45:34+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//editing-defuns.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:editing-defuns.el-02</id>
    <content type="html">&lt;!-- 1356713134 --&gt;

&lt;p&gt;When programming I tend to shuffle lines around a lot.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;move-line-down&lt;/span&gt; ()
  (interactive)
  (&lt;span class="keyword"&gt;let&lt;/span&gt; ((col (current-column)))
    (&lt;span class="keyword"&gt;save-excursion&lt;/span&gt;
      (forward-line)
      (transpose-lines 1))
    (forward-line)
    (move-to-column col)))

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;move-line-up&lt;/span&gt; ()
  (interactive)
  (&lt;span class="keyword"&gt;let&lt;/span&gt; ((col (current-column)))
    (&lt;span class="keyword"&gt;save-excursion&lt;/span&gt;
      (forward-line)
      (transpose-lines -1))
    (move-to-column col)))

(global-set-key (kbd &lt;span class="string"&gt;"&amp;lt;C-S-down&amp;gt;"&lt;/span&gt;) 'move-line-down)
(global-set-key (kbd &lt;span class="string"&gt;"&amp;lt;C-S-up&amp;gt;"&lt;/span&gt;) 'move-line-up)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  Maybe not when I program elisp, since that's sexp-based, but for
  other programming languages these two come in very handy. They
  simply move the current line one step up or down.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>editing-defuns.el-01</title>
    <updated>2012-12-27T09:53:13+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//editing-defuns.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:editing-defuns.el-01</id>
    <content type="html">&lt;!-- 1356598393 --&gt;

&lt;p&gt;Opening new lines can be finicky.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;open-line-below&lt;/span&gt; ()
  (interactive)
  (end-of-line)
  (newline)
  (indent-for-tab-command))

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;open-line-above&lt;/span&gt; ()
  (interactive)
  (beginning-of-line)
  (newline)
  (forward-line -1)
  (indent-for-tab-command))

(global-set-key (kbd &lt;span class="string"&gt;"&amp;lt;C-return&amp;gt;"&lt;/span&gt;) 'open-line-below)
(global-set-key (kbd &lt;span class="string"&gt;"&amp;lt;C-S-return&amp;gt;"&lt;/span&gt;) 'open-line-above)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  With these shortcuts you can open a new line above or below the
  current one, even if the cursor is midsentence.
&lt;/p&gt;

&lt;p&gt; Try it out, it's a nice convenience. &lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-shell.el-01</title>
    <updated>2012-12-26T22:14:20+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-shell.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-shell.el-01</id>
    <content type="html">&lt;!-- 1356556460 --&gt;

&lt;p&gt;&lt;kbd&gt;C-d&lt;/kbd&gt; on an empty line in the shell terminates the process.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;comint-delchar-or-eof-or-kill-buffer&lt;/span&gt; (arg)
  (interactive &lt;span class="string"&gt;"p"&lt;/span&gt;)
  (&lt;span class="keyword"&gt;if&lt;/span&gt; (null (get-buffer-process (current-buffer)))
      (kill-buffer)
    (comint-delchar-or-maybe-eof arg)))

(add-hook 'shell-mode-hook
          (&lt;span class="keyword"&gt;lambda&lt;/span&gt; ()
            (define-key shell-mode-map
              (kbd &lt;span class="string"&gt;"C-d"&lt;/span&gt;) 'comint-delchar-or-eof-or-kill-buffer)))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;With this snippet, another press of &lt;kbd&gt;C-d&lt;/kbd&gt; will kill the buffer.&lt;/p&gt;

&lt;p&gt;
  It's pretty nice, since you then just tap &lt;kbd&gt;C-d&lt;/kbd&gt; twice to
  get rid of the shell and go on about your merry way.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-magit.el-02</title>
    <updated>2012-12-26T10:43:30+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-magit.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-magit.el-02</id>
    <content type="html">&lt;!-- 1356515010 --&gt;

&lt;p&gt;Actual changes lost in a sea of whitespace diffs?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;magit-toggle-whitespace&lt;/span&gt; ()
  (interactive)
  (&lt;span class="keyword"&gt;if&lt;/span&gt; (member &lt;span class="string"&gt;"-w"&lt;/span&gt; magit-diff-options)
      (magit-dont-ignore-whitespace)
    (magit-ignore-whitespace)))

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;magit-ignore-whitespace&lt;/span&gt; ()
  (interactive)
  (add-to-list 'magit-diff-options &lt;span class="string"&gt;"-w"&lt;/span&gt;)
  (magit-refresh))

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;magit-dont-ignore-whitespace&lt;/span&gt; ()
  (interactive)
  (setq magit-diff-options (remove &lt;span class="string"&gt;"-w"&lt;/span&gt; magit-diff-options))
  (magit-refresh))

(define-key magit-status-mode-map (kbd &lt;span class="string"&gt;"W"&lt;/span&gt;) 'magit-toggle-whitespace)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;This adds &lt;kbd&gt;W&lt;/kbd&gt; to toggle ignoring whitespace in magit.&lt;/p&gt;

&lt;p&gt;
  It has some weird interactions with the changed files list, in that
  files with nothing but whitespace changes go missing. Toggle back to
  find them again.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>sane-defaults.el-01</title>
    <updated>2012-12-24T11:59:00+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//sane-defaults.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:sane-defaults.el-01</id>
    <content type="html">&lt;!-- 1356346740 --&gt;

&lt;p&gt;Tired of seeing stale dired buffers?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Auto refresh buffers
&lt;/span&gt;(global-auto-revert-mode 1)

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Also auto refresh dired, but be quiet about it
&lt;/span&gt;(setq global-auto-revert-non-file-buffers t)
(setq auto-revert-verbose nil)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;Auto revert mode looks for changes to files, and updates them for you.&lt;/p&gt;

&lt;p&gt;
  With these settings, dired buffers are also updated. The last
  setting makes sure that you're not alerted every time this happens.
  Which is every time you save something.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>setup-magit.el-01</title>
    <updated>2012-12-23T12:22:29+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//setup-magit.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:setup-magit.el-01</id>
    <content type="html">&lt;!-- 1356261749 --&gt;

&lt;p&gt;You are using magit with your git, right?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;full screen magit-status
&lt;/span&gt;
(&lt;span class="keyword"&gt;defadvice&lt;/span&gt; &lt;span class="function-name"&gt;magit-status&lt;/span&gt; (around magit-fullscreen activate)
  (window-configuration-to-register &lt;span class="builtin"&gt;:magit-fullscreen&lt;/span&gt;)
  ad-do-it
  (delete-other-windows))

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;magit-quit-session&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Restores the previous window configuration and kills the magit buffer"&lt;/span&gt;
  (interactive)
  (kill-buffer)
  (jump-to-register &lt;span class="builtin"&gt;:magit-fullscreen&lt;/span&gt;))

(define-key magit-status-mode-map (kbd &lt;span class="string"&gt;"q"&lt;/span&gt;) 'magit-quit-session)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  This code makes &lt;code&gt;magit-status&lt;/code&gt; run alone in the frame,
  and then restores the old window configuration when you quit out of magit.
&lt;/p&gt;

&lt;p&gt;
  No more juggling windows after commiting. It's magit bliss.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>key-bindings.el-01</title>
    <updated>2012-12-23T08:35:09+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//key-bindings.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:key-bindings.el-01</id>
    <content type="html">&lt;!-- 1356248109 --&gt;

&lt;p&gt;What are those line numbers for anyway?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(global-set-key [remap goto-line] 'goto-line-with-feedback)

(&lt;span class="keyword"&gt;defun&lt;/span&gt; &lt;span class="function-name"&gt;goto-line-with-feedback&lt;/span&gt; ()
  &lt;span class="doc"&gt;"Show line numbers temporarily, while prompting for the line number input"&lt;/span&gt;
  (interactive)
  (&lt;span class="keyword"&gt;unwind-protect&lt;/span&gt;
      (&lt;span class="keyword"&gt;progn&lt;/span&gt;
        (linum-mode 1)
        (goto-line (read-number &lt;span class="string"&gt;"Goto line: "&lt;/span&gt;)))
    (linum-mode -1)))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  I don't have line numbers visible in the fringe of my Emacs. If I
  want to go to a line number, that is usually because it is
  referenced in an error message somewhere. Showing them all the time
  is just noise to me.
&lt;/p&gt;

&lt;p&gt;
  Still, many people want line numbers visible. I guess that is
  because they use them for navigation. This snippet shows line
  numbers temporarily just when you're going to a line number
  with &lt;code&gt;goto-line&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
  Notice the nice &lt;code&gt;remap&lt;/code&gt;-trick in the key binding. It will
  remap all key bindings from &lt;code&gt;goto-line&lt;/code&gt; to
  &lt;code&gt;goto-line-with-feedback&lt;/code&gt;. Neat!
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>my-misc.el-01</title>
    <updated>2012-12-22T21:00:28+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//my-misc.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:my-misc.el-01</id>
    <content type="html">&lt;!-- 1356206428 --&gt;

&lt;p&gt;Searching the web can also be improved with Emacs.&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
(global-set-key (kbd &lt;span class="string"&gt;"C-x g"&lt;/span&gt;) 'webjump)

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Add Urban Dictionary to webjump
&lt;/span&gt;(&lt;span class="keyword"&gt;eval-after-load&lt;/span&gt; &lt;span class="string"&gt;"webjump"&lt;/span&gt;
'(add-to-list 'webjump-sites
              '(&lt;span class="string"&gt;"Urban Dictionary"&lt;/span&gt; .
                [simple-query
                 &lt;span class="string"&gt;"www.urbandictionary.com"&lt;/span&gt;
                 &lt;span class="string"&gt;"http://www.urbandictionary.com/define.php?term="&lt;/span&gt;
                 &lt;span class="string"&gt;""&lt;/span&gt;])))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  Webjump let's you quickly search Google, Wikipedia, Emacs Wiki and
  other pages. I've got it bound to &lt;kbd&gt;C-x g&lt;/kbd&gt;.
&lt;/p&gt;

&lt;p&gt;
  This snippet adds Urban Dictionary to the list of pages, so the next
  time you wonder what those dastardly kids mean when they write
  faceroll or sassafrassa or Technotard or kthxbye or whatever else is
  hip these days, well, then you can find out. With &lt;code&gt;webjump&lt;/code&gt;.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>init.el-06</title>
    <updated>2012-12-21T07:59:31+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//init.el-06.html"/>
    <id>urn:whattheemacsd-com:feed:post:init.el-06</id>
    <content type="html">&lt;!-- 1356073171 --&gt;

&lt;p&gt;Need different settings for different machines?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Settings for currently logged in user
&lt;/span&gt;(setq user-settings-dir
      (concat user-emacs-directory &lt;span class="string"&gt;"users/"&lt;/span&gt; user-login-name))

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Conclude init by setting up specifics for the current user
&lt;/span&gt;(&lt;span class="keyword"&gt;when&lt;/span&gt; (file-exists-p user-settings-dir)
  (mapc 'load (directory-files user-settings-dir nil &lt;span class="string"&gt;"^[&lt;/span&gt;&lt;span class="negation-char"&gt;&lt;span class="string"&gt;^&lt;/span&gt;&lt;/span&gt;&lt;span class="string"&gt;#].*el$"&lt;/span&gt;)))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  These are the last lines of my init.el. They will load
  any &lt;code&gt;*.el&lt;/code&gt; files in the
  &lt;code&gt;~/.emacs.d/users/&lt;small&gt;user-login-name&lt;/small&gt;/&lt;/code&gt;
  folder.
&lt;/p&gt;

&lt;p&gt;
  Anything specific for that machine goes there.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>init.el-05</title>
    <updated>2012-12-19T10:37:38+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//init.el-05.html"/>
    <id>urn:whattheemacsd-com:feed:post:init.el-05</id>
    <content type="html">&lt;!-- 1355909858 --&gt;

&lt;p&gt;Do you program any elisp, at all, ever?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Elisp go-to-definition with M-. and back again with M-,
&lt;/span&gt;(autoload 'elisp-slime-nav-mode &lt;span class="string"&gt;"elisp-slime-nav"&lt;/span&gt;)
(add-hook 'emacs-lisp-mode-hook (&lt;span class="keyword"&gt;lambda&lt;/span&gt; () (elisp-slime-nav-mode t)))
(&lt;span class="keyword"&gt;eval-after-load&lt;/span&gt; 'elisp-slime-nav '(diminish 'elisp-slime-nav-mode))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  Then you need to &lt;kbd&gt;M-x&lt;/kbd&gt; &lt;code class="small"&gt;package-install
  elisp-slime-nav-mode&lt;/code&gt;.
&lt;/p&gt;

&lt;p&gt;
  It lets you jump to the definition of a function
  with &lt;kbd&gt;M-.&lt;/kbd&gt;, and back again afterwards with &lt;kbd&gt;M-,&lt;/kbd&gt;.
&lt;/p&gt;

&lt;p&gt;
  That last line says that we want elisp-slime-nav-mode to continue
  doing its work for us, but &lt;a href="/init.el-04.html"&gt;we no longer
  want to be reminded of it&lt;/a&gt;.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>init.el-04</title>
    <updated>2012-12-18T20:51:42+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//init.el-04.html"/>
    <id>urn:whattheemacsd-com:feed:post:init.el-04</id>
    <content type="html">&lt;!-- 1355860302 --&gt;

&lt;p&gt;Is your modeline chock full of minor-mode abbreviations and cruft?&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Diminish modeline clutter
&lt;/span&gt;(&lt;span class="keyword"&gt;require&lt;/span&gt; '&lt;span class="constant"&gt;diminish&lt;/span&gt;)
(diminish 'wrap-region-mode)
(diminish 'yas/minor-mode)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  After a quick &lt;kbd&gt;M-x&lt;/kbd&gt; &lt;code class="small"&gt;package-install diminish&lt;/code&gt;, you too can
  have the pleasure of using a lot of minor modes, without those minor
  modes making a mess of the modeline. Mmm.
&lt;/p&gt;

&lt;p&gt;
  As for diminish.el itself, it contains the most beautifully poetic
  code commentary of all time. Here's an excerpt:
&lt;/p&gt;

&lt;hr/&gt;

&lt;div class="quote"&gt;
  &lt;blockquote&gt;
    "When we diminish a mode, we are saying we want it to continue doing its
    work for us, but we no longer want to be reminded of it.  It becomes a
    night worker, like a janitor; it becomes an invisible man; it remains a
    component, perhaps an important one, sometimes an indispensable one, of
    the mechanism that maintains the day-people's world, but its place in
    their thoughts is diminished, usually to nothing.  As we grow old we
    diminish more and more such thoughts, such people, usually to nothing."
  &lt;/blockquote&gt;
  &lt;p&gt;
    - Will Mengarini in
    &lt;a href="http://www.eskimo.com/~seldon/diminish.el"&gt;
      diminish.el
    &lt;/a&gt;
  &lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
  <entry>
    <title>init.el-03</title>
    <updated>2012-12-18T08:15:57+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//init.el-03.html"/>
    <id>urn:whattheemacsd-com:feed:post:init.el-03</id>
    <content type="html">&lt;!-- 1355814957 --&gt;

&lt;p&gt;
  Tired of navigating back to where you were last in a file?
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Save point position between sessions
&lt;/span&gt;(&lt;span class="keyword"&gt;require&lt;/span&gt; '&lt;span class="constant"&gt;saveplace&lt;/span&gt;)
(setq-default save-place t)
(setq save-place-file (expand-file-name &lt;span class="string"&gt;".places"&lt;/span&gt; user-emacs-directory))&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  The &lt;code&gt;saveplace&lt;/code&gt; package is part of Emacs, and remembers the
  position of point - even between emacs sessions.
&lt;/p&gt;

&lt;p&gt;
  The last line sets the path to where saveplace stores your position
  data. Change it at your peril! &lt;small&gt;*&lt;/small&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;small&gt;* Ahem, there really is no peril. That was just melodrama.&lt;/small&gt;
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>init.el-02</title>
    <updated>2012-12-17T21:45:51+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//init.el-02.html"/>
    <id>urn:whattheemacsd-com:feed:post:init.el-02</id>
    <content type="html">&lt;!-- 1355777151 --&gt;

&lt;p&gt;
  Annoyed by those pesky &lt;code&gt;~&lt;/code&gt; files?
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Write backup files to own directory
&lt;/span&gt;(setq backup-directory-alist
      `((&lt;span class="string"&gt;"."&lt;/span&gt; . ,(expand-file-name
                 (concat user-emacs-directory &lt;span class="string"&gt;"backups"&lt;/span&gt;)))))

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Make backups of files, even when they're in version control
&lt;/span&gt;(setq vc-make-backup-files t)
&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  Backup files are so very annoying, until the day they save your
  hide. That's when you don't want to look back and say "Man, I
  really shouldn't have disabled those stupid backups."
&lt;/p&gt;

&lt;p&gt;
  These settings move all backup files to a central location.
  &lt;em&gt;Bam!&lt;/em&gt; No longer annoying.
&lt;/p&gt;

&lt;p&gt;
  As an added bonus, that last line makes sure your files are backed
  up even when the files are in version control. Do it.
&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>init.el-01</title>
    <updated>2012-12-17T21:45:46+01:00</updated>
    <author>
      <name>Magnar Sveen</name>
    </author>
    <link href="http://whattheemacsd.com//init.el-01.html"/>
    <id>urn:whattheemacsd-com:feed:post:init.el-01</id>
    <content type="html">&lt;!-- 1355777146 --&gt;

&lt;p&gt;
  Behold the very first lines in my &lt;code&gt;.emacs.d/init.el&lt;/code&gt;:
&lt;/p&gt;

&lt;hr/&gt;

&lt;pre class="code-snippet"&gt;
&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;Turn off mouse interface early in startup to avoid momentary display
&lt;/span&gt;(&lt;span class="keyword"&gt;if&lt;/span&gt; (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(&lt;span class="keyword"&gt;if&lt;/span&gt; (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(&lt;span class="keyword"&gt;if&lt;/span&gt; (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))

&lt;span class="comment-delimiter"&gt;;; &lt;/span&gt;&lt;span class="comment"&gt;No splash screen please ... jeez
&lt;/span&gt;(setq inhibit-startup-message t)&lt;/pre&gt;

&lt;hr/&gt;

&lt;p&gt;
  They hide the menu bar, tool bar, scroll bar and splash screen.
  Doing so early avoids ever having to see them - not even for a brief
  flash when starting Emacs.
&lt;/p&gt;
&lt;p&gt;
  These four lines move us into the tranquil zone of &lt;em&gt;nothing but
    the text&lt;/em&gt;. A raster interface can never hold the seeming
  infinitude of Emacs functionality, so we just let it go.
&lt;/p&gt;

&lt;hr/&gt;

&lt;div class="quote"&gt;
  &lt;blockquote&gt;
    "What I don't understand is: why should you ever care how your editor
    looks, unless you're trying to win a screenshot competition? The
    primary factor in looking good should be the choice of a good font
    at a comfortable size, and a syntax coloring theme that you like.
    And that is not something specific to an editor. Editors like Emacs
    and vi have almost no UI! If Emacs is configured right, the only UI
    it has is the modeline and the minibuffer."
  &lt;/blockquote&gt;
  &lt;p&gt;
    - Vivek Haldar in
    &lt;a href="http://blog.vivekhaldar.com/post/31970017734/new-frontiers-in-text-editing"&gt;
      New Frontiers In Text Editing
    &lt;/a&gt;
  &lt;/p&gt;
&lt;/div&gt;
</content>
  </entry>
</feed>
