<?xml version="1.0"?>
<!DOCTYPE content [ <!ENTITY nbsp " "> ]>
<rdf:RDF xml:base="http://snarfed.org/rdf"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/">

<rdf:Description rdf:about="http://snarfed.org">
  <dc:title> snarfed.org  </dc:title>
  <dc:description> draw group stream of consciousness </dc:description>
  <dc:creator> Ryan Barrett &lt;snarfed at ryanb dot org&gt; </dc:creator>
  <dc:language> en </dc:language>
  <dc:format> text/html </dc:format>
  <dc:rights> Copyright 2002-2007 Ryan Barrett </dc:rights>
</rdf:Description>

<rdf:Description rdf:about="http://snarfed.org/space/emacs%20X%20resources">
  <dc:title> emacs X resources </dc:title>
  <dc:creator> Ryan Barrett &lt;snarfed at ryanb dot org&gt; </dc:creator>
  <dc:date> 2003-01-01T05:00:00Z </dc:date>
  <dc:language> en </dc:language>
  <dc:format> text/html </dc:format>
  <dc:rights> Copyright 2002-2007 Ryan Barrett </dc:rights>

  <content>
    <p><a href="http://gnu.org/software/emacs/"><img src="/space/gnu.jpg" alt="gnu.jpg" title="" /></a></p>

<p>I
do most of my <a href="http://gnu.org/software/emacs/">Emacs</a> customization in <a href="http://ryan.barrett.name/dotfiles/emacs">my
.emacs file</a>. However, Emacs starts
itself and creates an X11 window <em>before</em> it reads the .emacs file. So,
customizations that affect the window itself are very expensive, since they're
applied <em>after</em> the window is created.</p>

<p>A few of these customizations include turning the menu bar, toolbar, and scroll
bars off, as well as setting custom fonts and colors. Luckily, there's a much
faster way: <a href="http://www.plig.org/xwinman/resource.html">X resources</a>.</p>

<p>Try for yourself! Here's the elisp to turn off the menu bar, toolbar, and scroll
bars. Put it in your <code>.emacs</code>, and start Emacs.</p>

<div class='p-shadow'><pre><code>(menu-bar-mode nil)
(tool-bar-mode nil)
(scroll-bar-mode nil)
</code></pre></div>

<p><br class='clearing' />Now, take it out, and instead, add these lines to your <code>.Xresources</code> file.</p>

<div class='p-shadow'><pre><code>Emacs.menuBar: off
Emacs.verticalScrollBars: off
Emacs.toolBar: off
</code></pre></div>

<p><br class='clearing' />Run <code>xrdb .Xresources</code>, then try starting Emacs again. It should be much faster!</p>

<p>Emacs obeys many other X resources. For example, I use these to customize the
default font and foreground and background colors:</p>

<div class='p-shadow'><pre><code>Emacs*font: 7x14
Emacs*foreground: lightgray
Emacs*background: black
</code></pre></div>

<p><br class='clearing' />Here's to fast-starting Emacs!</p>

<p>See also:</p>

<ul>
<li><a href="/space/Emacs and remote X Windows">Emacs and remote X Windows</a></li>
<li><a href="/space/minimal .emacs for fast startup">minimal .emacs for fast startup</a></li>
<li><a href="/space/why I don't run shells inside Emacs">why I don't run shells inside Emacs</a></li>
</ul>

  </content>

  <rdf:Seq>

  </rdf:Seq>
</rdf:Description>
</rdf:RDF>
