<?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>浏忙大爆炸 &#187; Emacs</title>
	<atom:link href="http://blog.waterlin.org/articles/tag/emacs/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.waterlin.org</link>
	<description>源于理工科男的烂笔头情结</description>
	<lastBuildDate>Fri, 03 Feb 2012 08:35:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Org Mode 标记语言的一些疑问</title>
		<link>http://blog.waterlin.org/articles/emacs-org-mode-subscripter-setting.html</link>
		<comments>http://blog.waterlin.org/articles/emacs-org-mode-subscripter-setting.html#comments</comments>
		<pubDate>Sun, 09 Oct 2011 09:46:28 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/emacs-org-mode-subscripter-setting.html</guid>
		<description><![CDATA[在 Emacs Org Mode 里，默认情况下 _ 这种字符会被当成标记语言来进行转义。有的时候，如果你只是写写文章，这种默认的转义，会让你很不方便，尤其是你在写一篇介绍技术的文章，里面出现的变量名有很多的下划线。这时，你会说：&#8221;Oh, my god! 难道要我一个一个去标记不让 _ 转义么？&#8221; 如何设置让 Org Mode 在默认情况下，不转义 _ 字符呢？ 单个 org 文件的解决办法 你可以在一个 org 文件的开头，用下面的设置来关闭这个功能。 #+OPTIONS: ^:nil 如果你需要更方便的设置，可以把上面这个改为 #+OPTIONS: ^:{} 这样，当你写 a_{b} 时，_ 后被 {} 括起来的内容就会被转义，而写 a_b 时，就按普通的方式来显示。 org sites 的解决办法 如果你是用 org sites 来写笔记，想让某个 site 的所有 org 文件不转义 _ 字符，则也可以直接在 org sites 配置文件里，配置下面这么一句，一了百了： (setq org-export-with-sub-superscripts [...]]]></description>
			<content:encoded><![CDATA[<p>在 <a href="http://blog.waterlin.org/articles/how-to-set-emacs-org-and-muse-faces.html">Emacs Org Mode</a> 里，<a href="http://orgmode.org/manual/Subscripts-and-superscripts.html">默认情况下 _ 这种字符会被当成标记语言来进行转义</a>。有的时候，如果你只是写写文章，这种默认的转义，会让你很不方便，尤其是你在写一篇介绍技术的文章，里面出现的变量名有很多的下划线。这时，你会说：&#8221;Oh, my god! 难道要我一个一个去标记不让 _ 转义么？&#8221;</p>
<p><strong>如何设置让 Org Mode 在默认情况下，不转义 _ 字符呢？</strong></p>
<div class="outline-3">
<h3 id="sec-1.1">单个 org 文件的解决办法</h3>
<div class="outline-text-3">
<p>你可以在一个 org 文件的开头，用<a href="http://orgmode.org/manual/Export-options.html">下面的设置</a>来关闭这个功能。</p>
<pre>
#+OPTIONS: ^:nil
</pre>
<p>如果你需要更方便的设置，可以把上面这个改为</p>
<pre>
#+OPTIONS: ^:{}
</pre>
<p>这样，当你写</p>
<pre>
a_{b}
</pre>
<p>时，_ 后被 {} 括起来的内容就会被转义，而写 <strong>a_b</strong> 时，就按普通的方式来显示。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.2">org sites 的解决办法</h3>
<div class="outline-text-3">
<p>如果你是<a href="http://blog.waterlin.org/articles/publish-org-files-to-html-project.html">用 org sites 来写笔记</a>，想让某个 site 的所有 org 文件不转义 _ 字符，则也可以直接在 org sites 配置文件里，配置下面这么一句，一了百了：</p>
<pre>
(setq org-export-with-sub-superscripts nil)
</pre>
<p>也可以<a href="http://orgmode.org/manual/Publishing-options.html">在 org sites 里设置这个属性</a>，只作用于某一个 site：</p>
<pre>
:sub-superscript nil
</pre>
<p>如果需要像上面一样，采用相对智能的 {} 方式，可以设置成</p>
<pre>
:sub-superscript {}
</pre>
<p>或是直接用 elisp 来设置全局的属性：</p>
<pre>
(setq org-export-with-sub-superscripts '{})
</pre>
<p>这样就会<a href="http://stackoverflow.com/questions/698562/disabling-underscore-to-subscript-in-emacs-org-mode-export">用 {} 来转义</a>了。</p>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/emacs-org-mode-subscripter-setting.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emacs 笔记本全文搜索方法介绍</title>
		<link>http://blog.waterlin.org/articles/five-ways-to-search-in-emacs-notes.html</link>
		<comments>http://blog.waterlin.org/articles/five-ways-to-search-in-emacs-notes.html#comments</comments>
		<pubDate>Fri, 08 Apr 2011 11:10:51 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/five-ways-to-search-in-emacs-notes.html</guid>
		<description><![CDATA[用 Emacs Org 和 Muse 记了一大堆的笔记，分散在很多目录及很多文件里，当要找一个以前的笔记时，怎么样才能快速、有效地搜索到目标文件呢？下面就探讨一下几种常用的方法： 利用 Emacs 本身的搜索功能进行搜索 在 agenda 里用 M-x org-agenda RET s 进行搜索； 当然，也可以直接用 Org 的 occur-tree 功能； 如果你想使用原生态的 Emacs 搜索功能，可以进入 dired 模式到你待搜索的目录里，用命令 M-x grep-find RET 进行本地全文搜索。 Windows7 自带的搜索功能 Windows7 自带的搜索功能，也有预先进行检索收录的功能，所以，如果是对文本文件或是 html 文件进行本地搜索，也是想当的方便的。 Google 桌面搜索 下载一个 Google 桌面搜索，可以把你的 Org 或是 Muse 笔记的发布路径添加进去，从而对这部分内容进行快速检索。 并且这个产品的好处，是通过浏览器访问，像我们这种用 org 建工程写了一大堆 html 笔记的人，只要轻轻一点链接，就可以在浏览器里打开相应的笔记，真方便！ 我习惯于让 Google Desktop 只检索我的笔记目录，整个硬盘都开放给第三方软件搜索，感觉实在不太爽。 [...]]]></description>
			<content:encoded><![CDATA[<p>用 Emacs Org 和 Muse 记了一大堆的笔记，分散在很多目录及很多文件里，当要找一个以前的笔记时，怎么样才能快速、有效地搜索到目标文件呢？下面就探讨一下几种常用的方法：</p>
<ol>
<li>利用 Emacs 本身的搜索功能进行搜索
<p>在 agenda 里用 M-x org-agenda RET s 进行搜索；</p>
<p>当然，也可以直接用 Org 的 <a href="http://www.gnu.org/software/emacs/manual/html_node/org/Storing-searches.html">occur-tree</a> 功能；</p>
<p>如果你想使用原生态的 Emacs 搜索功能，可以进入 dired 模式到你待搜索的目录里，用命令 M-x grep-find RET 进行本地全文搜索。</p>
</li>
<li>Windows7 自带的搜索功能
<p>Windows7 自带的搜索功能，也有预先进行检索收录的功能，所以，如果是对文本文件或是 html 文件进行本地搜索，也是想当的方便的。</p>
</li>
<li>Google 桌面搜索
<p>下载一个 <a href="http://desktop.google.com/zh/">Google 桌面搜索</a>，可以把你的 Org 或是 Muse 笔记的发布路径添加进去，从而对这部分内容进行快速检索。</p>
<p>并且这个产品的好处，是通过浏览器访问，像我们这种用 org 建工程写了一大堆 html 笔记的人，只要轻轻一点链接，就可以在浏览器里打开相应的笔记，真方便！</p>
<p>我习惯于让 Google Desktop 只检索我的笔记目录，整个硬盘都开放给第三方软件搜索，感觉实在不太爽。</p>
</li>
<li>百度本地搜索
<p>百度也有类似 Google Desktop 的搜索工具，使用方法类似，<a href="http://disk.baidu.com/">百度桌面搜索</a>安装后，可以通过以下网址来访问本地的搜索页面：</p>
<p><a href="http://127.0.0.1:7887/&amp;s=200566888">http://127.0.0.1:7887/&amp;s=200566888</a></p>
<p>这基本上是唯一让我觉得满意的百度产品，也基本上唯一是我还可能会用的百度产品。</p>
</li>
<li>利用其它文本编辑器进行本地搜索
<p>其它文本编辑器基本上都有从目录里搜索的功能，你可以利用这种方法对你的笔记目录进行搜索。当然，并不推荐使用这种方法，吃力不讨好，看起来还特山寨~~</p>
</li>
</ol>
<p>还有其它更好的方法吗？欢迎大家补充。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/five-ways-to-search-in-emacs-notes.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>设置 Emacs 状态自动记录文件的保存路径</title>
		<link>http://blog.waterlin.org/articles/chang-save-path-of-emacs-auto-save-files.html</link>
		<comments>http://blog.waterlin.org/articles/chang-save-path-of-emacs-auto-save-files.html#comments</comments>
		<pubDate>Sun, 28 Nov 2010 06:22:56 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/chang-save-path-of-emacs-auto-save-files.html</guid>
		<description><![CDATA[Emacs 有一大堆自动保存的文件，之前我就介绍过如何重定向 .emacs.desktop 文件的存储路径，事实上，我们还有很多其它文件需要重定向保存路径。否则，对于这些文件来说，在多台电脑之间同步 Emacs 配置文件，一来实在没有同步这些文件的必要，二来存在潜在文件冲突、混淆的可能性。 比如说，因为我的 Emacs 配置，我有 .ido.last 、.recentf 以及 .emacs-places 这几个文件会自动生成到 Emacs 的 Home 目录。因为这些文件是跟特定的机器有关，也就没有用 Dropbox 来同步的必要了。 我们可以通过下面的方法来设置这些文件的存储路径，从而让 Dropbox 不同步这些文件。 设置 .recentf 文件的保存路径 对于 .recentf 文件，可以用下面的代码，来设置固定的存储路径： ;; set recent open files (require 'recentf) (recentf-mode t) (setq recentf-save-file "E:/water/.recentf") 设置 .ido.last 文件的相关属性 对于 .ido.last 文件，可以用下面的代码来设置相关的属性： (require 'ido) (ido-mode t) (setq ido-save-directory-list-file "E:/water/ido.last" ido-ignore-buffers [...]]]></description>
			<content:encoded><![CDATA[<p>Emacs 有一大堆自动保存的文件，之前我就介绍过如何<a href="http://blog.waterlin.org/articles/use-different-emacs-desktop-between-computers.html">重定向 .emacs.desktop 文件的存储路径</a>，事实上，我们还有很多其它文件需要重定向保存路径。否则，对于这些文件来说，<a href="http://blog.waterlin.org/articles/using-dropbox-to-sync-emacs-notes.html">在多台电脑之间同步 Emacs 配置文件</a>，一来实在没有同步这些文件的必要，二来存在潜在文件冲突、混淆的可能性。</p>
<p>比如说，因为我的 Emacs 配置，我有 <a href="http://blog.waterlin.org/articles/ido-mode：在emacs中互动地打开文件.html">.ido.last</a> 、<a href="http://blog.waterlin.org/articles/在emacs里查看最近打开文件的方法.html">.recentf</a> 以及 <a href="http://blog.waterlin.org/articles/让emacs保存你退出文件时的当前位置.html">.emacs-places</a> 这几个文件会自动生成到 <a href="http://blog.waterlin.org/articles/setting-emacs-home-directory.html">Emacs 的 Home 目录</a>。因为这些文件是跟特定的机器有关，也就没有用 Dropbox 来同步的必要了。</p>
<p>我们可以通过下面的方法来设置这些文件的存储路径，从而让 Dropbox 不同步这些文件。</p>
<div class="outline-3">
<h3 id="sec-1.1">设置 .recentf 文件的保存路径</h3>
<div class="outline-text-3">
<p>对于 .recentf 文件，可以用下面的代码，来设置固定的存储路径：</p>
<pre>
<span>;; </span>
              <span>set recent open files
</span>(<span>require</span> '<span>recentf</span>)
(recentf-mode t)
(setq recentf-save-file <span>"E:/water/.recentf"</span>)
</pre>
</div></div>
<div class="outline-3">
<h3 id="sec-1.2">设置 .ido.last 文件的相关属性</h3>
<div class="outline-text-3">
<p>对于 .ido.last 文件，可以用下面的代码来设置相关的属性：</p>
<pre>
(<span>require</span> '<span>ido</span>)
(ido-mode t)
(setq
  ido-save-directory-list-file <span>"E:/water/ido.last"</span>
  ido-ignore-buffers <span>;; </span>
              <span>ignore these guys
</span>  '(<span>"\\` "</span> <span>"^\*Mess"</span> <span>"^\*Back"</span> <span>".*Completion"</span> <span>"^\*Ido"</span> <span>"^\*trace"</span>
     <span>"^\*compilation"</span> <span>"^\*GTAGS"</span> <span>"^session\.*"</span> <span>"^\*"</span>))
</pre>
<p>其中最重要的是设置 <strong>ido-save-directory-list-file</strong> 这个变量。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.3">设置 .emacs-places 文件的存储路径</h3>
<div class="outline-text-3">
<p>有关 .emacs-places 这个文件，是由 saveplace.el 这个文件保存出来的，利用下面的代码就可以重置该文件的存储路径：</p>
<pre>
(setq save-place-file <span>"E:/water/.emacs-places"</span>)
</pre>
</div></div>
<div class="outline-3">
<h3 id="sec-1.4">备注</h3>
<div class="outline-text-3">
<p>要查找以上这些变量的当前值，可以使用 <strong>M-x describe-variable RET save-place-file</strong> 这样的命令来查询。</p>
<p>这样，通过这些清理，用 SVN 或 Dropbox 来同步 Emacs 相关文件，就实现了从内容到形式的统一与方便。</p>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/chang-save-path-of-emacs-auto-save-files.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>自定义 Emacs Org 及 Muse 的颜色</title>
		<link>http://blog.waterlin.org/articles/how-to-set-emacs-org-and-muse-faces.html</link>
		<comments>http://blog.waterlin.org/articles/how-to-set-emacs-org-and-muse-faces.html#comments</comments>
		<pubDate>Mon, 20 Sep 2010 04:27:41 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/how-to-set-emacs-org-and-muse-faces.html</guid>
		<description><![CDATA[使用默认的 Emacs 字体颜色，会让人疯掉的；但是你使用了 Emacs Theme 后，可能依然会觉得 Org Mode 或 Muse Mode 的颜色让人看着不舒服，或太亮或太暗。 这个时候，我们可以轻松地通过以下方式定制它们的字体、背景颜色等。 对于 Emacs Org 来说 可以用 M-x customize-group RET org-faces RET 来定义各级菜单字体的颜色、背景颜色等。当然，Org Mode 的定义有点特殊，对于普通的文字设置，需要通过 M-x customize-face RET default RET 来对 Emacs 全文的普通字体来进行设置。 对于 Emacs Muse 来说 可以用 M-x customize-group RET muse-colors RET 来定义 Emacs Muse 各级菜单字体的颜色、字体大小、背景颜色等。 如何描述你喜欢的字体呢？ 如果你看到了喜欢的字体，想设置为你的字体，要怎么办呢？ 先找到你喜欢的颜色，用 M-x describe-face 来查看相应的名称，然后再用 M-x [...]]]></description>
			<content:encoded><![CDATA[<p>使用默认的 Emacs 字体颜色，会让人疯掉的；但是你使用了 Emacs Theme 后，可能依然会觉得 Org Mode 或 Muse Mode 的颜色让人看着不舒服，或太亮或太暗。</p>
<p>这个时候，我们可以轻松地通过以下方式定制它们的字体、背景颜色等。</p>
<div class="outline-3">
<h3 id="sec-1.1">对于 Emacs Org 来说</h3>
<div class="outline-text-3">
<p>可以用</p>
<pre>
M-x customize-group RET org-faces RET
</pre>
<p>来定义各级菜单字体的颜色、背景颜色等。当然，Org Mode 的定义有点特殊，对于普通的文字设置，需要通过</p>
<pre>
M-x customize-face RET default RET
</pre>
<p>来对 Emacs 全文的普通字体来进行设置。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.2">对于 Emacs Muse 来说</h3>
<div class="outline-text-3">
<p>可以用</p>
<pre>
M-x customize-group RET muse-colors RET
</pre>
<p>来定义 Emacs Muse 各级菜单字体的颜色、字体大小、背景颜色等。</p>
</p></div>
</p></div>
<div class="outline-3">
<h3 id="sec-1.3">如何描述你喜欢的字体呢？</h3>
<div class="outline-text-3">
<p>如果你看到了喜欢的字体，想设置为你的字体，要怎么办呢？</p>
<p>先找到你喜欢的颜色，用</p>
<pre>
M-x describe-face
</pre>
<p>来查看相应的名称，然后再用</p>
<pre>
M-x customize-face RET default RET
</pre>
<p>来设置相关的颜色。</p>
<p>当然，你也可以通过<a href="http://homepage1.nifty.com/blankspace/emacs/emacs_rgb.html">一些工具</a>来获得颜色的名称。</p>
</p></div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/how-to-set-emacs-org-and-muse-faces.html/feed</wfw:commentRss>
		<slash:comments>2</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>1</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>不知道为什么，Emacs 里用 Gpg4Win 不好使</title>
		<link>http://blog.waterlin.org/articles/why-can-not-use-gpg4win-in-emacs-minibuffer.html</link>
		<comments>http://blog.waterlin.org/articles/why-can-not-use-gpg4win-in-emacs-minibuffer.html#comments</comments>
		<pubDate>Thu, 24 Jun 2010 10:28:04 +0000</pubDate>
		<dc:creator>waterlin</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[Emacs]]></category>

		<guid isPermaLink="false">http://blog.waterlin.org/articles/why-can-not-use-gpg4win-in-emacs-minibuffer.html</guid>
		<description><![CDATA[在我的 Windows 系统下，用 Gpg4Win 来作为 Emacs EasyPG 文件加密解密的工具，可是每次用 EasyPG 打开加密的文件时，都会弹出一个对话框来让我输 Key。 弹出对话框来倒也无所谓，很要命的是，在这个对话框里，没有办法输入 Key。每每要用加密文件的关键时刻，我都不知所措，想尽办法重启电脑之类的来解决该问题。 今天一怒之下，改用 Cygwin 里的 GnuPG 了，现在 EasyPG 的表现和 Linux 下终于一样了，在 MiniBuffer 里输 Key 即可。 有人知道这是什么问题吗？是我哪里配置得有问题吗？]]></description>
			<content:encoded><![CDATA[<p>在我的 Windows 系统下，<a href="http://blog.waterlin.org/articles/using-easypg-in-emacs-under-windows.html">用 Gpg4Win 来作为 Emacs EasyPG 文件加密解密的工具</a>，可是每次<a href="http://blog.waterlin.org/articles/using-emacs-to-encry-file.html">用 EasyPG 打开加密的文件</a>时，都会弹出一个对话框来让我输 Key。</p>
<p>弹出对话框来倒也无所谓，很要命的是，在这个对话框里，没有办法输入 Key。每每要用加密文件的关键时刻，我都不知所措，想尽办法重启电脑之类的来解决该问题。</p>
<p>今天一怒之下，改用 Cygwin 里的 GnuPG 了，现在 EasyPG 的表现和 Linux 下终于一样了，在 MiniBuffer 里输 Key 即可。</p>
<p>有人知道这是什么问题吗？是我哪里配置得有问题吗？</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.waterlin.org/articles/why-can-not-use-gpg4win-in-emacs-minibuffer.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

