<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Made of Bugs &#187; javascript</title>
	<atom:link href="http://blog.nelhage.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nelhage.com</link>
	<description>It's software. It's made of bugs.</description>
	<lastBuildDate>Thu, 18 Aug 2011 21:57:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress tricks: Disabling editing shortcuts</title>
		<link>http://blog.nelhage.com/2010/06/disable-wordpress-edit-shortcuts/</link>
		<comments>http://blog.nelhage.com/2010/06/disable-wordpress-edit-shortcuts/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 00:07:00 +0000</pubDate>
		<dc:creator>nelhage</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[greasemonkey]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.nelhage.com/?p=250</guid>
		<description><![CDATA[One of the major reasons I can&#8217;t stand webapps is because I&#8217;m a serious emacs junkie, and I can&#8217;t edit text in anything that doesn&#8217;t have decent emacs keybindings. Fortunately, on Linux, at least, GTK provides basic emacs keybindings if you add gtk-key-theme-name = "Emacs" to your .gtkrc-2.0. However, some webapps think that they deserve [...]]]></description>
			<content:encoded><![CDATA[<p>One of the major reasons I can&#8217;t stand webapps is because I&#8217;m a
serious emacs junkie, and I can&#8217;t edit text in anything that doesn&#8217;t
have decent emacs keybindings.</p>

<p>Fortunately, on Linux, at least, GTK provides basic emacs keybindings
if you add</p>

<pre><code>gtk-key-theme-name = "Emacs"
</code></pre>

<p>to your <code>.gtkrc-2.0</code>. However, some webapps think that they deserve
total control over your keys, and grab key combinations for a WYSIWYG
editor of some sort. And so whenever I try to edit a post in WordPress
(most of them are written in emacs and then copied over), I find
myself trying to go backwards a word, and inserting random
<code>&lt;strong&gt;</code> tags all over my post (Because <code>M-b</code> is
bound to make text bold, by WordPress&#8217;s editor). I finally got annoyed
enough to do some source-diving, and discovered that WordPress&#8217;s
editor constructs keyboard shortcuts using the HTML <a href="http://www.w3.org/TR/html5/editing.html#dfnReturnLink-0">accesskey</a>
attribute. This is easy enough to manipulate from Javascript, so I
went and wrote up a quick Greasemonkey user script. The bulk of it is
a simple XPath:</p>

<pre><code>    var buttons = document.evaluate('//input[@type="button"][@accesskey]', poststuff);
    var button;
</code></pre>

<p>You can <a href="http://nelhage.com/files/wp-keys.user.js">install the
script</a> off of nelhage.com.</p>

<p>Let me know if you find this useful, or if anyone figures out a
general way to disable (sets of) keyboard shortcuts for websites,
without relying on knowing the specific tricks that a website uses.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nelhage.com/2010/06/disable-wordpress-edit-shortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Conkeror</title>
		<link>http://blog.nelhage.com/2008/03/conkeror/</link>
		<comments>http://blog.nelhage.com/2008/03/conkeror/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 23:57:00 +0000</pubDate>
		<dc:creator>nelhage</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[conkeror]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[js]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://nelhage.scripts.mit.edu/madeofbugs/?p=8</guid>
		<description><![CDATA[I&#8217;ve recently switched to Conkeror as my primary browser. It started life as a Firefox extension, but nowadays it&#8217;s a standalone app built on top of Mozilla&#8217;s xulrunner, so it uses the Gecko rendering engine. What it is, is an emacs implemented in Javascript, for the web. This means on the one hand that it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently switched to <a href="http://conkeror.mozdev.org">Conkeror</a> as my primary
browser. It started life as a Firefox extension, but nowadays it&#8217;s a
standalone app built on top of Mozilla&#8217;s xulrunner, so it uses the
Gecko rendering engine.</p>

<p>What it is, is an emacs implemented in Javascript, for the web. This
means on the one hand that it <em>acts</em> like emacs. Most of the basic
emacs keybindings are supported &#8212; you open URLs with <code>C-x C-f</code>, and
have buffers you can switch between with <code>C-x b</code> and so on.</p>

<p>However, what is also means is that internally, it is fully an emacs,
with all the extensibility and all the other things that applies. The
UI you see is just code written on top of a generic core, that
implements the core emacs primitives, including</p>

<ul>
<li>The basic <code>buffer</code> datatype. But instead of being a plain text
store, it&#8217;s instead a full Gecko XUL/XHTML DOM.</li>
<li>A self-documenting <code>command</code> infrastructure and <code>variable</code>
infrastructure, that lets you look up the documentation and
definition of any command or configuration variable.</li>
<li><code>keymaps</code> accessible from javascript that map keys and
key sequences to commands, letting you rebind any key from your
configuration code, and define new modes with completely new
keybinding sets</li>
</ul>

<p>In other words, it really is not just an emacs-like frontend to
Gecko/Firefox, but is a full platform on top of xulrunner for writing
interactive applications in javascript/html/css like emacs.</p>

<p>I predict it&#8217;s only a matter of time before someone</p>

<ul>
<li>Adds the ability to edit local files and becomes a full text editor
that can actually start to <em>compete</em> with emacs. At that point
people will start to port things like <code>emacs-vc</code> and all the Nice
Things we&#8217;ve come to expect from emacs, and</li>
<li>Writes a mailreader for it ;)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.nelhage.com/2008/03/conkeror/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

