<?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>dfan says &#187; emacs</title>
	<atom:link href="http://dfan.org/blog/tag/emacs/feed/" rel="self" type="application/rss+xml" />
	<link>http://dfan.org/blog</link>
	<description></description>
	<lastBuildDate>Sun, 31 Jul 2011 03:26:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Emacs: dedicated windows</title>
		<link>http://dfan.org/blog/2009/02/19/emacs-dedicated-windows/</link>
		<comments>http://dfan.org/blog/2009/02/19/emacs-dedicated-windows/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 14:32:24 +0000</pubDate>
		<dc:creator>dfan</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[emacs]]></category>

		<guid isPermaLink="false">http://dfan.org/blog/?p=200</guid>
		<description><![CDATA[Here&#8217;s something I had been wanting to do for a long time and could never find the right docs for. When you perform some operation in Emacs, it often puts stuff (search results, some new buffer, etc.) in a window other than the current one.  (I&#8217;m using window in the Emacs sense, to mean a [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s something I had been wanting to do for a long time and could never find the right docs for.</p>
<p>When you perform some operation in Emacs, it often puts stuff (search results, some new buffer, etc.) in a window other than the current one.  (I&#8217;m using window in the Emacs sense, to mean a portion of what you might call a window but it calls a frame.)  But I have a huge Emacs frame, and always want to keep some buffers present in particular positions while rotating the rest of it around.  In my case, it&#8217;s my org-mode windows, which keep track of most everything about my work day, but you could imagine it being some documentation reference or something.  Because I have these buffers up for long stretches of time but rarely actually go to them and edit them, Emacs thinks they&#8217;re not important and is happy to reuse their windows when it has new data to display.  How to stop it from doing so?</p>
<p>It turns out that what I want is a <em>dedicated window</em> (if I had realized this, I could have found the answer a lot faster).  The details are in the <a href="http://www.gnu.org/software/emacs/elisp/html_node/Choosing-Window.html">Emacs Lisp docs</a> or you can just put this trivial but handy code in your .emacs, and use the Pause key to toggle the dedication of the current window:</p>
<pre>(defun toggle-current-window-dedication ()
 (interactive)
 (let* ((window    (selected-window))
        (dedicated (window-dedicated-p window)))
   (set-window-dedicated-p window (not dedicated))
   (message "Window %sdedicated to %s"
            (if dedicated "no longer " "")
            (buffer-name))))

(global-set-key [pause] 'toggle-current-window-dedication)</pre>
]]></content:encoded>
			<wfw:commentRss>http://dfan.org/blog/2009/02/19/emacs-dedicated-windows/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

