<?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>浏忙大爆炸</title>
	<atom:link href="http://blog.waterlin.org/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.waterlin.org</link>
	<description>源于理工科男的烂笔头情结</description>
	<lastBuildDate>Thu, 02 Sep 2010 11:09:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Windows SDK 6.0A: unknwn.idl compilation error</title>
		<link>http://blog.waterlin.org/articles/windows-sdk-60a-unknwn-idl-compilation-error.html</link>
		<comments>http://blog.waterlin.org/articles/windows-sdk-60a-unknwn-idl-compilation-error.html#comments</comments>
		<pubDate>Thu, 02 Sep 2010 11:09:36 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/windows-sdk-60a-unknwn-idl-compilation-error.html</guid>
		<description><![CDATA[不知道为什么，之前还能在 Visual Studio 2005 下编译得好好的工程，今天突然就碰到下面的问题： Error 1 error MIDL2025 : syntax error : expecting ] or , near "annotation" C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\unknwn.idl 108 Error 2 error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\unknwn.idl 108 这个是 MIDL 编译器相关的问题，当你给新版本的 Windows SDK 头文件使用旧版本的 MIDL 编译器时，就会有这个问题。 解决的办法，就是把你新版本的 MIDL 编译器添加到 Visual Studio 的包含目录里。微软 Mike [...]]]></description>
			<content:encoded><![CDATA[<p>不知道为什么，之前还能在 Visual Studio 2005 下编译得好好的工程，今天突然就碰到下面的问题：</p>
<pre>
Error    1    error MIDL2025 : syntax error : expecting ] or , near "annotation"    C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\unknwn.idl    108
Error    2    error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation     C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\unknwn.idl    108
</pre>
<p>这个是 MIDL 编译器相关的问题，当你给新版本的 Windows SDK 头文件使用旧版本的 MIDL 编译器时，就会有这个问题。</p>
<p>解决的办法，就是把你新版本的 MIDL 编译器添加到 Visual Studio 的包含目录里。微软 <a href="http://blogs.msdn.com/b/mikewasson">Mike Wasson</a> 的博客 <a href="http://blogs.msdn.com/b/mikewasson/archive/2006/10/02/midl-error_3a00_-_2700_annotation_2700_.aspx">MIDL error: &#8216;annotation&#8217;</a> 对此有着详细的解释，内容摘要如下：</p>
<pre>
A colleage recently got this error while compiling unknown.idl:

1&gt;C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\unknwn.idl(108) : error MIDL2025 : syntax error : expecting ] or , near "annotation"
1&gt;C:\Program Files\Microsoft SDKs\Windows\v6.0\Include\unknwn.idl(108) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

If you get this error, you are using a new version of the Windows headers with an older version of the MIDL compiler.

Fix:

1. Make sure you installed the MIDL compiler when you installed the latest Windows SDK. It should appear under "Program Files\Microsoft SDKs\Windows\v6.0\Bin".

Note: To install the MIDL compiler, you need to select Developer Tools / Windows Development Tools / Win32 Development Tools in the Windows SDK setup wizard. (At least, as of RC1.)

2. In Visual Studio, under Tools &gt; Options &gt; Projects and Solutions &gt; VC++ Directories &gt; Executable Files, add

    x:\Program Files\Microsoft SDKs\Windows\v6.0\bin

to the top of the list.
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/windows-sdk-60a-unknwn-idl-compilation-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>《敢死队》（剧透）</title>
		<link>http://blog.waterlin.org/articles/gan-si-dui-ju-tou.html</link>
		<comments>http://blog.waterlin.org/articles/gan-si-dui-ju-tou.html#comments</comments>
		<pubDate>Tue, 31 Aug 2010 01:45:15 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[文化]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/gan-si-dui-ju-tou.html</guid>
		<description><![CDATA[&#8220;达达达&#8230;.，碰，碰，碰，啊，达达达&#8230;.&#8221; 然后史泰龙、阿诺、威利斯三个动作影星，一起亮相调侃一翻，暗示以前史泰龙、阿诺拍片相互竞争的事情，还调侃一番阿诺想当总统的笑话。 然后，又是一长串子弹横飞的镜头：&#8221;哒哒哒，哒哒哒&#8221;；&#8221;砰，砰，砰&#8221;；&#8221;啊~~~~&#8221; 随机循环……直到死机为止…… 友情提示，看此片前最好复习一下以下影片：《第一滴血》、《反斗神鹰》、《魔鬼司令》、《玩命快递》、《再造战士》，以及复习一下好莱坞动作片史，这样看起来才会有看历史片的感觉。]]></description>
			<content:encoded><![CDATA[<p>&#8220;达达达&#8230;.，碰，碰，碰，啊，达达达&#8230;.&#8221;</p>
<p>然后史泰龙、阿诺、威利斯三个动作影星，一起亮相调侃一翻，暗示以前史泰龙、阿诺拍片相互竞争的事情，还调侃一番阿诺想当总统的笑话。</p>
<p>然后，又是一长串子弹横飞的镜头：&#8221;哒哒哒，哒哒哒&#8221;；&#8221;砰，砰，砰&#8221;；&#8221;啊~~~~&#8221;</p>
<p>随机循环……直到死机为止……</p>
<p>友情提示，看此片前最好复习一下以下影片：《第一滴血》、《反斗神鹰》、《魔鬼司令》、《玩命快递》、《再造战士》，以及复习一下好莱坞动作片史，这样看起来才会有看历史片的感觉。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/gan-si-dui-ju-tou.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Installer 把安装目录写到注册表里的方法</title>
		<link>http://blog.waterlin.org/articles/windows-installer-sets-installation-path-dynamicly.html</link>
		<comments>http://blog.waterlin.org/articles/windows-installer-sets-installation-path-dynamicly.html#comments</comments>
		<pubDate>Wed, 25 Aug 2010 08:24:45 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/windows-installer-sets-installation-path-dynamicly.html</guid>
		<description><![CDATA[在用 Visual Studio 2005 建立生成安装文件的工程时，因为应用程序的需要，在安装的时候要求 Windows Installer 把用户选择的安装路径写到注册表里。这个时候，有什么解决办法呢？ 可以在生成安装文件的工程里，手动插入一个系统预留的属性值（即需要转义的字符串），在 Windows Installer 安装程序的时候，会自动把这些属性值替换掉。可以用 [] 或 {} 来把该属性值括起来。 例如，右键点击&#8221;安装工程名称 ==&#62; 视图 ==&#62; 编辑器 ==&#62; 注册表&#8221;，这时，可以添加如下注册表项： HKEY_CURRENT_USER&#124;HKEY_LOCAL_MACHINE\Software\[Manufacturer]\ 这样，在 Windows Installer 安装程序的时候， [Manufacturer] 就会自动转义为实际的值。当然，如果没有对应的系统预留属性值，则转义为空值( blank )。 系统预留的属性值有很多个，例如对于安装目录来说，是 [TARGETDIR] ，即 [TARGETDIR] 会根据安装时用户选择的安装路径赋值。当你在注册表里，需要填写程序安装路径的时候，就可以用这个属性值来占位。Windows Installer 在安装的时候，自然会把它替换为实际路径。安装后，会显示为类似于下面的路径： C:\Program Files\TestApp\TestAppFirstPart\ 如果你需要在注册表里指定相应的可执行文件或动态链接库，比如说，你要在注册表里插入下面的路径： C:\Program Files\TestApp\TestAppFirstPart\test.dll 这时，你就应该在工程里把属性值设为： [TARGETDIR]test.dll 注意 [TARGETDIR] 生成的目录会有最后一个 \ 号。 更多 Windows Installer 使用技巧可以看 [...]]]></description>
			<content:encoded><![CDATA[<p>在用 Visual Studio 2005 建立生成安装文件的工程时，因为应用程序的需要，在安装的时候要求 <a href="http://msdn.microsoft.com/en-us/library/19x10e5c.aspx">Windows Installer</a> 把用户选择的安装路径写到<a href="http://msdn.microsoft.com/en-us/library/Aa371168">注册表</a>里。这个时候，有什么解决办法呢？</p>
<p>可以在生成安装文件的工程里，手动插入一个系统预留的<a href="http://blog.waterlin.org/articles/more-discussion-about-windows-registry.html">属性值（即需要转义的字符串）</a>，在 Windows Installer 安装程序的时候，会自动把这些属性值替换掉。可以用 <strong>[]</strong> 或 <strong>{}</strong> 来把该属性值括起来。</p>
<p>例如，右键点击&#8221;安装工程名称 ==&gt; 视图 ==&gt; 编辑器 ==&gt; 注册表&#8221;，这时，可以添加如下注册表项：</p>
<pre>
HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE\Software\[Manufacturer]\
</pre>
<p>这样，在 Windows Installer 安装程序的时候， <strong>[Manufacturer]</strong> 就会自动转义为实际的值。当然，如果没有对应的系统预留属性值，则转义为空值( blank )。</p>
<p><a href="http://msdn.microsoft.com/en-us/library/aa368609">系统预留的属性值有很多个</a>，例如对于安装目录来说，是 <strong>[TARGETDIR]</strong> ，即 <strong>[TARGETDIR]</strong> 会根据安装时用户选择的安装路径赋值。当你在<a href="http://blog.waterlin.org/articles/more-discussion-about-windows-registry.html">注册表</a>里，需要填写程序安装路径的时候，就可以用这个属性值来占位。Windows Installer 在安装的时候，自然会把它替换为实际路径。安装后，会显示为类似于下面的路径：</p>
<pre>
C:\Program Files\TestApp\TestAppFirstPart\
</pre>
<p>如果你需要在注册表里指定相应的可执行文件或动态链接库，比如说，你要在注册表里插入下面的路径：</p>
<pre>
C:\Program Files\TestApp\TestAppFirstPart\test.dll
</pre>
<p>这时，你就应该在工程里把属性值设为：</p>
<pre>
[TARGETDIR]test.dll
</pre>
<p>注意 <strong>[TARGETDIR]</strong> 生成的目录会有最后一个 <strong>\</strong> 号。</p>
<p>更多 Windows Installer 使用技巧可以看 <a href="http://robertdickau.com/msi_tips.html">Windows Installer (MSI) Tips and Notes</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/windows-installer-sets-installation-path-dynamicly.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>电子书时代快点占领全球吧</title>
		<link>http://blog.waterlin.org/articles/ebook-time-is-really-hot-welcomed.html</link>
		<comments>http://blog.waterlin.org/articles/ebook-time-is-really-hot-welcomed.html#comments</comments>
		<pubDate>Wed, 11 Aug 2010 12:26:15 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[文化]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/ebook-time-is-really-hot-welcomed.html</guid>
		<description><![CDATA[最近因为工作原因，很需要找一些旧的专业书籍来恶补一下，例如《COM本质论》、《深入解析ATL》之类的，以前看过，一知半解，现在有了实战经验，想仔细地研究一下。上网一搜，这些书全成绝版了。 成为绝版的原因，无外乎书的销量不行、出版社不赚钱之类的。这些技术，在应用软件开发中，很少有人会深入地去研究。再加上技术的日新月异，一些新的技术替代品出现，唯有像我这种喜欢刨根问底的人，才有兴趣去翻一翻。 无奈之下，下了一份没有版权的电子版，在电脑前痛苦的看着。 曾经也有着太多似曾相识的经历，记得以前在网上买书，想买一些老的科幻小说、或是其它怀旧故事书籍，结果大都绝版买不到了。可能并不是真正的绝版，只是因为时间久销量不乐观，所以不再重印了吧。 这些经历，使得我太期望电子书时代来占领全球了，到那时，我第一个投诚！ 电子书时代，这一切都将变得简单，我只要付钱买一份拷贝就行了，服务商只要用一点小硬盘来永久保存这个原始拷贝就可以了。这样，应该不会绝版了吧～～那些经不起时间洗涮的书籍，也就让它永远睡在计算机的比特里，而索引到这个比特地址的指针将无比的地长…… 电子书时代，也不用再为买不买纸质书而烦恼了。看着堆了一屋子的纸质书，对于我们这种居无定所的人来说，搬家的时候可怎么办哦？ 电子书时代也有缺点，永远也体验不到把书翻得粉碎的快感了，也许只能看着立体的数据示意图发呆！电子书时代，也将体现不到著作等身的陶醉了，那时，或许会用&#8221;汗硬盘充比特&#8221;来容易，哈。]]></description>
			<content:encoded><![CDATA[<p>最近因为工作原因，很需要找一些旧的专业书籍来恶补一下，例如《COM本质论》、《深入解析ATL》之类的，以前看过，一知半解，现在有了实战经验，想仔细地研究一下。上网一搜，这些书全成绝版了。</p>
<p>成为绝版的原因，无外乎书的销量不行、出版社不赚钱之类的。这些技术，在应用软件开发中，很少有人会深入地去研究。再加上技术的日新月异，一些新的技术替代品出现，唯有像我这种喜欢刨根问底的人，才有兴趣去翻一翻。</p>
<p>无奈之下，下了一份没有版权的电子版，在电脑前痛苦的看着。</p>
<p>曾经也有着太多似曾相识的经历，记得以前在网上买书，想买一些老的科幻小说、或是其它怀旧故事书籍，结果大都绝版买不到了。可能并不是真正的绝版，只是因为时间久销量不乐观，所以不再重印了吧。</p>
<p>这些经历，使得我太期望电子书时代来占领全球了，到那时，我第一个投诚！</p>
<p>电子书时代，这一切都将变得简单，我只要付钱买一份拷贝就行了，服务商只要用一点小硬盘来永久保存这个原始拷贝就可以了。这样，应该不会绝版了吧～～那些经不起时间洗涮的书籍，也就让它永远睡在计算机的比特里，而索引到这个比特地址的指针将无比的地长……</p>
<p>电子书时代，也不用再为买不买纸质书而烦恼了。看着堆了一屋子的纸质书，对于我们这种居无定所的人来说，搬家的时候可怎么办哦？</p>
<p>电子书时代也有缺点，永远也体验不到把书翻得粉碎的快感了，也许只能看着立体的数据示意图发呆！电子书时代，也将体现不到著作等身的陶醉了，那时，或许会用&#8221;汗硬盘充比特&#8221;来容易，哈。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/ebook-time-is-really-hot-welcomed.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Emacs Muse 及 Org 开启文档锚链接的方法</title>
		<link>http://blog.waterlin.org/articles/using-anchor-link-in-emacs-muse-and-org-mode.html</link>
		<comments>http://blog.waterlin.org/articles/using-anchor-link-in-emacs-muse-and-org-mode.html#comments</comments>
		<pubDate>Wed, 11 Aug 2010 11:36:09 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/using-anchor-link-in-emacs-muse-and-org-mode.html</guid>
		<description><![CDATA[在用 Emacs Muse 或 Org 来写文档的时候，经常需要用到内部链接，尤其是要链接到某一章节，这个时候，启用固定的锚链接是最合适的方法。 Muse的锚链接 经常需要内部链接 Emacs Muse 写的文档，即链接一个锚链接，可以用下面的方法设置一个锚链接： #Open-Ubuntu-ssh 把上面这个语句放到文档的任意地方，然后，在 Muse 文档里直接用下面的方式即可生成锚链接： [[test.html#Open-Ubuntu-ssh][test anchor link]] 当然，如果你要链接其它文件的锚链接，则要加上相应的文件名。 Org Mode 的锚链接 Emacs Org Mode 也可以方便地实现文档内部的锚链接功能，与 Muse 类似，用下面的语句就可以生成相应的锚链接： # &#60;&#60;My Target&#62;&#62; 把上面这句话放到文档的任意地方，即可设置文档的锚连接。至于目标链接的形式，和普通链接一样。 对比 Org Mode 比 Muse Mode 设计得更好的地方在于：如果你没有用形如 # My Target 的方式来设置锚链接，并且你依然采用了锚链接的形式来生成一个链接，则 Org 会自动根据你文档的子标题关键字来寻找最接近的锚链接（当然，这个方法对中文标题来讲，会麻烦一些吧？）。]]></description>
			<content:encoded><![CDATA[<p>在用 Emacs Muse 或 Org 来写文档的时候，经常需要用到内部链接，尤其是要链接到某一章节，这个时候，启用固定的锚链接是最合适的方法。</p>
<div class="outline-3">
<h3 id="sec-1.1">Muse的锚链接</h3>
<div class="outline-text-3">
<p>经常需要内部链接 <a href="http://blog.waterlin.org/articles/emacs-muse-tags-interpret.html">Emacs Muse</a> 写的文档，即链接一个锚链接，可以用<a href="http://mwolson.org/projects/MuseQuickStart.html#sec15">下面的方法</a>设置一个锚链接：</p>
<pre>
#Open-Ubuntu-ssh
</pre>
<p>把上面这个语句放到文档的任意地方，然后，在 Muse 文档里直接用下面的方式即可生成锚链接：</p>
<pre>
[[test.html#Open-Ubuntu-ssh][test anchor link]]
</pre>
<p>当然，如果你要链接其它文件的锚链接，则要加上相应的文件名。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.2">Org Mode 的锚链接</h3>
<div class="outline-text-3">
<p><a href="http://blog.waterlin.org/articles/publish-org-files-to-html-project.html">Emacs Org Mode</a> 也可以方便地实现文档内部的锚链接功能，与 Muse 类似，用<a href="http://orgmode.org/org.html#Internal-links">下面的语句</a>就可以生成相应的锚链接：</p>
<pre>
# &lt;&lt;My Target&gt;&gt;
</pre>
<p>把上面这句话放到文档的任意地方，即可设置文档的锚连接。至于目标链接的形式，和普通链接一样。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.3">对比</h3>
<div class="outline-text-3">
<p>Org Mode 比 Muse Mode 设计得更好的地方在于：如果你没有用形如 # <a class="target" name="My==Target">My Target</a> 的方式来设置锚链接，并且你依然采用了锚链接的形式来生成一个链接，则 Org 会自动根据你文档的子标题关键字来寻找最接近的锚链接（当然，这个方法对中文标题来讲，会麻烦一些吧？）。</p>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/using-anchor-link-in-emacs-muse-and-org-mode.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>今天被 Org Mode 折磨了</title>
		<link>http://blog.waterlin.org/articles/being-crazy-by-org-mode-today.html</link>
		<comments>http://blog.waterlin.org/articles/being-crazy-by-org-mode-today.html#comments</comments>
		<pubDate>Tue, 27 Jul 2010 12:32:57 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[生活]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/being-crazy-by-org-mode-today.html</guid>
		<description><![CDATA[今天在写《Emacs Org Mode 与 BibTeX 的结合》这篇笔记的时候，有一段如下的东西要放到文章里： #+TODO: TODO(t) STARTED(s) &#124; DONE(d) DEFERRED(f) REFTEX 结果我忘记在前面空格，导致我一用 C-c C-t 来设置 Org 笔记状态的时候，Emacs 只显示上面这几种状态。 害得我把今天在 .emacs 里新加的设置全部取消来找原因，折腾了很久，无果。最后碰巧发现是这句的问题，真是郁闷死了！ 所以，以后用 Org Mode 写东西，注意放在 block 里的内容，最好都空格而不是顶格写。]]></description>
			<content:encoded><![CDATA[<p>今天在写<a href="http://blog.waterlin.org/articles/bind-emacs-org-mode-with-bibtex.html">《Emacs Org Mode 与 BibTeX 的结合》</a>这篇笔记的时候，有一段如下的东西要放到文章里：</p>
<pre>
#+TODO: TODO(t) STARTED(s) | DONE(d) DEFERRED(f) REFTEX
</pre>
<p>结果我忘记在前面空格，导致我一用 C-c C-t 来设置 Org 笔记状态的时候，Emacs 只显示上面这几种状态。</p>
<p>害得我把今天在 .emacs 里新加的设置全部取消来找原因，折腾了很久，无果。最后碰巧发现是这句的问题，真是郁闷死了！</p>
<p>所以，以后用 Org Mode 写东西，注意放在 block 里的内容，最好都空格而不是顶格写。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/being-crazy-by-org-mode-today.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>设置 Emacs Desktop 的存储路径</title>
		<link>http://blog.waterlin.org/articles/use-different-emacs-desktop-between-computers.html</link>
		<comments>http://blog.waterlin.org/articles/use-different-emacs-desktop-between-computers.html#comments</comments>
		<pubDate>Tue, 27 Jul 2010 12:09:18 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/use-different-emacs-desktop-between-computers.html</guid>
		<description><![CDATA[我在多台电脑上使用 Emacs，同时也开启了 Desktop 功能，可是我并不想让所有电脑的 .emacs.desktop 存储的是同一批文件，这样我可以在不同的电脑上有针对性地干不同的事情。因此，我琢磨着，怎么在用 Dropbox 同步 Emacs 文件的时候，并不同步 .emacs.desktop 文件。 总的来说，可以有几种方法来设置这个 .emacs.desktop 的相关信息： 自动化配置 通过使用命令 M-x customize-group RET desktop 可以配置 desktop 的相关属性，即打开 desktop 组的设置选项进行相关设置。 可以通过下面的代码来进行相关的设置 (setq desktop-path '("~/.emacs.d/")) (setq desktop-dirname "~/.emacs.d/") (setq desktop-base-file-name ".emacs-desktop") 因为我用 Dropbox 在多台电脑里同步 Emacs 配置文件，所以采用的是第2种方法，这样各台机的配置就不会相互影响了。如果你需要针对不同的机器设置不同的参数，可以参考多台电脑间同步 Emacs 配置文件的方法，针对不同的机器使用不同的参数进行配置；如果设置项太多，还可以写成一个函数重复调用。]]></description>
			<content:encoded><![CDATA[<p>我在多台电脑上使用 Emacs，同时也<a href="http://blog.waterlin.org/articles/让emacs自动打开本次退出时已经打开的文件.html">开启了 Desktop 功能</a>，可是我并不想让所有电脑的 .emacs.desktop 存储的是同一批文件，这样我可以在不同的电脑上有针对性地干不同的事情。因此，我琢磨着，怎么在用 Dropbox 同步 Emacs 文件的时候，并不同步 .emacs.desktop 文件。</p>
<p>总的来说，可以有几种方法来设置这个 .emacs.desktop 的相关信息：</p>
<ol>
<li>自动化配置
<p>通过使用命令 <strong>M-x customize-group RET desktop</strong> 可以配置 desktop 的相关属性，即打开 desktop 组的设置选项进行相关设置。</p>
</li>
<li>可以通过<a href="http://www.emacswiki.org/emacs/DeskTop">下面的代码</a>来进行相关的设置</li>
</ol>
<pre>
(setq desktop-path '(<span>"~/.emacs.d/"</span>))
(setq desktop-dirname <span>"~/.emacs.d/"</span>)
(setq desktop-base-file-name <span>".emacs-desktop"</span>)
</pre>
<p>因为我<a href="http://blog.waterlin.org/articles/using-dropbox-to-sync-emacs-notes.html">用 Dropbox 在多台电脑里同步 Emacs 配置文件</a>，所以采用的是第2种方法，这样各台机的配置就不会相互影响了。如果你需要针对不同的机器设置不同的参数，可以参考<a href="http://blog.waterlin.org/articles/how-to-sync-emacs-configure-files.html">多台电脑间同步 Emacs 配置文件</a>的方法，针对不同的机器使用不同的参数进行配置；如果设置项太多，还可以写成一个函数重复调用。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/use-different-emacs-desktop-between-computers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs Org Mode 与 BibTeX 的结合</title>
		<link>http://blog.waterlin.org/articles/bind-emacs-org-mode-with-bibtex.html</link>
		<comments>http://blog.waterlin.org/articles/bind-emacs-org-mode-with-bibtex.html#comments</comments>
		<pubDate>Tue, 27 Jul 2010 11:50:25 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>
		<category><![CDATA[TeX]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/bind-emacs-org-mode-with-bibtex.html</guid>
		<description><![CDATA[Emacs Org Mode 可以是一个优秀的笔记工具，可是，如果你想用它来写正式一点的论文，可以吗？当然可以了，你可以把 Org Mode 和 LaTeX 结合起来用，当然最重要的是要解决参考文献引用的问题。 整体的思路如下： 先准备好你的 BibTeX 文件 可以用 Emacs BibTeX Mode 或 JabRef 之类的方式来生成这个文件，当然也可以用其它文献管理工具，只要它能导出 BibTeX 文件即可。 用 Emacs Org 建立工程并记笔记 创建 Org 工程的时候，和一般的工程没有任何区别。 用 RefTeX 方式来插入 BibTeX 的记录 在这里，重点介绍一下第三个步骤，即如何在 Org Mode 里插入 BibTeX 记录。从官方的这篇参考文献里可以看出，我们可以用三种方法在 org 文件里引用 BibTeX 参考文献，从而插入 LaTeX 类的参考文献。 1). 最简单的办法，给所有的 Org 文件指定一个 BibTeX 文件，然后在 Org 文件里插入该 BibTeX [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.waterlin.org/articles/publish-org-files-to-html-project.html">Emacs Org Mode 可以是一个优秀的笔记工具</a>，可是，如果你想用它来写正式一点的论文，可以吗？当然可以了，你可以<a href="http://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-LaTeX.php">把 Org Mode 和 LaTeX 结合起来用</a>，当然最重要的是要解决参考文献引用的问题。</p>
<p>整体的思路如下：</p>
<ol>
<li>先准备好你的 BibTeX 文件
<p>可以用 Emacs BibTeX Mode 或 JabRef 之类的方式来生成这个文件，当然也可以用其它文献管理工具，只要它能导出 BibTeX 文件即可。</p>
</li>
<li>用 Emacs Org 建立工程并记笔记
<p><a href="http://blog.waterlin.org/articles/publish-org-files-to-html-project.html">创建 Org 工程</a>的时候，和一般的工程没有任何区别。</p>
</li>
<li>用 RefTeX 方式来插入 BibTeX 的记录</li>
</ol>
<p>在这里，重点介绍一下第三个步骤，即如何在 Org Mode 里插入 BibTeX 记录。从官方的<a href="http://orgmode.org/worg/org-faq.php#sec-18_11_1">这篇参考文献</a>里可以看出，我们可以用三种方法在 org 文件里引用 BibTeX 参考文献，从而插入 LaTeX 类的参考文献。</p>
<p>1). 最简单的办法，给所有的 Org 文件指定一个 BibTeX 文件，然后在 Org 文件里插入该 BibTeX 文件的参考文献记录</p>
<p>具体的办法，先把下面的代码放到 .emacs 里：</p>
<pre>
(setq reftex-default-bibliography
      (quote
       (<span>"default.bib"</span> <span>"~/org/notes/refer.bib"</span>)))
(define-key org-mode-map (kbd <span>"C-c )"</span>) 'reftex-citation)
</pre>
<p>在这里，我指定的 BibTeX 文件为 <strong>default.bib</strong> 和 <strong>~/org/notes/refer.bib</strong> 。然后，可以在所有的 Org 文件里，通过命令 <strong>C-c )</strong> 或 <strong>M-x reftex-citation</strong> 来进行参考文献的插入，根据提示进行相关操作即可。</p>
<p>2). 为特定的 Org 文件，指定特定的 BibTeX 文件</p>
<p>这个方法是 <a href="http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/">Marios Braindump 的博客里介绍的</a>，具体方法如下：</p>
<p>先把下面的代码放到 .emacs 里：</p>
<pre>
(<span>defun</span> <span>org-mode-reftex-setup</span> ()
  (load-library <span>"reftex"</span>)
  (and (buffer-file-name)
       (file-exists-p (buffer-file-name))
       (reftex-parse-all))
  (define-key org-mode-map (kbd <span>"C-c )"</span>) 'reftex-citation))
(add-hook 'org-mode-hook 'org-mode-reftex-setup)
</pre>
<p>然后在你需要插入 BibTeX 参考文献的 Org 文件里，加入下面这段话（可以是任意位置）：</p>
<pre>
<span>\bibliographystyle</span>{plain}
<span>\bibliography</span>{<span>BIB-NAME</span>}
</pre>
<p>把上面的 BIB-NAME 换成你想指定的 BibTeX 文件，这样就可以对该 Org 文件指定特定的 BibTeX 文件，然后可以用 <strong>C-c )</strong> 或 <strong>M-x reftex-citation</strong> 来插入该 BibTeX 文件里的参考文献。</p>
<p>上面的代码会在 Emacs 启动的时候，要求你指定一个 master 文件，用来存储生成的 tex 文件。</p>
<p>3). 另外一种方法，实现为特定的 Org 文件指定特定 BibTeX 文件的功能</p>
<p>还有<a href="http://orgmode.org/worg/org-faq.php#sec-18_11_2">另外一种方法</a>，可以实现第2种方法类似的功能，即为特定 Org 文件指定特定 BibTeX 文件的方法。把下面的代码放到 .emacs 文件里：</p>
<pre>
(<span>defun</span> <span>org-mode-article-modes</span> ()
  (reftex-mode t)
  (and (buffer-file-name)
       (file-exists-p (buffer-file-name))
       (reftex-parse-all)))

(add-hook 'org-mode-hook
          (<span>lambda</span> ()
            (<span>if</span> (member <span>"REFTEX"</span> org-todo-keywords-1)
                (org-mode-article-modes))))
</pre>
<p>然后把下面这一行加到你需要插入 BibTeX 的 Org 文件的开头：</p>
<pre>
#+TODO: TODO(t) STARTED(s) | DONE(d) DEFERRED(f) REFTEX
</pre>
<p>其它步骤与第2种方法类似。这种方法我没有仔细测试，有兴趣的 Emacser 们可以试试。</p>
<p>通过以上方法，就可以在用 Org Mode 打造的笔记本里，很方便地索引 BibTeX 里的参考文献了。</p>
<p>当然，如果你不喜欢用 Org Mode，也有其它用 Emacs 来写论文的思路，例如：Emacs + AucTeX + RefTeX + Outline-minor-mode</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/bind-emacs-org-mode-with-bibtex.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>让 Emacs Org 直接显示图片的 iimage 模式</title>
		<link>http://blog.waterlin.org/articles/using-iimage-mode-to-show-images-in-emacs.html</link>
		<comments>http://blog.waterlin.org/articles/using-iimage-mode-to-show-images-in-emacs.html#comments</comments>
		<pubDate>Thu, 15 Jul 2010 05:25:51 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/using-iimage-mode-to-show-images-in-emacs.html</guid>
		<description><![CDATA[在 Emacs 里用 Org mode 来编辑，如果链接一张图片，只能显示图片的链接地址，并不能真正显示一张图片。 如果用 iimage 这个 minor mode，则可以使 Emacs 在编辑区里显示图片。下载 iimage.el 文件扔到 Emacs 的目录里，然后在 .emacs 里添加下面的代码： ;; iimage mode (autoload 'iimage-mode "iimage" "Support Inline image minor mode." t) (autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t) 然后就可以用命令 M-x iimage-mode RET 在当前模式里启动 iimage 这个 minor mode。 如果想在 Emacs org 模式里启用 iimage [...]]]></description>
			<content:encoded><![CDATA[<p>在 Emacs 里用 Org mode 来编辑，如果链接一张图片，只能显示图片的链接地址，并不能真正显示一张图片。</p>
<p>如果用 <a href="http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html">iimage</a> 这个 minor mode，则可以使 Emacs 在编辑区里显示图片。下载 <a href="http://www.netlaputa.ne.jp/~kose/Emacs/lisp/iimage.el">iimage.el</a> 文件扔到 Emacs 的目录里，然后在 .emacs 里添加下面的代码：</p>
<pre>
<span>;; </span><span>iimage mode
</span>(autoload 'iimage-mode <span>"iimage"</span> <span>"Support Inline image minor mode."</span> t)
(autoload 'turn-on-iimage-mode <span>"iimage"</span> <span>"Turn on Inline image minor mode."</span> t)
</pre>
<p>然后就可以用命令</p>
<pre>
M-x iimage-mode RET
</pre>
<p>在当前模式里启动 iimage 这个 minor mode。</p>
<p>如果想<a href="http://orgmode.org/worg/org-configs/org-config-examples.php">在 Emacs org 模式里启用 iimage 模式</a>，把下面的代码放到配置文件里，则可以在 Emacs Org 的编辑区里显示图片。</p>
<pre>
(<span>defun</span> <span>org-toggle-iimage-in-org</span> ()
  <span>"display images in your org file"</span>
  (interactive)
  (<span>if</span> (face-underline-p 'org-link)
      (set-face-underline-p 'org-link nil)
      (set-face-underline-p 'org-link t))
  (iimage-mode))
</pre>
<p>以后要写图文并茂的笔记就方便多了，不用发布后再浏览图片在文章里的效果了。</p>
<p>可以用 <strong>M-x org-toggle-iimage-in-org</strong> 或 <strong>M-x iimage-mode</strong> 命令来激活 iimage 模式，类似以下这些链接形式会直接显示为图片：</p>
<pre>
file://foo.png
`file://foo.png'
[[foo.gif]]
‹foo.png›
`foo.JPG'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/using-iimage-mode-to-show-images-in-emacs.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>博客发布工具对比</title>
		<link>http://blog.waterlin.org/articles/comparison-about-blog-publishing-tools.html</link>
		<comments>http://blog.waterlin.org/articles/comparison-about-blog-publishing-tools.html#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:48:31 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[软件]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/comparison-about-blog-publishing-tools.html</guid>
		<description><![CDATA[对于经常写博客的人来说，挑选一个最适合发布博客的工具，是提高效率、减少出错可能性的一个好办法。在我写博客的过程中，我试用了不少的博客发布软件，比较喜欢的有下面几款，它们有各自的优缺点。 Zoundry Raven 这个是我最常用的博客发布软件，它有一个最好的功能，就是可以同时发布多个博客，省去了在多个博客平台同步博客文章的麻烦。 ScribeFire 这个是 Firefox 的插件，非常好用，功能简单明了，在 Firefox 里，看到什么网页内容有了灵感，马上就可以撰文发布，真是方便！缺点是不能同时发布博文到几个博客。 Google Chrome 版也出了 ScribeFire，而且做得非常漂亮，也支持直接贴图。 Windows Live Writer 这个是微软少有做得非常精巧的工具，一扫微软东西丑、大、慢的特点，与 Live Spaces 结合得很紧密。缺点也是显而易见的，没有办法同时发布一篇文章到多个博客上。 WizKnowledge WizKnowledge 是个人知识管理工具，它附带的博客发布功能比较弱，好像目前只支持 WordPress，而且没有目录、标签等功能。但是，有一点非常好，就是支持直接从网上复制图片并发布。相比于其它博客发布客户端，这种发布图片的功能，并不仅仅是外链一张其它网站的图片，而是直接把图片上传到你的服务器然后再显示出来。 其它博客发布工具不支持类似这种从网页上复制、上传图片功能，而只是添加一个图片外链，可能是出于图片版权之类的考虑。 Emacs Weblogger 这个基本上没啥好说的，Emacser 才会用的玩意，个人感觉不是太好用，补全做得也不好。 这些工具大体上来说功能都差不多，没有必要一直停留在琢磨用哪个工具好这一层面上。]]></description>
			<content:encoded><![CDATA[<p>对于经常写博客的人来说，挑选一个最适合发布博客的工具，是提高效率、减少出错可能性的一个好办法。在我写博客的过程中，我试用了不少的博客发布软件，比较喜欢的有下面几款，它们有各自的优缺点。</p>
<ol>
<li><a href="http://blog.waterlin.org/articles/zoundry-å¥½Ã§¨Ã§åå®¢åå¸å·¥å·.html">Zoundry Raven</a>
<p>这个是我最常用的博客发布软件，它有一个最好的功能，就是可以同时发布多个博客，省去了在多个博客平台同步博客文章的麻烦。</p>
</li>
<li><a href="http://blog.waterlin.org/articles/Ã§¨scribefireä¹å¯ä»¥å®Ã§°å¤åå®¢åæ­¥åå¸.html">ScribeFire</a>
<p>这个是 Firefox 的插件，非常好用，功能简单明了，在 Firefox 里，看到什么网页内容有了灵感，马上就可以撰文发布，真是方便！缺点是不能同时发布博文到几个博客。</p>
<p>Google Chrome 版也出了 ScribeFire，而且做得非常漂亮，也支持直接贴图。</p>
</li>
<li><a href="http://explore.live.com/windows-live-writer">Windows Live Writer</a>
<p>这个是微软少有做得非常精巧的工具，一扫微软东西丑、大、慢的特点，与 Live Spaces 结合得很紧密。缺点也是显而易见的，没有办法同时发布一篇文章到多个博客上。</p>
</li>
<li><a href="http://cn.wizknowledge.com/">WizKnowledge</a>
<p>WizKnowledge 是个人知识管理工具，它附带的博客发布功能比较弱，好像目前只支持 WordPress，而且没有目录、标签等功能。但是，有一点非常好，就是支持直接从网上复制图片并发布。相比于其它博客发布客户端，这种发布图片的功能，并不仅仅是外链一张其它网站的图片，而是直接把图片上传到你的服务器然后再显示出来。</p>
<p>其它博客发布工具不支持类似这种从网页上复制、上传图片功能，而只是添加一个图片外链，可能是出于图片版权之类的考虑。</p>
</li>
<li><a href="http://wiki.waterlin.org/Emacs/Emacs-Weblogger-mode.html">Emacs Weblogger</a>
<p>这个基本上没啥好说的，Emacser 才会用的玩意，个人感觉不是太好用，补全做得也不好。</p>
</li>
</ol>
<p>这些工具大体上来说功能都差不多，没有必要一直停留在琢磨用哪个工具好这一层面上。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/comparison-about-blog-publishing-tools.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
